[ISO schematron] "Validation with" function
Posted: Tue Mar 23, 2010 8:58 pm
Hello,
Trying to validate the following xml file
With the following ISO schmatron schema:
through the "Document->Validate->Validate with..." function brings up the following error messages:
Theses rules works perfectly with other applications, or when embedded in a relaxng schema.
Sounds like the functions is not using the proper XSL for transforming the schamtron rules.
Or am I missing a option/feature?
Thanks in advance.
P.S: working example embedded in rng schema
Trying to validate the following xml file
Code: Select all
<production >
<a.revisionconfig status='in-distribution'/>
</production>
Code: Select all
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<choice>
<element name="production">
<element name="a.revisionconfig">
<attribute name="status"></attribute>
<attribute name="pin"></attribute>
</element>
</element>
</choice>
</start>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" >
<sch:pattern id="is_prodution">
<sch:let name="isFullManualValidation" value="boolean(//production)"/>
</sch:pattern>
<sch:pattern>
<sch:rule context="//a.revisionconfig[$isFullManualValidation] | //a.sourcerevision[$isFullManualValidation]">
<sch:report test="/production/a.revisionconfig/@status = 'in-distribution' and not(@pin)">
<sch:value-of select="name()"/>
<sch:dir> must have @pin when the TM status is "in-distribution".</sch:dir>
</sch:report>
</sch:rule>
</sch:pattern>
</sch:schema>
</grammar>
SystemID: /home/xxxx/Untitled6.sch
Engine name: ISO Schematron
Severity: error
Description: Failed to compile stylesheet. 1 error detected.
SystemID: /home/xxxx/Untitled6.sch
Engine name: ISO Schematron
Severity: warning
Description: The match pattern in xsl:template may not contain references to variables
SystemID: /home/xxxx/Untitled6.sch
Engine name: ISO Schematron
Severity: fatal
Description: Got a fatal error trying to create a transformer from the stylesheet!
SystemID: /home/xxxx/Untitled6.sch
Engine name: ISO Schematron
Severity: error
Description: Failed to compile stylesheet. 1 error detected.
SystemID: /home/xxxx/Untitled6.sch
Engine name: ISO Schematron
Severity: warning
Description: The match pattern in xsl:template may not contain references to variables
Theses rules works perfectly with other applications, or when embedded in a relaxng schema.
Sounds like the functions is not using the proper XSL for transforming the schamtron rules.
Or am I missing a option/feature?
Thanks in advance.
P.S: working example embedded in rng schema
Code: Select all
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<choice>
<element name="production">
<element name="a.revisionconfig">
<attribute name="status"></attribute>
</element>
</element>
</choice>
</start>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" >
<sch:pattern id="is_prodution">
<sch:let name="isFullManualValidation" value="boolean(//production)"/>
</sch:pattern>
<sch:pattern id="pin">
<sch:rule context="//a.revisionconfig[$isFullManualValidation] | //a.sourcerevision[$isFullManualValidation]">
<sch:report test="/production/a.revisionconfig/@status = 'in-distribution' and not(@pin)">
<sch:value-of select="name()"/>
<sch:dir> must have @pin when the TM status is "in-distribution".</sch:dir>
</sch:report>
</sch:rule>
</sch:pattern>
</sch:schema>
</grammar>