http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_svrl_for_xslt2.xsl ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_svrl_for_xslt2.xsl b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_svrl_for_xslt2.xsl new file mode 100644 index 0000000..2e8d8da --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_svrl_for_xslt2.xsl @@ -0,0 +1,684 @@ +<?xml version="1.0" ?> +<!-- + ISO_SVRL.xsl + + Implementation of Schematron Validation Report Language from ISO Schematron + ISO/IEC 19757 Document Schema Definition Languages (DSDL) + Part 3: Rule-based validation Schematron + Annex D: Schematron Validation Report Language + + This ISO Standard is available free as a Publicly Available Specification in PDF from ISO. + Also see www.schematron.com for drafts and other information. + + This implementation of SVRL is designed to run with the "Skeleton" implementation + of Schematron which Oliver Becker devised. The skeleton code provides a + Schematron implementation but with named templates for handling all output; + the skeleton provides basic templates for output using this API, but client + validators can be written to import the skeleton and override the default output + templates as required. (In order to understand this, you must understand that + a named template such as "process-assert" in this XSLT stylesheet overrides and + replaces any template with the same name in the imported skeleton XSLT file.) + + The other important thing to understand in this code is that there are different + versions of the Schematron skeleton. These track the development of Schematron through + Schematron 1.5, Schematron 1.6 and now ISO Schematron. One only skeleton must be + imported. The code has templates for the different skeletons commented out for + convenience. ISO Schematron has a different namespace than Schematron 1.5 and 1.6; + so the ISO Schematron skeleton has been written itself with an optional import + statement to in turn import the Schematron 1.6 skeleton. This will allow you to + validate with schemas from either namespace. + + + History: + 2010-04-14 + * Add command line parameter 'terminate' which will terminate on first failed + assert and (optionally) successful report. + 2009-03-18 + * Fix atrribute with space "see " which generates wrong name in some processors + * rename allow-foreign to allow-rich + + 2009-02-19 + * RJ add experimental non-standard attribute active-pattern/@document which says which + document is being validated from that point to the next similar. This is to cope with the + experimental multi-document validation in the XSLT2 skeleton. + 2008-08-19 + * RJ Experimental: Handle property elements. NOTE: signature change for process-assert, + process-report and process-rule to add property. + 2008-08-11 + * RJ Fix attribute/@select which saxon allows in XSLT 1 + 2008-08-07 + * RJ Add output-encoding attribute to specify final encoding to use + * Alter allow-foreign functionality so that Schematron span, emph and dir elements make + it to the output, for better formatting and because span can be used to mark up + semantically interesting information embedded in diagnostics, which reduces the + need to extend SVRL itself + * Diagnostic-reference had an invalid attribute @id that duplicated @diagnostic: removed + 2008-08-06 + * RJ Fix invalid output: svrl:diagnostic-reference is not contained in an svrl:text + * Output comment to SVRL file giving filename if available (from command-line parameter) + 2008-08-04 + * RJ move sch: prefix to schold: prefix to prevent confusion (we want people to + be able to switch from old namespace to new namespace without changing the + sch: prefix, so it is better to keep that prefix completely out of the XSLT) + * Extra signature fixes (PH) + 2008-08-03 + * Repair missing class parameter on process-p + 2008-07-31 + * Update skeleton names + 2007-04-03 + * Add option generate-fired-rule (RG) + 2007-02-07 + * Prefer true|false for parameters. But allow yes|no on some old for compatability + * DP Diagnostics output to svrl:text. Diagnosis put out after assertion text. + * Removed non-SVRL elements and attributes: better handled as an extra layer that invokes this one + * Add more formal parameters + * Correct confusion between $schemaVersion and $queryBinding + * Indent + * Validate against RNC schemas for XSLT 1 and 2 (with regex tests removed) + * Validate output with UniversalTest.sch against RNC schema for ISO SVRL + + 2007-02-01 + * DP. Update formal parameters of overriding named templates to handle more attributes. + * DP. Refactor handling of rich and linkable parameters to a named template. + + 2007-01-22 + * DP change svrl:ns to svrl:ns-in-attribute-value + * Change default when no queryBinding from "unknown" to "xslt" + + 2007-01-18: + * Improve documentation + * KH Add command-line options to generate paths or not + * Use axsl:attribute rather than xsl:attribute to shut XSLT2 up + * Add extra command-line options to pass to the iso_schematron_skeleton + + 2006-12-01: iso_svrl.xsl Rick Jelliffe, + * update namespace, + * update phase handling, + * add flag param to process-assert and process-report & @ flag on output + + 2001: Conformance1-5.xsl Rick Jelliffe, + * Created, using the skeleton code contributed by Oliver Becker +--> +<!-- + Derived from Conformance1-5.xsl. + + Copyright (c) 2001-2010 Rick Jelliffe and Academia Sinica Computing Center, Taiwan + + This software is provided 'as-is', without any express or implied warranty. + In no event will the authors be held liable for any damages arising from + the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it freely, + subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. +--> + +<!-- Ideas nabbed from schematrons by Francis N., Miloslav N. and David C. --> + +<!-- The command-line parameters are: + phase NMTOKEN | "#ALL" (default) Select the phase for validation + allow-foreign "true" | "false" (default) Pass non-Schematron elements and rich markup to the generated stylesheet + diagnose= true | false|yes|no Add the diagnostics to the assertion test in reports (yes|no are obsolete) + property= true | false Experimental: Add properties to the assertion test in reports + generate-paths=true|false|yes|no generate the @location attribute with XPaths (yes|no are obsolete) + sch.exslt.imports semi-colon delimited string of filenames for some EXSLT implementations + optimize "visit-no-attributes" Use only when the schema has no attributes as the context nodes + generate-fired-rule "true"(default) | "false" Generate fired-rule elements + terminate= yes | no | true | false | assert Terminate on the first failed assertion or successful report + Note: whether any output at all is generated depends on the XSLT implementation. +--> + +<xsl:stylesheet + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias" + xmlns:schold="http://www.ascc.net/xml/schematron" + xmlns:iso="http://purl.oclc.org/dsdl/schematron" + xmlns:svrl="http://purl.oclc.org/dsdl/svrl" + +> + +<!-- Select the import statement and adjust the path as + necessary for your system. +--> +<xsl:import href="iso_schematron_skeleton_for_saxon.xsl" /> + + <!-- +<xsl:import href="iso_schematron_skeleton_for_xslt1.xsl"/> + +<xsl:import href="iso_schematron_skeleton.xsl"/> +<xsl:import href="skeleton1-5.xsl"/> +<xsl:import href="skeleton1-6.xsl"/> +--> + +<xsl:param name="diagnose">true</xsl:param> +<xsl:param name="property">true</xsl:param> +<xsl:param name="phase"> + <xsl:choose> + <!-- Handle Schematron 1.5 and 1.6 phases --> + <xsl:when test="//schold:schema/@defaultPhase"> + <xsl:value-of select="//schold:schema/@defaultPhase"/> + </xsl:when> + <!-- Handle ISO Schematron phases --> + <xsl:when test="//iso:schema/@defaultPhase"> + <xsl:value-of select="//iso:schema/@defaultPhase"/> + </xsl:when> + <xsl:otherwise>#ALL</xsl:otherwise> + </xsl:choose> +</xsl:param> +<xsl:param name="allow-foreign">false</xsl:param> +<xsl:param name="generate-paths">true</xsl:param> +<xsl:param name="generate-fired-rule">true</xsl:param> +<xsl:param name="optimize" /> +<!-- e.g. saxon file.xml file.xsl "sch.exslt.imports=.../string.xsl;.../math.xsl" --> +<xsl:param name="sch.exslt.imports" /> + +<xsl:param name="terminate" >false</xsl:param> + +<!-- Set the language code for messages --> +<xsl:param name="langCode">default</xsl:param> + +<xsl:param name="output-encoding"/> + +<!-- Set the default for schematron-select-full-path, i.e. the notation for svrl's @location--> +<xsl:param name="full-path-notation">1</xsl:param> + + + +<!-- Experimental: If this file called, then must be generating svrl --> +<xsl:variable name="svrlTest" select="true()" /> + + + +<!-- ================================================================ --> + +<xsl:template name="process-prolog"> + <axsl:output method="xml" omit-xml-declaration="no" standalone="yes" + indent="yes"> + <xsl:if test=" string-length($output-encoding) > 0"> + <xsl:attribute name="encoding"><xsl:value-of select=" $output-encoding" /></xsl:attribute> + </xsl:if> + </axsl:output> + +</xsl:template> + +<!-- Overrides skeleton.xsl --> +<xsl:template name="process-root"> + <xsl:param name="title"/> + <xsl:param name="contents" /> + <xsl:param name="queryBinding" >xslt1</xsl:param> + <xsl:param name="schemaVersion" /> + <xsl:param name="id" /> + <xsl:param name="version"/> + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + + <svrl:schematron-output title="{$title}" schemaVersion="{$schemaVersion}" > + <xsl:if test=" string-length( normalize-space( $phase )) > 0 and + not( normalize-space( $phase ) = '#ALL') "> + <axsl:attribute name="phase"> + <xsl:value-of select=" $phase " /> + </axsl:attribute> + </xsl:if> + + <axsl:comment><axsl:value-of select="$archiveDirParameter"/>   + <axsl:value-of select="$archiveNameParameter"/>   + <axsl:value-of select="$fileNameParameter"/>   + <axsl:value-of select="$fileDirParameter"/></axsl:comment> + + + <xsl:apply-templates mode="do-schema-p" /> + <xsl:copy-of select="$contents" /> + </svrl:schematron-output> +</xsl:template> + + +<xsl:template name="process-assert"> + <xsl:param name="test"/> + <xsl:param name="diagnostics" /> + <xsl:param name="properties" /> + <xsl:param name="id" /> + <xsl:param name="flag" /> + <!-- "Linkable" parameters --> + <xsl:param name="role"/> + <xsl:param name="subject"/> + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <svrl:failed-assert test="{$test}" > + <xsl:if test="string-length( $id ) > 0"> + <axsl:attribute name="id"> + <xsl:value-of select=" $id " /> + </axsl:attribute> + </xsl:if> + <xsl:if test=" string-length( $flag ) > 0"> + <axsl:attribute name="flag"> + <xsl:value-of select=" $flag " /> + </axsl:attribute> + </xsl:if> + <!-- Process rich attributes. --> + <xsl:call-template name="richParms"> + <xsl:with-param name="fpi" select="$fpi"/> + <xsl:with-param name="icon" select="$icon"/> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="see" select="$see" /> + <xsl:with-param name="space" select="$space" /> + </xsl:call-template> + <xsl:call-template name='linkableParms'> + <xsl:with-param name="role" select="$role" /> + <xsl:with-param name="subject" select="$subject"/> + </xsl:call-template> + <xsl:if test=" $generate-paths = 'true' or $generate-paths= 'yes' "> + <!-- true/false is the new way --> + <axsl:attribute name="location"> + <axsl:apply-templates select="." mode="schematron-select-full-path"/> + </axsl:attribute> + </xsl:if> + + <svrl:text> + <xsl:apply-templates mode="text" /> + + </svrl:text> + <xsl:if test="$diagnose = 'yes' or $diagnose= 'true' "> + <!-- true/false is the new way --> + <xsl:call-template name="diagnosticsSplit"> + <xsl:with-param name="str" select="$diagnostics"/> + </xsl:call-template> + </xsl:if> + + + <xsl:if test="$property= 'yes' or $property= 'true' "> + <!-- true/false is the new way --> + <xsl:call-template name="propertiesSplit"> + <xsl:with-param name="str" select="$properties"/> + </xsl:call-template> + </xsl:if> + + </svrl:failed-assert> + + + <xsl:if test=" $terminate = 'yes' or $terminate = 'true' "> + <axsl:message terminate="yes">TERMINATING</axsl:message> + </xsl:if> + <xsl:if test=" $terminate = 'assert' "> + <axsl:message terminate="yes">TERMINATING</axsl:message> + </xsl:if> +</xsl:template> + +<xsl:template name="process-report"> + <xsl:param name="id"/> + <xsl:param name="test"/> + <xsl:param name="diagnostics"/> + <xsl:param name="flag" /> + <xsl:param name="properties"/> + <!-- "Linkable" parameters --> + <xsl:param name="role"/> + <xsl:param name="subject"/> + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <svrl:successful-report test="{$test}" > + <xsl:if test=" string-length( $id ) > 0"> + <axsl:attribute name="id"> + <xsl:value-of select=" $id " /> + </axsl:attribute> + </xsl:if> + <xsl:if test=" string-length( $flag ) > 0"> + <axsl:attribute name="flag"> + <xsl:value-of select=" $flag " /> + </axsl:attribute> + </xsl:if> + + <!-- Process rich attributes. --> + <xsl:call-template name="richParms"> + <xsl:with-param name="fpi" select="$fpi"/> + <xsl:with-param name="icon" select="$icon"/> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="see" select="$see" /> + <xsl:with-param name="space" select="$space" /> + </xsl:call-template> + <xsl:call-template name='linkableParms'> + <xsl:with-param name="role" select="$role" /> + <xsl:with-param name="subject" select="$subject"/> + </xsl:call-template> + <xsl:if test=" $generate-paths = 'yes' or $generate-paths = 'true' "> + <!-- true/false is the new way --> + <axsl:attribute name="location"> + <axsl:apply-templates select="." mode="schematron-select-full-path"/> + </axsl:attribute> + </xsl:if> + + <svrl:text> + <xsl:apply-templates mode="text" /> + + </svrl:text> + <xsl:if test="$diagnose = 'yes' or $diagnose='true' "> + <!-- true/false is the new way --> + <xsl:call-template name="diagnosticsSplit"> + <xsl:with-param name="str" select="$diagnostics"/> + </xsl:call-template> + </xsl:if> + + + <xsl:if test="$property = 'yes' or $property='true' "> + <!-- true/false is the new way --> + <xsl:call-template name="propertiesSplit"> + <xsl:with-param name="str" select="$properties"/> + </xsl:call-template> + </xsl:if> + + + </svrl:successful-report> + + + <xsl:if test=" $terminate = 'yes' or $terminate = 'true' "> + <axsl:message terminate="yes" >TERMINATING</axsl:message> + </xsl:if> +</xsl:template> + + + + +<xsl:template name="process-diagnostic"> + <xsl:param name="id"/> + <!-- Rich parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <svrl:diagnostic-reference diagnostic="{$id}" > + <!--xsl:if test="string($id)"> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> + </xsl:if--> + <xsl:call-template name="richParms"> + <xsl:with-param name="fpi" select="$fpi"/> + <xsl:with-param name="icon" select="$icon"/> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="see" select="$see" /> + <xsl:with-param name="space" select="$space" /> + </xsl:call-template> +<xsl:text> +</xsl:text> + + <xsl:apply-templates mode="text"/> + + </svrl:diagnostic-reference> +</xsl:template> + + + <!-- Overrides skeleton --> + <xsl:template name="process-dir" > + <xsl:param name="value" /> + <xsl:choose> + <xsl:when test=" $allow-foreign = 'true'"> + <xsl:copy-of select="."/> + </xsl:when> + + <xsl:otherwise> + <!-- We generate too much whitespace rather than risking concatenation --> + <axsl:text> </axsl:text> + <xsl:apply-templates mode="inline-text"/> + <axsl:text> </axsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + + <!-- Overrides skeleton --> + <xsl:template name="process-emph" > + <xsl:param name="class" /> + <xsl:choose> + <xsl:when test=" $allow-foreign = 'true'"> + <xsl:copy-of select="."/> + </xsl:when> + <xsl:otherwise> + <!-- We generate too much whitespace rather than risking concatenation --> + <axsl:text> </axsl:text> + <xsl:apply-templates mode="inline-text"/> + <axsl:text> </axsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +<xsl:template name="process-rule"> + <xsl:param name="id"/> + <xsl:param name="context"/> + <xsl:param name="flag"/> + <xsl:param name="properties" /> + <!-- "Linkable" parameters --> + <xsl:param name="role"/> + <xsl:param name="subject"/> + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <xsl:if test=" $generate-fired-rule = 'true'"> + <svrl:fired-rule context="{$context}" > + <xsl:if test=" string( $id )"> + <xsl:attribute name="id"> + <xsl:value-of select=" $id " /> + </xsl:attribute> + </xsl:if> + <xsl:if test=" string-length( $role ) > 0"> + <xsl:attribute name="role"> + <xsl:value-of select=" $role " /> + </xsl:attribute> + </xsl:if> + <!-- Process rich attributes. --> + <xsl:call-template name="richParms"> + <xsl:with-param name="fpi" select="$fpi"/> + <xsl:with-param name="icon" select="$icon"/> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="see" select="$see" /> + <xsl:with-param name="space" select="$space" /> + </xsl:call-template> + + + <xsl:if test="$property= 'yes' or $property= 'true' "> + <!-- true/false is the new way --> + <xsl:call-template name="propertiesSplit"> + <xsl:with-param name="str" select="$properties"/> + </xsl:call-template> + </xsl:if> + + </svrl:fired-rule> +</xsl:if> +</xsl:template> + +<xsl:template name="process-ns"> + <xsl:param name="prefix"/> + <xsl:param name="uri"/> + <svrl:ns-prefix-in-attribute-values uri="{$uri}" prefix="{$prefix}" /> +</xsl:template> + +<xsl:template name="process-p"> + <xsl:param name="icon"/> + <xsl:param name="class"/> + <xsl:param name="id"/> + <xsl:param name="lang"/> + + <svrl:text> + <xsl:apply-templates mode="text"/> + </svrl:text> +</xsl:template> + +<xsl:template name="process-pattern"> + <xsl:param name="name"/> + <xsl:param name="id"/> + <xsl:param name="is-a"/> + + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <svrl:active-pattern > + <axsl:attribute name="document"> + <axsl:value-of select="document-uri(/)" /> + </axsl:attribute><!-- If XSLT1 remove this --> + <xsl:if test=" string( $id )"> + <axsl:attribute name="id"> + <xsl:value-of select=" $id " /> + </axsl:attribute> + </xsl:if> + <xsl:if test=" string( $name )"> + <axsl:attribute name="name"> + <xsl:value-of select=" $name " /> + </axsl:attribute> + </xsl:if> + + <xsl:call-template name='richParms'> + <xsl:with-param name="fpi" select="$fpi"/> + <xsl:with-param name="icon" select="$icon"/> + <xsl:with-param name="lang" select="$lang"/> + <xsl:with-param name="see" select="$see" /> + <xsl:with-param name="space" select="$space" /> + </xsl:call-template> + + <!-- ?? report that this screws up iso:title processing --> + <xsl:apply-templates mode="do-pattern-p"/> + <!-- ?? Seems that this apply-templates is never triggered DP --> + <axsl:apply-templates /> + </svrl:active-pattern> +</xsl:template> + +<!-- Overrides skeleton --> +<xsl:template name="process-message" > + <xsl:param name="pattern"/> + <xsl:param name="role"/> +</xsl:template> + + + <!-- Overrides skeleton --> + <xsl:template name="process-span" > + <xsl:param name="class" /> + <xsl:choose> + <xsl:when test=" $allow-foreign = 'true'"> + <xsl:copy-of select="."/> + </xsl:when> + <xsl:otherwise> + <!-- We generate too much whitespace rather than risking concatenation --> + <axsl:text> </axsl:text> + <xsl:apply-templates mode="inline-text"/> + <axsl:text> </axsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +<!-- =========================================================================== --> +<!-- processing rich parameters. --> +<xsl:template name='richParms'> + <!-- "Rich" parameters --> + <xsl:param name="fpi" /> + <xsl:param name="icon" /> + <xsl:param name="lang" /> + <xsl:param name="see" /> + <xsl:param name="space" /> + <!-- Process rich attributes. --> + <xsl:if test=" $allow-foreign = 'true'"> + <xsl:if test="string($fpi)"> + <axsl:attribute name="fpi"> + <xsl:value-of select="$fpi "/> + </axsl:attribute> + </xsl:if> + <xsl:if test="string($icon)"> + <axsl:attribute name="icon"> + <xsl:value-of select="$icon"/> + </axsl:attribute> + </xsl:if> + <xsl:if test="string($see)"> + <axsl:attribute name="see"> + <xsl:value-of select="$see" /> + </axsl:attribute> + </xsl:if> + </xsl:if> + <xsl:if test="string($space)"> + <axsl:attribute name="xml:space"> + <xsl:value-of select="$space"/> + </axsl:attribute> + </xsl:if> + <xsl:if test="string($lang)"> + <axsl:attribute name="xml:lang"> + <xsl:value-of select="$lang"/> + </axsl:attribute> + </xsl:if> +</xsl:template> + +<!-- processing linkable parameters. --> +<xsl:template name='linkableParms'> + <xsl:param name="role"/> + <xsl:param name="subject"/> + + <!-- ISO SVRL has a role attribute to match the Schematron role attribute --> + <xsl:if test=" string($role )"> + <axsl:attribute name="role"> + <xsl:value-of select=" $role " /> + </axsl:attribute> + </xsl:if> + <!-- ISO SVRL does not have a subject attribute to match the Schematron subject attribute. + Instead, the Schematron subject attribute is folded into the location attribute --> +</xsl:template> + + + + <!-- ===================================================== --> + <!-- Extension API: --> + <!-- This allows the transmission of extra attributes on --> + <!-- rules, asserts, reports, diagnostics. --> + <!-- ===================================================== --> + + +<!-- Overrides skeleton EXPERIMENTAL --> +<!-- The $contents is for static contents, the $value is for dynamic contents --> +<xsl:template name="process-property"> + <xsl:param name="id"/> + <xsl:param name="name"/> + <xsl:param name="value"/> + <xsl:param name="contents"/> + + <svrl:property id="{$id}" > + <xsl:if test="$name"> + <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> + </xsl:if> + + <xsl:if test="$value"> + <xsl:attribute name="value"><xsl:value-of select="$value"/></xsl:attribute> + </xsl:if> + + <xsl:if test="$contents"> + <xsl:copy-of select="$contents"/> + </xsl:if> + + </svrl:property> +</xsl:template> + + +</xsl:stylesheet> +
http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/readme.txt ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/readme.txt b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/readme.txt new file mode 100644 index 0000000..5ce57c9 --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/readme.txt @@ -0,0 +1,100 @@ +<h1>ISO SCHEMATRON 2010</h1> + +XSLT implementation by Rick Jelliffe with assistance from members of Schematron-love-in maillist. + +2010-04-14 + +Two distributions are available. One is for XSLT1 engines. +The other is for XSLT2 engines, such as SAXON 9. + + +This version of Schematron splits the process into a pipeline of several different XSLT stages. + +1) First, preprocess your Schematron schema with iso_dsdl_include.xsl. +This is a macro processor to assemble the schema from various parts. +If your schema is not in separate parts, you can skip this stage. + +2) Second, preprocess the output from stage 1 with iso_abstract_expand.xsl. +This is a macro processor to convert abstract patterns to real patterns. +If your schema does not use abstract patterns, you can skip this +stage. + +3) Third, compile the Schematron schema into an XSLT script. +This will typically use iso_svrl_for_xslt1.xsl or iso_svrl_for_xslt2.xsl +(which in turn invoke iso_schematron_skeleton_for_xslt1.xsl or iso_schematron_skeleton_for_saxon.xsl) +However, other "meta-styleseets" are also in common use; the principle of operation is the same. +If your schema uses Schematron phases, supply these as command line/invocation parameters +to this process. + +4) Fourth, run the script generated by stage 3 against the document being validated. +If you are using the SVRL script, then the output of validation will be an XML document. +If your schema uses Schematron parameters, supply these as command line/invocation parameters +to this process. + + +The XSLT2 distribution also features several next generation features, +such as validating multiple documents. See the source code for details. + +Schematron assertions can be written in any language, of course; the file +sch-messages-en.xhtml contains the diagnostics messages from the XSLT2 skeleton +in English, and this can be used as template to localize the skeleton's +error messages. Note that typically programming errors in Schematron are XPath +errors, which requires localized messages from the XSLT engine. + +ANT +--- +To give an example of how to process a document, here is a sample ANT task. + +<target name="schematron-compile-test" > + + <!-- expand inclusions --> + <xslt basedir="test/schematron" + style="iso_dsdl_include.xsl" in="test.sch" out="test1.sch"> + <classpath> + <pathelement location="${lib.dir}/saxon9.jar"/> + </classpath> + </xslt> + + <!-- expand abstract patterns --> + <xslt basedir="test/schematron" + style="iso_abstract_expand.xsl" in="test1.sch" out="test2.sch"> + <classpath> + <pathelement location="${lib.dir}/saxon9.jar"/> + </classpath> + </xslt> + + + + <!-- compile it --> + <xslt basedir="test/schematron" + style="iso_svrl_for_xslt2.xsl" in="test2.sch" out="test.xsl"> + <classpath> + <pathelement location="${lib.dir}/saxon9.jar"/> + </classpath> + </xslt> + + <!-- validate --> + <xslt basedir="test/schematron" + style="test.xsl" in="instance.xml" out="instance.svrlt"> + <classpath> + <pathelement location="${lib.dir}/saxon9.jar"/> + </classpath> + </xslt> + </target> + +EXTRACTION SCHEMATRON FROM XSD OR RELAX NG + +The following files allow extracting of embedded schematron patterns +in XML Schemas or RELAX NG schemas. For details, see the at + article http://www.topologi.com/resources/schtrn_xsd_paper.html + +The following files are provided: + ExtractSchFromRNG.xsl Generate a Schematron schema from patterns + embedded in a RELAX NG schema. The schema uses XSLT1. + ExtractSchFromXSD.xsl Generate a Schematron schema from patterns + embedded in a W3C XML Schemas schema. The schema uses XSLT1. + + ExtractSchFromRNG-2.xsl Generate a Schematron schema from patterns + embedded in a RELAX NG schema. The schema uses XSLT2. + ExtractSchFromXSD-2.xsl Generate a Schematron schema from patterns + embedded in a W3C XML Schemas schema. The schema uses XSLT2. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-cs.xhtml ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-cs.xhtml b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-cs.xhtml new file mode 100644 index 0000000..93e181c --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-cs.xhtml @@ -0,0 +1,56 @@ +<xhtml:div class="ErrorMessages" xml:lang="cs" + xmlns:xhtml="http://www.w3.org/1999/xhtml" > + <!-- Obsahuje-li chybové hlášenà dynamické informace, je rozdÄleno + do sekcà "a" a "b". Různé jazyky tak mohou dynamické informace + umÃstit s ohledem na svá gramatická pravidla. --> + <xhtml:p id="sch-message-1-cs">Chyba ve schématu: nalezeny elementy Schematronu ve starém i novém jmenném prostoru</xhtml:p> + <xhtml:p id="sch-message-2-cs">Chyba ve schématu: v atributu queryBinding použijte 'xslt'</xhtml:p> + <xhtml:p id="sch-message-3a-cs">Porucha: Tato implementace ISO Schematronu nefunguje se schématy, která použÃvajà dotazovacà jazyk</xhtml:p> + <xhtml:p id="sch-message-3b-cs"/> + <xhtml:p id="sch-message-4a-cs">Fázová chyba: fáze jménem </xhtml:p> + <xhtml:p id="sch-message-4b-cs"> nenà definována.</xhtml:p> + <xhtml:p id="sch-message-5-cs">Chybný markup: v elementu <active> chybà atribut pattern</xhtml:p> + <xhtml:p id="sch-message-6a-cs">Chybný odkaz: vzor "</xhtml:p> + <xhtml:p id="sch-message-6b-cs">" byl aktivován, ne vÅ¡ak deklarován</xhtml:p> + <xhtml:p id="sch-message-7-cs">Chybný markup: v elementu <assert> chybà atribut test</xhtml:p> + <xhtml:p id="sch-message-8-cs">Chybný markup: v elementu <report> chybà atribut test</xhtml:p> + <xhtml:p id="sch-message-9-cs">Chybný markup: v elementu <diagnostic> chybà atribut id</xhtml:p> + <xhtml:p id="sch-message-10-cs">Chybný markup: v elementu <extends> chybà atribut rule</xhtml:p> + <xhtml:p id="sch-message-11a-cs">Chybný odkaz: abstraktnà pravidlo "</xhtml:p> + <xhtml:p id="sch-message-11b-cs">" nenà definováno, aÄkoli se na nÄ odkazuje</xhtml:p> + <xhtml:p id="sch-message-12-cs">Chybný markup: v elementu <key> chybà atribut name</xhtml:p> + <xhtml:p id="sch-message-13-cs">Chybný markup: v elementu <key> chybà atribut path nebo use</xhtml:p> + <xhtml:p id="sch-message-14-cs">Chybný markup: v elementu <key> chybà atribut path nebo use</xhtml:p> + <xhtml:p id="sch-message-15-cs">Chyba ve schématu: element <key> nenà ve jmenném prostoru ISO Schematronu. Použijte jmenný prostor XSLT.</xhtml:p> + <xhtml:p id="sch-message-16-cs">Chybný markup: v elementu <function> chybà atribut name</xhtml:p> + <xhtml:p id="sch-message-17-cs">Chyba ve schématu: element <function> nenà ve jmenném prostoru ISO Schematronu. Použijte jmenný prostor XSLT.</xhtml:p> + <xhtml:p id="sch-message-18-cs">Chyba ve schématu: direktiva <include> má prázdný atribut href</xhtml:p> + <xhtml:p id="sch-message-19-cs">Chyba: Nesprávné URL v direktivÄ <include></xhtml:p> + <xhtml:p id="sch-message-20a-cs">Chyba: Nelze otevÅÃt vkládaný soubor </xhtml:p> + <xhtml:p id="sch-message-20b-cs" /> + <xhtml:p id="sch-message-21-cs">Chyba ve schématu: <include> použÃvejte ke vkládánà fragmentů, ne celého schématu</xhtml:p> + <xhtml:p id="sch-message-22-cs">Chyba ve schématu: Schémata XSD lze importovat pouze pokud použÃváte dotazovacà jazyk "xslt2"</xhtml:p> + <xhtml:p id="sch-message-23-cs">Chyba ve schématu: element <import-schema> nenà ve jmenném prostoru ISO Schematronu. Použijte jmenný prostor XSLT.</xhtml:p> + <xhtml:p id="sch-message-24-cs">VarovánÃ: S dotazovacÃm jazykem "xpath" by se nemÄly použÃvat promÄnné</xhtml:p> + <xhtml:p id="sch-message-25-cs">VarovánÃ: S dotazovacÃm jazykem "xpath2" by se nemÄly použÃvat promÄnné</xhtml:p> + <xhtml:p id="sch-message-26-cs">Chybný markup: v elementu <ns> chybà atribut uri</xhtml:p> + <xhtml:p id="sch-message-27-cs">Chybný markup: v elementu <ns> chybà atribut prefix</xhtml:p> + <xhtml:p id="sch-message-28-cs">Chyba v implementaci schématu: toto schéma obsahuje abstraktnà vzory, které vÅ¡ak již mÄly být pÅedchozÃm zpracovánÃm odstranÄny</xhtml:p> + <xhtml:p id="sch-message-29-cs">Chybný markup: v elementu <phase> chybà atribut id</xhtml:p> + <xhtml:p id="sch-message-30-cs">Chybný markup: v elementu <rule> chybà atribut context</xhtml:p> + <xhtml:p id="sch-message-31-cs">Chybný markup: v abstraktnÃm pravidlu chybà atribut id</xhtml:p> + <xhtml:p id="sch-message-32-cs">Chybný markup: (2) Abstraktnà pravidlo nesmà mÃt atribut context</xhtml:p> + <xhtml:p id="sch-message-33-cs">Chybný markup: Abstraktnà pravidlo nesmà mÃt atribut context</xhtml:p> + <xhtml:p id="sch-message-34-cs">Chybný markup: v elementu <value-of> chybà atribut select</xhtml:p> + <xhtml:p id="sch-message-35a-cs">VarovánÃ: </xhtml:p> + <xhtml:p id="sch-message-35b-cs"> nesmà obsahovat žádné podelementy</xhtml:p> + <xhtml:p id="sch-message-36a-cs">Chybný odkaz: Diagnostika "</xhtml:p> + <xhtml:p id="sch-message-36b-cs">" nebyla deklarována, aÄkoli se na ni odkazuje</xhtml:p> + <xhtml:p id="sch-message-37a-cs">Chyba: procesor </xhtml:p> + <xhtml:p id="sch-message-37b-cs"> nepodporuje použità jmenného prostoru XSLT s jiným prefixem než "xsl"</xhtml:p> + <xhtml:p id="sch-message-38a-cs">Chyba: neznámý element </xhtml:p> + <xhtml:p id="sch-message-38b-cs"> ve jmenném prostoru ISO Schematronu: zkontrolujte, je-li správnÄ zapsán</xhtml:p> + <xhtml:p id="sch-message-39a-cs">VarovánÃ: neznámý element +</xhtml:p> + <xhtml:p id="sch-message-39b-cs" /> + </xhtml:div> http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-de.xhtml ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-de.xhtml b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-de.xhtml new file mode 100644 index 0000000..51caeb1 --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-de.xhtml @@ -0,0 +1,57 @@ + +<xhtml:div class="ErrorMessages" xml:lang="en" + xmlns:xhtml="http://www.w3.org/1999/xhtml" > + <!-- Where the error message contains dynamic information, the message has been split into an "a" and a "b" section. + This has been done even when the English does not require it, in order to accomodate different language grammars + that might position the dynamic information differently. + --> + <xhtml:p id="sch-message-1-de">Fehler im Schema: Schematron Elemente sowohl im alten als auch neuen Namensraum gefunden</xhtml:p> + <xhtml:p id="sch-message-2-de">Fehler im Schema: Nutzen Sie 'xslt' im queryBinding-Attribut</xhtml:p> + <xhtml:p id="sch-message-3a-de">Fehler: Diese Implementierung von ISO Schematron arbeitet nicht mit Schemas zusammen, die die Query Language </xhtml:p> + <xhtml:p id="sch-message-3b-de">nutzen</xhtml:p> + <xhtml:p id="sch-message-4a-de">Phasenfehler: Es gibt keine Phase mit Namen </xhtml:p> + <xhtml:p id="sch-message-4b-de" /> + <xhtml:p id="sch-message-5-de">Fehler in der Annotation: Kein Attribut pattern in <active></xhtml:p> + <xhtml:p id="sch-message-6a-de">Referenzierungsfehler: Der Ausdruck "</xhtml:p> + <xhtml:p id="sch-message-6b-de">" wurde aktiviert, ist aber nicht deklariert</xhtml:p> + <xhtml:p id="sch-message-7-de">Fehler in der Annotation: Kein Attribut test in <assert</xhtml:p> + <xhtml:p id="sch-message-8-de">Fehler in der Annotation: Kein Attribut test <report></xhtml:p> + <xhtml:p id="sch-message-9-de">Fehler in der Annotation: Kein Attribut id in <diagnostic></xhtml:p> + <xhtml:p id="sch-message-10-de">Fehler in der Annotation: Kein Attribut rule in <extends></xhtml:p> + <xhtml:p id="sch-message-11a-de">Referenzierungsfehler: Die abstrakte Regel "</xhtml:p> + <xhtml:p id="sch-message-11b-de">" wurde referenziert, ist aber nicht deklariert</xhtml:p> + <xhtml:p id="sch-message-12-de">Fehler in der Annotation: Kein Attribut name in <key></xhtml:p> + <xhtml:p id="sch-message-13-de">Fehler in der Annotation: Kein Attribut path oder use in <key></xhtml:p> + <xhtml:p id="sch-message-14-de">Fehler in der Annotation: Kein Attribut path oder use in <key></xhtml:p> + <xhtml:p id="sch-message-15-de">Fehler im Schema: Das Element key ist im ISO Schematron-Namensraum nicht vorhanden. Benutzen Sie den XSLT-Namensraum.</xhtml:p> + <xhtml:p id="sch-message-16-de">Fehler in der Annotation: Kein Attribut name in <function></xhtml:p> + <xhtml:p id="sch-message-17-de">Fehler im Schema: Das Element function ist im ISO Schematron-Namensraum nicht vorhanden. Benutzen Sie den XSLT-Namensraum.</xhtml:p> + <xhtml:p id="sch-message-18-de">Fehler im Schema: Leeres Attribut href= für include Anweisung.</xhtml:p> + <xhtml:p id="sch-message-19-de">Fehler: Ungültige URL in Schematron include</xhtml:p> + <xhtml:p id="sch-message-20a-de">Kann die referenzierte Datei nicht öffnen: </xhtml:p> + <xhtml:p id="sch-message-20b-de" /> + <xhtml:p id="sch-message-21-de">Fehler im Schema: include darf nur zur Einbettung von Schemafragmenten genutzt werden, nicht für ganze Schemata</xhtml:p> + <xhtml:p id="sch-message-22-de">Fehler im Schema: XSD Schemata dürfen nur importiert werden, wenn das 'xslt2' Query Language Binding genutzt wird</xhtml:p> + <xhtml:p id="sch-message-23-de">Fehler im Schema: Das Element import-schema ist im ISO Schematron-Namensraum nicht vorhanden. Benutzen Sie den XSLT-Namensraum.</xhtml:p> + <xhtml:p id="sch-message-24-de">Warnung: Variablen sollten nicht zusammen mit dem "xpath" Query Language Binding genutzt werden.</xhtml:p> + <xhtml:p id="sch-message-25-de">Warnung: Variablen sollten nicht zusammen mit dem "xpath2" Query Language Binding genutzt werden.</xhtml:p> + <xhtml:p id="sch-message-26-de">Fehler in der Annotation: Fehlendes Attiribut uri in <ns></xhtml:p> + <xhtml:p id="sch-message-27-de">Fehler in der Annotation: Fehlendes Attribut prefix in <ns></xhtml:p> + <xhtml:p id="sch-message-28-de">Fehler bei der Schemaimplementierung: Dieses Schema enthält abstrakte Mustervergleiche, die bereits vorverarbeitet sein sollten.</xhtml:p> + <xhtml:p id="sch-message-29-de">Fehler in der Annotation: Fehlendes Attiribut id in <phase></xhtml:p> + <xhtml:p id="sch-message-30-de">Fehler in der Annotation: Fehlendes Attiribut context in <rule></xhtml:p> + <xhtml:p id="sch-message-31-de">Fehler in der Annotation: Fehlendes Attiribut id on abstract <rule></xhtml:p> + <xhtml:p id="sch-message-32-de">Fehler in der Annotation: (2) context attribute on abstract <rule></xhtml:p> + <xhtml:p id="sch-message-33-de">Fehler in der Annotation: Attribut context bei abstrakter <rule></xhtml:p> + <xhtml:p id="sch-message-34-de">Fehler in der Annotation: Fehlendes Attiribut select in <value-of></xhtml:p> + <xhtml:p id="sch-message-35a-de">Warnung: </xhtml:p> + <xhtml:p id="sch-message-35b-de"> darf keine Kindelemente beinhalten</xhtml:p> + <xhtml:p id="sch-message-36a-de">Referenzierungsfehler: Ein diagnostic-Element "</xhtml:p> + <xhtml:p id="sch-message-36b-de">" wurde referenziert, ist aber nicht deklariert</xhtml:p> + <xhtml:p id="sch-message-37a-de">Der Gebrauch des XSLT-Namensraums mit einem anderen Präfix als "xsl" in Schematron-Regeln wird von diesem Prozessor nicht unterstützt:</xhtml:p> + <xhtml:p id="sch-message-37b-de" /> + <xhtml:p id="sch-message-38a-de">Fehler: Unbekanntes Element im ISO Schematron-Namensraum: Ãberprüfen Sie die Schreibweise (inkl. GroÃ- und Kleinschreibung)</xhtml:p> + <xhtml:p id="sch-message-38b-de" /> + <xhtml:p id="sch-message-39a-de">Warnung: Unbekanntes Element </xhtml:p> + <xhtml:p id="sch-message-39b-de" /> + </xhtml:div> http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-en.xhtml ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-en.xhtml b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-en.xhtml new file mode 100644 index 0000000..6f777ed --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-en.xhtml @@ -0,0 +1,57 @@ + +<xhtml:div class="ErrorMessages" xml:lang="en" + xmlns:xhtml="http://www.w3.org/1999/xhtml" > + <!-- Where the error message contains dynamic information, the message has been split into an "a" and a "b" section. + This has been done even when the English does not require it, in order to accomodate different language grammars + that might position the dynamic information differently. + --> + <xhtml:p id="sch-message-1-en">Schema error: Schematron elements in old and new namespaces found</xhtml:p> + <xhtml:p id="sch-message-2-en">Schema error: in the queryBinding attribute, use 'xslt'</xhtml:p> + <xhtml:p id="sch-message-3a-en">Fail: This implementation of ISO Schematron does not work with schemas using the query language </xhtml:p> + <xhtml:p id="sch-message-3b-en"/> + <xhtml:p id="sch-message-4a-en">Phase Error: no phase has been defined with name </xhtml:p> + <xhtml:p id="sch-message-4b-en" /> + <xhtml:p id="sch-message-5-en">Markup Error: no pattern attribute in <active></xhtml:p> + <xhtml:p id="sch-message-6a-en">Reference Error: the pattern "</xhtml:p> + <xhtml:p id="sch-message-6b-en">" has been activated but is not declared</xhtml:p> + <xhtml:p id="sch-message-7-en">Markup Error: no test attribute in <assert></xhtml:p> + <xhtml:p id="sch-message-8-en">Markup Error: no test attribute in <report></xhtml:p> + <xhtml:p id="sch-message-9-en">Markup Error: no id attribute in <diagnostic></xhtml:p> + <xhtml:p id="sch-message-10-en">Markup Error: no rule attribute in <extends></xhtml:p> + <xhtml:p id="sch-message-11a-en">Reference Error: the abstract rule "</xhtml:p> + <xhtml:p id="sch-message-11b-en">" has been referenced but is not declared</xhtml:p> + <xhtml:p id="sch-message-12-en">Markup Error: no name attribute in <key></xhtml:p> + <xhtml:p id="sch-message-13-en">Markup Error: no path or use attribute in <key></xhtml:p> + <xhtml:p id="sch-message-14-en">Markup Error: no path or use attribute in <key></xhtml:p> + <xhtml:p id="sch-message-15-en">Schema error: The <key> element is not in the ISO Schematron namespace. Use the XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-16-en">Markup Error: no name attribute in <function></xhtml:p> + <xhtml:p id="sch-message-17-en">Schema error: The <function> element is not in the ISO Schematron namespace. Use the XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-18-en">Schema error: Empty href attribute for <include> directive.</xhtml:p> + <xhtml:p id="sch-message-19-en">Error: Impossible URL in Schematron <include></xhtml:p> + <xhtml:p id="sch-message-20a-en">Error: Unable to open referenced included file: </xhtml:p> + <xhtml:p id="sch-message-20b-en" /> + <xhtml:p id="sch-message-21-en">Schema error: Use <include> to include fragments, not a whole schema</xhtml:p> + <xhtml:p id="sch-message-22-en">Schema error: XSD schemas may only be imported if you are using the 'xslt2' query language binding</xhtml:p> + <xhtml:p id="sch-message-23-en">Schema error: The <import-schema> element is not available in the ISO Schematron namespace. Use the XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-24-en">Warning: Variables should not be used with the "xpath" query language binding.</xhtml:p> + <xhtml:p id="sch-message-25-en">Warning: Variables should not be used with the "xpath2" query language binding.</xhtml:p> + <xhtml:p id="sch-message-26-en">Markup Error: no uri attribute in <ns></xhtml:p> + <xhtml:p id="sch-message-27-en">Markup Error: no prefix attribute in <ns></xhtml:p> + <xhtml:p id="sch-message-28-en">Schema implementation error: This schema has abstract patterns, yet they are supposed to be preprocessed out already</xhtml:p> + <xhtml:p id="sch-message-29-en">Markup Error: no id attribute in <phase></xhtml:p> + <xhtml:p id="sch-message-30-en">Markup Error: no context attribute in <rule></xhtml:p> + <xhtml:p id="sch-message-31-en">Markup Error: no id attribute on abstract <rule></xhtml:p> + <xhtml:p id="sch-message-32-en">Markup Error: (2) context attribute on abstract <rule></xhtml:p> + <xhtml:p id="sch-message-33-en">Markup Error: context attribute on abstract <rule></xhtml:p> + <xhtml:p id="sch-message-34-en">Markup Error: no select attribute in <value-of></xhtml:p> + <xhtml:p id="sch-message-35a-en">Warning: </xhtml:p> + <xhtml:p id="sch-message-35b-en"> must not contain any child elements</xhtml:p> + <xhtml:p id="sch-message-36a-en">Reference error: A diagnostic "</xhtml:p> + <xhtml:p id="sch-message-36b-en">" has been referenced but is not declared</xhtml:p> + <xhtml:p id="sch-message-37a-en">Warning: Using the XSLT namespace with a prefix other than "xsl" in Schematron rules is not supported in this processor:</xhtml:p> + <xhtml:p id="sch-message-37b-en" /> + <xhtml:p id="sch-message-38a-en">Error: unrecognized element in ISO Schematron namespace: check spelling and capitalization</xhtml:p> + <xhtml:p id="sch-message-38b-en" /> + <xhtml:p id="sch-message-39a-en">Warning: unrecognized element </xhtml:p> + <xhtml:p id="sch-message-39b-en" /> + </xhtml:div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-fr.xhtml ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-fr.xhtml b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-fr.xhtml new file mode 100644 index 0000000..a797db7 --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-fr.xhtml @@ -0,0 +1,54 @@ +<xhtml:div class="ErrorMessages" xml:lang="fr" xmlns:xhtml="http://www.w3.org/1999/xhtml"> + <!-- Where the error message contains dynamic information, the message has been split into an "a" and a "b" section. + This has been done even when the English does not require it, in order to accomodate different language grammars + that might position the dynamic information differently. + --> + <xhtml:p id="sch-message-1-fr">Erreur de schema: éléments Schematron à la fois dans l'ancien et le nouveau namespace</xhtml:p> + <xhtml:p id="sch-message-2-fr">Erreur de schema: utilisez 'xslt' dans l'attribut queryBinding</xhtml:p> + <xhtml:p id="sch-message-3a-fr">Ãchec: Cette implémentation de Schematron ISO ne fonctionne pas avec des schemas utilisant le langage de query </xhtml:p> + <xhtml:p id="sch-message-3b-fr"/> + <xhtml:p id="sch-message-4a-fr">Erreur de phase: aucune phase n'a été définie avec le nom </xhtml:p> + <xhtml:p id="sch-message-4b-fr"/> + <xhtml:p id="sch-message-5-fr">Erreur de balisage: pas d'attribut pattern dans <active></xhtml:p> + <xhtml:p id="sch-message-6a-fr">Erreur de référence: le pattern "</xhtml:p> + <xhtml:p id="sch-message-6b-fr">" a été activé mais n'a pas été décalaré</xhtml:p> + <xhtml:p id="sch-message-7-fr">Erreur de balisage: pas d'attribut test dans <assert></xhtml:p> + <xhtml:p id="sch-message-8-fr">Erreur de balisage: pas d'attribut test dans <report></xhtml:p> + <xhtml:p id="sch-message-9-fr">Erreur de balisage: pas d'attribut id dans <diagnostic></xhtml:p> + <xhtml:p id="sch-message-10-fr">Erreur de balisage: pas d'attribut rule dans <extends></xhtml:p> + <xhtml:p id="sch-message-11a-fr">Erreur de référence: la règle abstraite "</xhtml:p> + <xhtml:p id="sch-message-11b-fr">" a été référencée mais pas déclarée</xhtml:p> + <xhtml:p id="sch-message-12-fr">Erreur de balisage: pas d'attribut name dans <key></xhtml:p> + <xhtml:p id="sch-message-13-fr">Erreur de balisage: pas d'attribut path ou use dans <key></xhtml:p> + <xhtml:p id="sch-message-15-fr">Erreur de schema: L'élément key n'est pas dans le namespace Schematron ISO. Utilisez le namespace XSLT.</xhtml:p> + <xhtml:p id="sch-message-16-fr">Erreur de balisage: pas d'attribut name dans <function></xhtml:p> + <xhtml:p id="sch-message-17-fr">Erreur de schema: L'élément function n'est pas dans le namespace Schematron ISO. Utilisez le namespace XSLT.</xhtml:p> + <xhtml:p id="sch-message-18-fr">Erreur de schema: Attribut href vide sur a directive include.</xhtml:p> + <xhtml:p id="sch-message-19-fr">Erreur: URL impossible dans la directive include de Schematron</xhtml:p> + <xhtml:p id="sch-message-20a-fr">Impossible d'ouvrir le fichier référencé pour l'inclusion: </xhtml:p> + <xhtml:p id="sch-message-20b-fr"/> + <xhtml:p id="sch-message-21-fr">Erreur de schema: Utilisez include pour inclure des fragments et non un schema entier</xhtml:p> + <xhtml:p id="sch-message-22-fr">Erreur de schema: Les schema XSD peuvent être importés seulement si vous utilisez the langage de query 'xslt2'</xhtml:p> + <xhtml:p id="sch-message-23-fr">Erreur de schema: L'élément import-schema n'est pas disponible dans le namespace Schematron ISO. Utilisez le namespace XSLT.</xhtml:p> + <xhtml:p id="sch-message-24-fr">Avertissement: Des variables ne devraient pas être utiliées avec le langage de query "xpath".</xhtml:p> + <xhtml:p id="sch-message-24-fr">Avertissement: Des variables ne devraient pas être utiliées avec le langage de query "xpath2".</xhtml:p> + <xhtml:p id="sch-message-26-fr">Erreur de balisage: pas d'attribut uri dans <ns></xhtml:p> + <xhtml:p id="sch-message-27-fr">Erreur de balisage: pas d'attribut prefix dans <ns></xhtml:p> + <xhtml:p id="sch-message-28-fr">Erreur d'implémentation de schema: Ce schema des patterns abstraits, bien qu'ils sont supposés avoir été préprocessés précédemment</xhtml:p> + <xhtml:p id="sch-message-29-fr">Erreur de balisage: pas d'attribut id dans <phase></xhtml:p> + <xhtml:p id="sch-message-30-fr">Erreur de balisage: pas d'attribut context dans <rule></xhtml:p> + <xhtml:p id="sch-message-31-fr">Erreur de balisage: pas d'attribut id dans <rule></xhtml:p> + <xhtml:p id="sch-message-32-fr">Erreur de balisage: (2) attribut context dans une <rule> abstraite</xhtml:p> + <xhtml:p id="sch-message-33-fr">Erreur de balisage: attribut context dans une <rule> abstraite</xhtml:p> + <xhtml:p id="sch-message-34-fr">Erreur de balisage: pas d'attribut select dans <value-of></xhtml:p> + <xhtml:p id="sch-message-35a-fr">Avertissement: </xhtml:p> + <xhtml:p id="sch-message-35b-fr"> ne peut contenir aucun élément enfant</xhtml:p> + <xhtml:p id="sch-message-36a-fr">Erreur de référence: Un diagnostique "</xhtml:p> + <xhtml:p id="sch-message-36b-fr">" a été référencé mais n'est pas déclaré</xhtml:p> + <xhtml:p id="sch-message-37a-fr">Utiliser the namespace XSLT avec un autre préfixe que "xsl" dans les rules Schematron n'est pas supporté par ce processor:</xhtml:p> + <xhtml:p id="sch-message-37b-fr"/> + <xhtml:p id="sch-message-38a-fr">Erreur: élément inconnu dans le namespace Schematron ISO: vérifiez l'orthographe et la casse</xhtml:p> + <xhtml:p id="sch-message-38b-fr"/> + <xhtml:p id="sch-message-39a-fr">Avertissement: élément inconnu</xhtml:p> + <xhtml:p id="sch-message-39b-fr"/> +</xhtml:div> http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-nl.xhtml ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-nl.xhtml b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-nl.xhtml new file mode 100644 index 0000000..5f05577 --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/sch-messages-nl.xhtml @@ -0,0 +1,58 @@ + <xhtml:div class="ErrorMessages" xml:lang="nl" xmlns:xhtml="http://www.w3.org/1999/xhtml"> + <!-- Where the error message contains dynamic information, the message has been split into an "a" and a "b" section. + This has been done even when the English does not require it, in order to accomodate different language grammars + that might position the dynamic information differently. + --> + <xhtml:p id="sch-message-1-nl">Schema fout: er werden Schematron elementen uit de oude en nieuwe + namespace gevonden</xhtml:p> + <xhtml:p id="sch-message-2-nl">Schema fout: gebruik 'xslt' in het queryBinding attribute</xhtml:p> + <xhtml:p id="sch-message-3a-nl">Faling: Deze implementatie van ISO Schematron werkt niet met + schemas die gebruik maken van de query language </xhtml:p> + <xhtml:p id="sch-message-3b-nl"/> + <xhtml:p id="sch-message-4a-nl">Fase fout: er is geen 'phase' gedefinieerd met naam </xhtml:p> + <xhtml:p id="sch-message-4b-nl"/> + <xhtml:p id="sch-message-5-nl">Markup fout: er is geen 'pattern' attribuut in <active></xhtml:p> + <xhtml:p id="sch-message-6a-nl">Referentie fout: het 'pattern' "</xhtml:p> + <xhtml:p id="sch-message-6b-nl">" is geactiveerd maar niet gedeclareerd</xhtml:p> + <xhtml:p id="sch-message-7-nl">Markup fout: er is geen 'test' attribuut in <assert</xhtml:p> + <xhtml:p id="sch-message-8-nl">Markup fout: er is geen 'test' attribuut in <report></xhtml:p> + <xhtml:p id="sch-message-9-nl">Markup fout: er is geen 'id' attribuut in <diagnostic></xhtml:p> + <xhtml:p id="sch-message-10-nl">Markup fout: er is geen 'rule' attribuut in <extends></xhtml:p> + <xhtml:p id="sch-message-11a-nl">Referentie fout: de abstracte regel "</xhtml:p> + <xhtml:p id="sch-message-11b-nl">" werd gerefereerd maar niet gedeclareerd</xhtml:p> + <xhtml:p id="sch-message-12-nl">Markup fout: er is geen 'name' attribuut in <key></xhtml:p> + <xhtml:p id="sch-message-13-nl">Markup fout: er is geen 'path' of 'use' attribuut in <key></xhtml:p> + <xhtml:p id="sch-message-14-nl">Markup fout: er is geen 'path' of 'use' attribuut in <key></xhtml:p> + <xhtml:p id="sch-message-15-nl">Schema fout: Het 'key' element zit niet in de ISO Schematron namespace. Gebruik de XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-16-nl">Markup fout: er is geen 'name' attribuut in <function></xhtml:p> + <xhtml:p id="sch-message-17-nl">Schema fout: Het 'function' element zit niet in de ISO Schematron namespace. Gebruik de XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-18-nl">Schema fout: Leeg 'href=' attribuut bij de include opdracht.</xhtml:p> + <xhtml:p id="sch-message-19-nl">Fout: Onmogelijke URL gebruikt bij de Schematron include</xhtml:p> + <xhtml:p id="sch-message-20a-nl">Kan de gerefereerde 'include' file niet openen: </xhtml:p> + <xhtml:p id="sch-message-20b-nl"/> + <xhtml:p id="sch-message-21-nl">Schema fout: Gebruik include om fragmenten op te nemen, niet een volledig schema</xhtml:p> + <xhtml:p id="sch-message-22-nl">Schema fout: XSD schemas kunnen enkel geïmporteerd worden indien de 'xslt2' query language binding gebruikt is</xhtml:p> + <xhtml:p id="sch-message-23-nl">Schema fout: Het 'import-schema' element is niet beschikbaar in the ISO Schematron namespace. Gebruik de XSLT namespace.</xhtml:p> + <xhtml:p id="sch-message-24-nl">Waarschuwing: Variabelen niet gebruiken met de "xpath" query language binding.</xhtml:p> + <xhtml:p id="sch-message-25-nl">Waarschuwing: Variabelen niet gebruiken met de "xpath2" query language binding.</xhtml:p> + <xhtml:p id="sch-message-26-nl">Markup fout: er is geen 'uri' attribute in <ns></xhtml:p> + <xhtml:p id="sch-message-27-nl">Markup fout: er is geen 'prefix' attribute in <ns></xhtml:p> + <xhtml:p id="sch-message-28-nl">Schema implementatie fout: Dit schema heeft abstracte patronen, die al gepreprocessed zouden moeten zijn</xhtml:p> + <xhtml:p id="sch-message-29-nl">Markup fout: er is geen 'id' attribuut in <phase></xhtml:p> + <xhtml:p id="sch-message-30-nl">Markup fout: er is geen 'context' attribuut in <rule></xhtml:p> + <xhtml:p id="sch-message-31-nl">Markup fout: er is geen 'id' attribuut op abstracte <rule></xhtml:p> + <xhtml:p id="sch-message-32-nl">Markup fout: (2) context attributen op abstracte <rule></xhtml:p> + <xhtml:p id="sch-message-33-nl">Markup fout: context attribuut op abstracte <rule></xhtml:p> + <xhtml:p id="sch-message-34-nl">Markup fout: er is geen 'select' attribute in <value-of></xhtml:p> + <xhtml:p id="sch-message-35a-nl">Waarschuwing: </xhtml:p> + <xhtml:p id="sch-message-35b-nl"> mag geen kind elementen bevatten</xhtml:p> + <xhtml:p id="sch-message-36a-nl">Referentie fout: Een diagnostic "</xhtml:p> + <xhtml:p id="sch-message-36b-nl">" werd gerefereerd maar is niet gedeclareerd.</xhtml:p> + <xhtml:p id="sch-message-37a-nl">Het gebruik van de XSLT namespace met een prefix verschillend + van "xsl" in Schematron regels wordt niet ondersteund in deze processor:</xhtml:p> + <xhtml:p id="sch-message-37b-nl"/> + <xhtml:p id="sch-message-38a-nl">Fout: een niet herkend element in de ISO Schematron namespace: check spelling en hoofdlettergebruik</xhtml:p> + <xhtml:p id="sch-message-38b-nl"/> + <xhtml:p id="sch-message-39a-nl">Waarschuwing: een niet herkend element </xhtml:p> + <xhtml:p id="sch-message-39b-nl"/> +</xhtml:div> http://git-wip-us.apache.org/repos/asf/camel/blob/a07d71fe/components/camel-schematron/src/main/resources/iso-schematron-xslt2/schematron-skeleton-api.htm ---------------------------------------------------------------------- diff --git a/components/camel-schematron/src/main/resources/iso-schematron-xslt2/schematron-skeleton-api.htm b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/schematron-skeleton-api.htm new file mode 100644 index 0000000..af81377 --- /dev/null +++ b/components/camel-schematron/src/main/resources/iso-schematron-xslt2/schematron-skeleton-api.htm @@ -0,0 +1,723 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<HEAD> + <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> + <TITLE>The ISO Schematron Skeleton API</TITLE> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Win32)"> + <META NAME="CREATED" CONTENT="0;0"> + <META NAME="CHANGED" CONTENT="20080808;2200065"> +</HEAD> +<BODY LANG="en-AU" DIR="LTR"> +<H1>API for ISO Schematron Skeleton</H1> +<H2><BR><BR> +</H2> +<P>Rick Jelliffe, 2010/04/14</P> +<P>This document provides documentation on the XSLT API available in +the implementation of Schematron called <TT>iso_schematron_skeleton.xsl</TT>. +(available in an XSLT1 and XSLT2 version). The API makes available as +much information from the schema, however there may be some edge +cases where it is not exhaustive. +</P> +<P>The <I>skeleton</I> is an XSLT script which provides all the basic +parsing and validating routines for compiling a Schematron schema +into XSLT. Schematron was designed to allow many different uses, and +the skeleton gives you a headstart in creating a customized +implementation. You just need to write XSLT templates to override the +default ones. (The program you write is sometimes called a +<I>meta-stylesheet</I>.) It is the meta-stylesheet that is called +as the XSLT script, not the skeleton. There are several +pre-processing stages which the Schematron schema should be processed +through first, to handle such things as include statements and +abstract patterns. +</P> +<P>Phases and error reporting for problems in the schema itself are +handled by the skeleton with no interaction with a “meta-stylesheet”. +Note that there is no guarantee that the context node is always the +element being handled: in most cases the only information available +is the information in the parameters. +</P> +<P>For an introductory tutorial on using this API, see Bob DuCharme's +<A HREF="http://www.xml.com/pub/a/2004/10/05/tr.html">Schematron 1.5: +Looking Under the Hood</A> +</P> +<H1>Superset of API for Schematron 1.5 and 1.6</H1> +<P>(This is an updated version of the API for the Schematron 1.5 +implementation called <TT>skeleton1-5.xsl</TT>, which in turn comes +from the <I>new architecture</I> contributed by Oliver Becker for +Schematron 1.3.)</P> +<P>The current API contains only additions. Well-written +meta-stylesheets that use the new API will be be able to run on the +existing 1.5 and 1.6 skeletons. Similarly, it should be possible to +upgrade the skeleton from 1.5 or 1.6 to the iso-schematron-skeleton +only by correcting the import statement at the beginning of the +meta-stylsheet. Additions or re-groupings from the 1.5 schema are +shown in red. Deletions have overstrike.</P> +<P>Mooted addition: a parameter @action which for specifying +processing instructions on assertions and reports.</P> +<HR> +<H2><TT>process-prolog</TT></H2> +<P>The <TT>process-prolog</TT> template gets called at the start of +the validation session. It has no parameters. The default +implementation is no action.</P> +<HR> +<H2><TT>process-root</TT></H2> +<P>The <TT>process-root</TT> template processes the root element of +the schema (which is not the same thing as the root of the document / +and need not be the document element /*) .</P> +<DL> + <DT><TT><I>node-list</I></TT><TT> $contents</TT> + </DT><DT> + <TT><I>string</I></TT><TT> $schemaVersion</TT> + </DT><DD> + The version of the schema, perhaps a datestamp. + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"xslt" | "xpath" | + "xslt2" | ...</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $queryBinding</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The query language binding. </FONT> + </DD><DT> + <TT><I>string</I></TT><TT> $title</TT> + </DT><DD> + The title of this schema + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"iso" | "1.5" | + "1.6" | ...</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $version</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The version of Schematron being used. </FONT> + </DD></DL> +<P> +Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for the + </FONT><TT><FONT COLOR="#ff0000">schema</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this schema. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this schema, from + xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">Link to documentation on WWW or file </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD></DL> +<P> +To print the documentation paragraphs, use <TT><xsl:apply-templates +mode="do-schema-p" /></TT></P> +<P>To output the results, use <TT><xsl:copy-of select="$contents" +/></TT></P> +<HR> +<H2><TT>process-assert</TT></H2> +<P>The <TT>process-assert</TT> template handles asserts whose test +has failed. +</P> +<DL> + <DT><TT><I>XPath</I></TT><TT> $test</TT> + </DT><DD> + The test + </DD><DT> + <TT><I>XML IDREFS</I></TT><TT> $diagnostics</TT> + </DT><DD> + A list of the idrefs diagnostic elements related to the current + assertion + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML NMTOKEN</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $flag</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The name of a flag that becomes true because + this assertion fails. The flag is true for the document if it is + flagged true on any assertion. For compatability, this parameter + should not be used with Schematron 1.5.</FONT> + </DD></DL> +<P> +Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for the + </FONT><TT><FONT COLOR="#ff0000">assert</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this + assertion. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this assertion, + from xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">Link to documentation on WWW or file </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD></DL> +<P> +Linking properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML NMTOKEN</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $role</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">A name for the generic role of this assertion. + The schema creator would have their own vocabulary. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XPath</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $subject</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">A path relative to the current context to some + interesting node considered the subject. </FONT> + </DD></DL> +<P> +To print the text contents, use <TT><xsl:apply-templates +mode="text" /></TT></P> +<HR> +<H2><TT>process-diagnostic</TT></H2> +<P>The <TT>process-diagnostic</TT> template handles diagnostic +messages for <TT>assert</TT> statements that have failed and <TT>report</TT> +statements that have succeeded. The diagnostics are evaluated in the +context of the rule.</P> +<P>Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for the + </FONT><TT><FONT COLOR="#ff0000">assert</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this + assertion. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this assertion, + from xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">Link to documentation on WWW or file </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD><HR> +</DL> +<H2><TT>process-dir</TT></H2> +<P>The <TT>process-dir</TT> template handles bi-directionality +markup, which is only needed by certain human scripts such as Arabic.</P> +<DL> + <DT><TT><I>"ltr" or "rtl" or ""</I></TT><TT> + $value</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + Left-to-right or right-to-left or unspecified + </DD><HR> +</DL> +<H2><TT>process-emph</TT></H2> +<P>The <TT>process-emph</TT> template handles the markup of +emphasized text in paragraphs, assertions and diagnostics. It has no +parameters.</P> +<HR> +<H2><TT>process-message</TT></H2> +<P>The <TT>process-message</TT> handles default outputing of text.</P> +<DL> + <DT><TT><I>string</I></TT><TT> $pattern</TT> + </DT><DD> + Some text that may be some kind of pattern + </DD><DT> + <TT><I>string</I></TT><TT> $role</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + Some text that may be some kind of role + </DD><HR> +</DL> +<H2><TT>process-name</TT></H2> +<P>The <TT>process-name</TT> templates handle name strings that can +be used in assertions. <TT>asssert</TT> and <TT>report</TT> only +provide <TT>name</TT> subelements rather than the more general +<TT>value-of</TT> elements to encourage plain language and generic +descriptions rather than specific diagnostics, for which purpose the +<TT>diagnostics</TT> elements are used.</P> +<DL> + <DT><TT><I>string</I></TT><TT> $name</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + The name of the current element, or of the node specified by a <TT>name</TT> + element + </DD><HR> +</DL> +<H2><TT>process-ns</TT></H2> +<P>The <TT>process-ns</TT> template reports on <TT>ns</TT> +declarations, which are used to transmit on namespace information by +the skeleton.</P> +<DL> + <DT><TT><I>Namespace NCName</I></TT><TT> $prefix</TT> + </DT><DD> + The prefix of a namespace + </DD><DT> + <TT><I>XML SystemId</I></TT><TT> $uri</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + The (internationalized) URI Reference of a namespace + </DD><HR> +</DL> +<H2><TT>process-p</TT></H2> +<P>The <TT>process-p</TT> template handles paragraphs.</P> +<DL> + <DT><TT><I>XML NMTOKEN</I></TT><TT> $class</TT> + </DT><DD> + An attribute that can be used for stylesheet style + </DD><DT> + <TT><I>XML ID</I></TT><TT> $id</TT> + </DT><DD> + The unique identifier with the schema for the <TT>p</TT> element. + </DD><DT> + <TT><I>XML SystemId</I></TT><TT> $icon</TT> + </DT><DD> + The URI of an icon + </DD><DT> + <TT><I>IETF Language</I></TT><TT> $lang</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + The human language used in this paragraph + </DD></DL> +<P> +To print the text contents, use <TT><xsl:apply-templates +mode="text" /></TT> +</P> +<HR> +<H2><TT>process-pattern</TT></H2> +<P>The <TT>process-pattern</TT> reports on the start of evaluation of +a <TT>pattern</TT> element.</P> +<DL> + <DT><TT><I>string</I></TT><TT> $name</TT> + </DT><DD> + The title of the current pattern + </DD><DT> + <TT><I>XML NCNAMES</I></TT><TT> $is-a</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + Empty or not provided if the pattern is not derived from an abstract + pattern. Otherwise the name of the abstract pattern. A list may be + used if there was a sequence of abstract patterns. + </DD></DL> +<P> +Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for the + </FONT><TT><FONT COLOR="#ff0000">pattern</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this pattern. + </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this pattern, from + xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">A (internationalized) URI reference to some + supporting or defining documentation </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD></DL> +<P> +To print the documentation contents, use <TT><xsl:apply-templates +mode="do-pattern-p"/></TT></P> +<HR> +<H2><TT>process-report</TT></H2> +<P>The <TT>process-report</TT> template handles <TT>report</TT> whose +test has succeeded. +</P> +<DL> + <DT><TT><I>XPath</I></TT><TT> $test</TT> + </DT><DD> + The test + </DD><DT> + <TT><I>XML IDREFS</I></TT><TT> $diagnostics</TT> + </DT><DD> + A list of the diagnostic elements related to the current assertion + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML NMTOKEN</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $flag</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The name of a flag that becomes true because + this assertion fails. The flag is true for the document if it is + flagged true on any assertion. For compatability, this parameter + should not be used with Schematron 1.5.</FONT> + </DD></DL> +<P> +Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for the + </FONT><TT><FONT COLOR="#ff0000">report</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this report. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this report, from + xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">Link to documentation on WWW or file </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD></DL> +<P> +Linking properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML NMTOKEN</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $role</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">A name for the generic role of this assertion. + The schema creator would have their own vocabulary. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XPath</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $subject</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">A path relative to the current context to some + interesting node considered the subject. </FONT> + </DD></DL> +<P> +To print the text contents, use <TT><xsl:apply-templates +mode="text" /></TT></P> +<HR> +<H2><TT>process-rule</TT></H2> +<P>The <TT>process-rule</TT> reports that a <TT>rule</TT> element has +fired: its <TT>context</TT> attribute matched some nodes. .</P> +<DL> + <DT><TT><I>XSLT expression</I></TT><TT> $context</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + The expression that gives the context of the current + </DD></DL> +<P> +Rich properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML SystemId</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $icon</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The URI of an icon </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XML ID</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $id</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The unique identifier with the schema for this + </FONT><TT><FONT COLOR="#ff0000">rule</FONT></TT><FONT COLOR="#ff0000"> + element. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>SGML FPI</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $fpi</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The Formal Public Identifier for this rule. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>IETF language</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $lang</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">The human language used in this rule, from + xml:lang </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>URL</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $see</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">Link to documentation on WWW or file </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>"preserve" | "default"</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $space</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">The value for xml:space </FONT> + </DD></DL> +<P> +Linking properties:</P> +<DL> + <DT><TT><FONT COLOR="#ff0000"><I>XML NMTOKEN</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $role</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD> + <FONT COLOR="#ff0000">A name for the generic role of this assertion. + The schema creator would have their own vocabulary. </FONT> + </DD><DT> + <TT><FONT COLOR="#ff0000"><I>XPath</I></FONT></TT><TT><FONT COLOR="#ff0000"> + $subject</FONT></TT><FONT COLOR="#ff0000"> </FONT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + <FONT COLOR="#ff0000">A path relative to the current context to some + interesting node considered the subject. </FONT> + </DD><HR> +</DL> +<H2><TT>process-span</TT></H2> +<P>The <TT>process-span</TT> handles span elements, which are generic +elements for styling, like HTML's .</P> +<DL> + <DT><TT><I>XML NMTOKEN</I></TT><TT> $class</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + An attribute that can be used for stylesheet style + </DD><HR> +</DL> +<H2><TT>process-title</TT></H2> +<P>The <TT>process-title</TT> handles title elements, which are +generic elements for styling, like HTML's .</P> +<DL> + <DT><TT><I>XML NMTOKEN</I></TT><TT> $class</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + An attribute that can be used for stylesheet style + </DD></DL> +<P> +By default, titles are handled by invocing <TT>process-p</TT> with +the parameter class with a value "title".</P> +<HR> +<H2><TT>process-value-of</TT></H2> +<P>The <TT>process-value-of</TT> template handles <TT>value-of</TT> +elements, which are used in diagnostic messages to allow very +specific hinting .</P> +<DL> + <DT><TT><I>XPath</I></TT><TT> $select</TT> + </DT><DD STYLE="margin-bottom: 0.5cm"> + The path of some node that will be evaluated and printed.</DD><HR> +</DL> +<H1>Global Parameters</H1> +<P>There are several global parameters that may be available for use. +However, it is not a requirement to follow these, and implementations +may not supply them with any value. So a test of +string-length(<I>variable</I><SPAN STYLE="font-style: normal">) < +0 is appropriate in each case.</SPAN></P> +<P><BR><BR> +</P> +<TABLE WIDTH=557 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=1 CELLSPACING=0> + <COL WIDTH=132> + <COL WIDTH=77> + <COL WIDTH=340> + <TR> + <TD WIDTH=132> + <P ALIGN=CENTER><FONT SIZE=2><B>Parameter</B></FONT></P> + </TD> + <TD WIDTH=77> + <P ALIGN=CENTER><FONT SIZE=2><B>Value</B></FONT></P> + </TD> + <TD WIDTH=340> + <P ALIGN=CENTER><FONT SIZE=2><B>Description</B></FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>allow-foreign</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>"true" | "false" (default) </FONT> + </P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>Pass non-Schematron elements to the generated + stylesheet. Pass the Schematron elements span, emph and dir: to + the output SVRL. </FONT> + </P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>fileNameParameter</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>string</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>A parameter passed to the Validator and + potentially available as a variable in Schematron schemas as + $fileNameParameter</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>fileDirParameter</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>string</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>A parameter passed to the Validator and + potentially available as a variable in Schematron schemas as + $fileDirParameter</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>archiveNamePaameter</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>string</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>A parameter passed to the Validator and + potentially available as a variable in Schematron schemas as + $archiveNameParameter</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>archiveDirParameter</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>string</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>A parameter passed to the Validator and + potentially available as a variable in Schematron schemas as + $archivePathParameter</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>debug </FONT> + </P> + </TD> + <TD WIDTH=77> + <P>“<FONT SIZE=2>true” | “false” (default)</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>Verbose error messages (Note this may be + superceded by “verbose” at some stage in the future.)</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>generate-paths</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>true|false </FONT> + </P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>generate the SVRL @location attribute with XPaths</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>diagnose</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>yes | no </FONT> + </P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>Add the diagnostics to the assertion results</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><A NAME="DDE_LINK"></A><FONT SIZE=2>terminate</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>yes | no | true | false | assert</FONT> + </P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>Terminate on the first failed assertion or + successful report</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>message-newline </FONT> + </P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>"true" (default) | "false" </FONT> + </P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>Generate an extra newline at the end of messages</FONT></P> + </TD> + </TR> + <TR> + <TD WIDTH=132> + <P><FONT SIZE=2>output-encoding</FONT></P> + </TD> + <TD WIDTH=77> + <P><FONT SIZE=2>string</FONT></P> + </TD> + <TD WIDTH=340> + <P><FONT SIZE=2>The encoding used for output, for example if the + output is XML</FONT></P> + </TD> + </TR> +</TABLE> +<DL> + <DD STYLE="margin-bottom: 0.5cm"> + </DD></DL> +</BODY> +</HTML> \ No newline at end of file
