Using Schema+Schematron on XML files with XMLNS error
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Using Schema+Schematron on XML files with XMLNS error
I'm having issues using schema validation along with Schematron validation when the XML file contains a XMLNS tag.
We are developing a framework to work with ATA2300, and in this specification, the namespace xmlns="http://www.ataebiz.org/XMLSchema" is used. A catalog file was created to apply the schema to the XML files. A Schematron was also created to validate some rules apart from the schema. However, when we have the XMLNS tag, Oxygen doesn't take the Schematron into account. When I remove the XMLNS tag, the Schematron works, but the schema stops working.
Am I doing something wrong, or is it really a tool issue?
Validation scenario:
Catalog:
Simple Schematron:
File with XMLNS working with Schema, but not with schematron:
File without XMLNS working with Schematron, but not with schema:
We are having the same problem when using xsi:noNamespaceSchemaLocation instead of xsi:schemaLocation
We are developing a framework to work with ATA2300, and in this specification, the namespace xmlns="http://www.ataebiz.org/XMLSchema" is used. A catalog file was created to apply the schema to the XML files. A Schematron was also created to validate some rules apart from the schema. However, when we have the XMLNS tag, Oxygen doesn't take the Schematron into account. When I remove the XMLNS tag, the Schematron works, but the schema stops working.
Am I doing something wrong, or is it really a tool issue?
Validation scenario:
- image.png (14.23 KiB) Viewed 371 times
- image.png (9.73 KiB) Viewed 371 times
- image.png (14.22 KiB) Viewed 371 times
- image.png (26.76 KiB) Viewed 371 times
- image.png (33.25 KiB) Viewed 371 times
We are having the same problem when using xsi:noNamespaceSchemaLocation instead of xsi:schemaLocation
Re: Using Schema+Schematron on XML files with XMLNS error
I found the solution.
The following declaration is missing in schematron:
<sch:ns uri="http://www.ataebiz.org/XMLSchema" prefix="ata"/>
Now it working fine.
I'm sorry.
The following declaration is missing in schematron:
<sch:ns uri="http://www.ataebiz.org/XMLSchema" prefix="ata"/>
Now it working fine.
I'm sorry.
Re: Using Schema+Schematron on XML files with XMLNS error
Hi,
Right, once your XML is in a certain namespace, the XPath expressions in the Schematron need to match elements in that namespace.
So either write flexible matches like *:para or match directly elements in the namespace by using ata:para and mapping the "ata" prefix to the namespace.
Regards,
Radu
Right, once your XML is in a certain namespace, the XPath expressions in the Schematron need to match elements in that namespace.
So either write flexible matches like *:para or match directly elements in the namespace by using ata:para and mapping the "ata" prefix to the namespace.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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