XProc and problem with schema aware processing
Oxygen general issues.
-
- Posts: 12
- Joined: Tue Nov 01, 2011 12:24 pm
XProc and problem with schema aware processing
Hi,
I am trying to run an XProc pipeline where some XML files are first validated against an XSD and then against a Schematron schema. I get an error in the latter step saying that:
"The transformation is not schema-aware, so the source document must be untyped"
I understand that the XSD validation step adds typing information to the XML infoset that is passed to the second step, which then complains about this. How to workaround this?
Thanks,
Mats
I am trying to run an XProc pipeline where some XML files are first validated against an XSD and then against a Schematron schema. I get an error in the latter step saying that:
"The transformation is not schema-aware, so the source document must be untyped"
I understand that the XSD validation step adds typing information to the XML infoset that is passed to the second step, which then complains about this. How to workaround this?
Thanks,
Mats
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XProc and problem with schema aware processing
Hi,
You can pipe directly the XML to the Schematron validation and sink the result of the XML Schema validation. For example the following pipeline
can be changed to
Best Regards,
George
You can pipe directly the XML to the Schematron validation and sink the result of the XML Schema validation. For example the following pipeline
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="main"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
<p:input port="source">
<p:document href="test.xml"/>
</p:input>
<p:output port="result"/>
<p:validate-with-xml-schema>
<p:input port="schema">
<p:document href="test.xsd"/>
</p:input>
</p:validate-with-xml-schema>
<p:validate-with-schematron>
<p:input port="schema">
<p:document href="test.sch"/>
</p:input>
<p:input port="parameters"><p:empty/></p:input>
</p:validate-with-schematron>
</p:declare-step>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="main"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
<p:input port="source">
<p:document href="test.xml"/>
</p:input>
<p:output port="result"/>
<p:validate-with-xml-schema>
<p:input port="schema">
<p:document href="test.xsd"/>
</p:input>
</p:validate-with-xml-schema>
<p:sink/>
<p:validate-with-schematron>
<p:input port="source">
<p:pipe port="source" step="main"/>
</p:input>
<p:input port="schema">
<p:document href="test.sch"/>
</p:input>
<p:input port="parameters"><p:empty/></p:input>
</p:validate-with-schematron>
</p:declare-step>
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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