Xinclude and XSD
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 6
- Joined: Mon Oct 17, 2016 8:10 pm
Xinclude and XSD
Post by ProfessorK »
Hey, I am trying to build a document using XInclude that should match an xsd.
It seems however that the include is not getting replaced before validation, and thus the xi:include is causing an xsd error.
Is there a setting or declaration I can use to fix this?
Thanks, code below
It seems however that the include is not getting replaced before validation, and thus the xi:include is causing an xsd error.
Is there a setting or declaration I can use to fix this?
Thanks, code below
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<World xmlns="https://profk.github.io/websites/xsd/MuttRules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2003/XInclude"
xsi:schemaLocation="https://profk.github.io/websites/xsd/MuttRules file:/C:/Users/jeffp/Downloads/MuttMaster-20180226T014238Z-001/MuttMaster/MuttRules.xsd">
<xi:include href="DefaultRules.xml" parse="text" xpointer="xpointer(RULES)" />
<Powers></Powers>
</World>
-
- Posts: 9433
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Xinclude and XSD
Hi,
You should look in the Oxygen Preferences->"XML / XML Parser" page if the XInclude processing checkbox is enabled.
If it is and you still have problems with this, maybe you could give us more details, ideally post a small sample XML + XSD and the error message that you get on your side. You can also send samples directly to "support@oxygenxml.com".
Regards,
Radu
You should look in the Oxygen Preferences->"XML / XML Parser" page if the XInclude processing checkbox is enabled.
If it is and you still have problems with this, maybe you could give us more details, ideally post a small sample XML + XSD and the error message that you get on your side. You can also send samples directly to "support@oxygenxml.com".
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 6
- Joined: Mon Oct 17, 2016 8:10 pm
Re: Xinclude and XSD
Post by ProfessorK »
okay I stripped my xsd down to a minmal example, here it is..
ANd here is the including file
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:local="https://profk.github.io/websites/xsd/MuttRules"
targetNamespace="https://profk.github.io/websites/xsd/MuttRules">
<xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="xhtml5.xsd"/>
<xs:element name="World">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element name="Rules" minOccurs="0"/>
<xs:element name="Powers"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
ANd here is the including file
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<World xmlns="https://profk.github.io/websites/xsd/MuttRules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2003/XInclude"
xsi:schemaLocation="https://profk.github.io/websites/xsd/MuttRules file:/C:/Users/jeffp/Downloads/MuttMaster-20180226T014238Z-001/MuttMaster/MuttRules1.xsd">
<xi:include href="DefaultRules.xml" parse="text" xpointer="xpointer(RULES)" />
<Powers></Powers>
</World><?xml version="1.0" encoding="UTF-8"?>
<World xmlns="https://profk.github.io/websites/xsd/MuttRules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2003/XInclude"
xsi:schemaLocation="https://profk.github.io/websites/xsd/MuttRules file:/C:/Users/jeffp/Downloads/MuttMaster-20180226T014238Z-001/MuttMaster/MuttRules1.xsd">
<xi:include href="DefaultRules.xml" parse="text" xpointer="xpointer(RULES)" />
<Powers></Powers>
</World>
-
- Posts: 6
- Joined: Mon Oct 17, 2016 8:10 pm
-
- Posts: 6
- Joined: Mon Oct 17, 2016 8:10 pm
Re: Xinclude and XSD
Post by ProfessorK »
I think I figured it out...
"http://www.w3.org/2003/XInclude" doesn't seem to exist but fails silently
"http://www.w3.org/2001/XInclude" works
"http://www.w3.org/2003/XInclude" doesn't seem to exist but fails silently
"http://www.w3.org/2001/XInclude" works
-
- Posts: 9433
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Xinclude and XSD
Hi,
Indeed the namespace https://www.w3.org/2003/XInclude is deprecated:
https://www.w3.org/2003/XInclude
and not supported, so if you have an element in that namespace, it is not considered an xinclude element, it is just an unknown element called "include" having the namespace https://www.w3.org/2003/XInclude.
Regards,
Radu
Indeed the namespace https://www.w3.org/2003/XInclude is deprecated:
https://www.w3.org/2003/XInclude
and not supported, so if you have an element in that namespace, it is not considered an xinclude element, it is just an unknown element called "include" having the namespace https://www.w3.org/2003/XInclude.
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