---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
labels:
funktion.fabric8.io/kind: Connector
provider: fabric8
project: connector-schematron
version: 1.1.23
group: io.fabric8.funktion.connector
name: schematron
data:
deployment.yml: |
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: schematron
spec:
replicas: 1
template:
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: schematron
spec:
containers:
- image: fabric8/connector-schematron:1.1.23
name: connector
schema.yml: |
---
component:
kind: component
scheme: schematron
syntax: schematron:path
title: Schematron
description: Validates the payload of a message using the Schematron Library.
label: validation
deprecated: false
async: false
producerOnly: true
javaType: org.apache.camel.component.schematron.SchematronComponent
groupId: org.apache.camel
artifactId: camel-schematron
version: 2.18.1
componentProperties: {}
properties:
path:
kind: path
group: producer
required: true
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: The path to the schematron rules file. Can either be in class path or location in the file system.
abort:
kind: parameter
group: producer
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: Flag to abort the route and throw a schematron validation exception.
rules:
kind: parameter
group: producer
type: object
javaType: javax.xml.transform.Templates
deprecated: false
secret: false
description: To use the given schematron rules instead of loading from the path
synchronous:
kind: parameter
group: advanced
label: advanced
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
uriResolver:
kind: parameter
group: advanced
label: advanced
type: object
javaType: javax.xml.transform.URIResolver
deprecated: false
secret: false
description: Set the URIResolver to be used for resolving schematron includes in the rules file.
documentation.adoc: "[[Schematron-SchematronComponent]]\nSchematron Component\n\
~~~~~~~~~~~~~~~~~~~~\n\n*Available as of Camel 2.14*\n\nhttp://www.schematron.com/index.html[Schematron]?\
?is an XML-based\nlanguage for validating XML instance documents. It is used\
\ to make\nassertions about data in an XML document and it is also used to express\n\
operational and business rules. Schematron is\nan??http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html[ISO\n\
Standard]. The schematron component uses the leading\nhttp://www.schematron.com/implementation.html[implementation]\
\ of ISO\nschematron. It is an XSLT based implementation. The schematron rules\
\ is\nrun through http://www.schematron.com/implementation.html[four XSLT\n\
pipelines], which generates a final XSLT which will be used as the basis\nfor\
\ running the assertion against the XML document. The component is\nwritten\
\ in a way that Schematron rules are loaded at the start of the\nendpoint (only\
\ once) this is to minimise the overhead of instantiating a\nJava Templates\
\ object representing the rules.\n\n[[Schematron-URIformat]]\nURI format\n^^^^^^^^^^\n\
\n[source,java]\n---------------------------\nschematron://path?[options]\n\
---------------------------\n\n[[Schematron-URIoptions]]\nURI options\n^^^^^^^^^^^\n\
\n\n// component options: START\nThe Schematron component has no options.\n\
// component options: END\n\n\n\n\n\n// endpoint options: START\nThe Schematron\
\ component supports 5 endpoint options which are listed below:\n\n{% raw %}\n\
[width=\"100%\",cols=\"2,1,1m,1m,5\",options=\"header\"]\n|=======================================================================\n\
| Name | Group | Default | Java Type | Description\n| path | producer | | String\
\ | *Required* The path to the schematron rules file. Can either be in class\
\ path or location in the file system.\n| abort | producer | false | boolean\
\ | Flag to abort the route and throw a schematron validation exception.\n|\
\ rules | producer | | Templates | To use the given schematron rules instead\
\ of loading from the path\n| synchronous | advanced | false | boolean | Sets\
\ whether synchronous processing should be strictly used or Camel is allowed\
\ to use asynchronous processing (if supported).\n| uriResolver | advanced |\
\ | URIResolver | Set the URIResolver to be used for resolving schematron includes\
\ in the rules file.\n|=======================================================================\n\
{% endraw %}\n// endpoint options: END\n\n\n\n\n[[Schematron-Headers]]\nHeaders\n\
^^^^^^^\n\n[width=\"100%\",cols=\"10%,10%,10%,70%\",options=\"header\",]\n|=======================================================================\n\
|Name |Description |Type |In/Out\n\n|CamelSchematronValidationStatus |The schematron\
\ validation status: SUCCESS / FAILED |String |IN\n\n|CamelSchematronValidationReport\
\ |The schematrion report body in XML format. See an example below |String |IN\n\
|=======================================================================\n\n\
[[Schematron-URIandpathsyntax]]\nURI and path syntax\n^^^^^^^^^^^^^^^^^^^\n\n\
The following example shows how to invoke the schematron processor in\nJava\
\ DSL. The schematron rules file is sourced from the class path:\n\n[source,java]\n\
----------------------------------------------------------------------------\n\
from(\"direct:start\").to(\"schematron://sch/schematron.sch\").to(\"mock:result\"\
)\n----------------------------------------------------------------------------\n\
\n??\n\nThe following example shows how to invoke the schematron processor in\n\
XML DSL. The schematrion rules file is sourced from the file system:\n\n[source,xml]\n\
-----------------------------------------------------------------------------------------------\n\
\n \n \n \n \n \n ${in.header.CamelSchematronValidationStatus}\
\ == 'SUCCESS'\n \n \n\
\ \n \n\
\ \n CamelSchematronValidationReport\n\
\ \n \n \n\
\ \n\n-----------------------------------------------------------------------------------------------\n\
\nTIP: *Where to store schematron rules?*\nSchematron rules can change with\
\ business requirement, as such it is\nrecommended to store these rules somewhere\
\ in file system. When the\nschematron component endpoint is started, the rules\
\ are compiled into\nXSLT as a ??Java Templates Object. This is done only once\
\ to minimise the\noverhead of instantiating Java Templates object, which can\
\ be an\nexpensive operation for large set of rules and given that the process\n\
goes through four pipelines\nof??http://www.schematron.com/implementation.html[XSLT\
\ transformations].\nSo if you happen to store the rules in the file system,\
\ in the event of\nan update, all you need is to restart the route or the component.\
\ No\nharm in storing these rules in the class path though, but you will have\n\
to build and deploy the component to pick up the changes.\n\n[[Schematron-Schematronrulesandreportsamples]]\n\
Schematron rules and report samples\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\
Here is an example of schematron rules\n\n[source,xml]\n--------------------------------------------------------------------\n\
\n\n Check Sections 12/07\n \n \n This section\
\ has no title\n This section has no\
\ paragraphs\n \n \n\n--------------------------------------------------------------------\n\
\nHere is an example of schematron report:\n\n[source,xml]\n------------------------------------------------------------------------\n\
\n\n \n \n \n \n A chapter should have a title\n \n\
\ \n \n A chapter should\
\ have a title\n \n \n\n------------------------------------------------------------------------\n\
\nTIP: *Useful Links and resources*\n* http://www.mulberrytech.com/papers/schematron-Philly.pdf[Introduction\n\
to Schematron]??by Mulleberry technologies. An excellent document in PDF\nto\
\ get you started on Schematron.\n* http://www.schematron.com[Schematron official\
\ site]. This contains\nlinks to other resources\n\n"