XPath 2.0 in Schematron
Oxygen general issues.
XPath 2.0 in Schematron
How does oXygen 7 implement its use of XPath 2.0 syntax in a Schematron schema? It is working perfectly, but if I try using Jing externally as it complains about the non-XPath 1.0 syntax.
This is an issue only because I would like a third party to be able to validate files against my Schematron schema, and they may or may not have oXygen available.
Code: Select all
java -jar /Applications/oxygen/lib/jing.jar schema.sch file.xml
This is an issue only because I would like a third party to be able to validate files against my Schematron schema, and they may or may not have oXygen available.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hi David,
You cannot use XPath 2.0 expressions in your Schematron schemas if your other tool is Jing, because Jing uses its own Schematron validator, which does not support XPath 2.0. In order to use XPath 2.0 expressions you have to modify the template with the match attribute match="sch:schema | schema" in skeleton1-5.xsl so that it generates <axsl:stylesheet version="2.0"> instead of <axsl:stylesheet version="1.0"> and use the usual process to validate file.xml against schema.sch using skeleton1-5.xsl: apply skeleton1-5.xsl to schema.sch to generate schema.xsl, apply schema.xsl to file.xml to get the Schematron validation error messages. Of course if you include XPath 2.0 expressions in schema.sch the stylesheets skeleton1-5.xsl and schema.xsl must be applied with an XSLT 2.0 processor.
Regards,
Sorin
You cannot use XPath 2.0 expressions in your Schematron schemas if your other tool is Jing, because Jing uses its own Schematron validator, which does not support XPath 2.0. In order to use XPath 2.0 expressions you have to modify the template with the match attribute match="sch:schema | schema" in skeleton1-5.xsl so that it generates <axsl:stylesheet version="2.0"> instead of <axsl:stylesheet version="1.0"> and use the usual process to validate file.xml against schema.sch using skeleton1-5.xsl: apply skeleton1-5.xsl to schema.sch to generate schema.xsl, apply schema.xsl to file.xml to get the Schematron validation error messages. Of course if you include XPath 2.0 expressions in schema.sch the stylesheets skeleton1-5.xsl and schema.xsl must be applied with an XSLT 2.0 processor.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service