Possible Bug with Saxon Schema Validation
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Possible Bug with Saxon Schema Validation
Hi,
i'd like to construct a XML Schema C (XSD Version 1.1), which includes an XML Schema B (without any version attributes) and imports another XML Schema A (XSD Version 1.1). The Idea is that i can extend a complexType from B by an xs:assert Element, which, in its test condition, references a Type from the imported Schema A.
When i validate the Schema C, which imports A and includes B
This happens in XML Editor 22.1, build 2020100710 on Windows.
Schema A (XSD Version 1.1) defines the simple Type:
Schema B (without Version Attributes) defines the complex Type:
Schema C (XSD Version 1.1) imports A and includes B, because i'd like to extend a Type from B. But Saxon says that the target namespace from Schema A has not been imported in the static context.
Thanks in advance,
Frank Steimke
i'd like to construct a XML Schema C (XSD Version 1.1), which includes an XML Schema B (without any version attributes) and imports another XML Schema A (XSD Version 1.1). The Idea is that i can extend a complexType from B by an xs:assert Element, which, in its test condition, references a Type from the imported Schema A.
When i validate the Schema C, which imports A and includes B
- there is no error with XERCES;
- But SAXON reports an Error: "Atomic type ns1:Token3 exists, but its target namespace has not been imported in the static context"
This happens in XML Editor 22.1, build 2020100710 on Windows.
Schema A (XSD Version 1.1) defines the simple Type:
Code: Select all
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified"
vc:minVersion="1.1" targetNamespace="http//www.namespace.1" xmlns:ns1="http//www.namespace.1">
<xs:simpleType name="Token3">
<xs:restriction base="xs:token">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Code: Select all
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified"
targetNamespace="http://www.namespace.2" xmlns:ns2="http://www.namespace.2">
<xs:complexType name="TypeB">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="child" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Code: Select all
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified"
vc:minVersion="1.1" targetNamespace="http://www.namespace.2" xmlns:ns1="http//www.namespace.1"
xmlns:ns2="http://www.namespace.2">
<xs:import namespace="http//www.namespace.1" schemaLocation="schemaA-11.xsd"/>
<xs:include schemaLocation="SchemaB.xsd"/>
<xs:complexType name="ProfiledTypeB">
<xs:complexContent>
<xs:extension base="ns2:TypeB">
<xs:assert test="ns2:child castable as ns1:Token3"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Frank Steimke
-
- Posts: 390
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Possible Bug with Saxon Schema Validation
Hello Frank,
Thanks for your feedback.
Yes, it seems to be a problem with the Saxon validation in an assert. If the type "ns1:Token3" is set as an element type, no problem is reported. Therefore, it seems that the problem occurs when referring the type in an assert element.
I reported the problem at Saxon: https://saxonica.plan.io/issues/4911
Best Regards,
Octavian
Thanks for your feedback.
Yes, it seems to be a problem with the Saxon validation in an assert. If the type "ns1:Token3" is set as an element type, no problem is reported. Therefore, it seems that the problem occurs when referring the type in an assert element.
I reported the problem at Saxon: https://saxonica.plan.io/issues/4911
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Re: Possible Bug with Saxon Schema Validation
just saw that this has been checked by Mr. Kay from Saxonica with the result that this is not a Bug.
It is not, as i thought, a Question of different Schema Versions. Instead it's simply a limitation of xs:assert.
Well, that means that we have to find a different solution. Maybe a combination of XML Schema 1.0 for Structure and Schematron for additional Constraints. Thank you very much for clarification.
Sincerely,
Frank Steimke
It is not, as i thought, a Question of different Schema Versions. Instead it's simply a limitation of xs:assert.
Well, that means that we have to find a different solution. Maybe a combination of XML Schema 1.0 for Structure and Schematron for additional Constraints. Thank you very much for clarification.
Sincerely,
Frank Steimke
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