Why do I get this error?
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 3
- Joined: Wed Oct 06, 2004 2:55 pm
Why do I get this error?
Post by cschlaefcke »
Hi Folks,
when I try to generate an schema from an existing xml file it creates the xsd file and additional the file "xsixsd". When I open the xsixsd file (I´m using the eclipse 2.1 plugin) it shows an validation error that I don´t understand:
no-xsi: The {target namespace} of an attribute declaration must not match 'http://www.w3.org/2001/XMLSchema-instance'. SystemID: file:/C:/workspace/mapping/xsixsd
Line: 4
xsixsd mapping line 4
This ist what the xsixsd file contains:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xs:import schemaLocation="kunde.xsd"/>
<xs:attribute name="noNamespaceSchemaLocation" type="xs:NCName"/> <!-- ERROR in this Line -->
</xs:schema>
Thanks & Regards,
Chris
when I try to generate an schema from an existing xml file it creates the xsd file and additional the file "xsixsd". When I open the xsixsd file (I´m using the eclipse 2.1 plugin) it shows an validation error that I don´t understand:
no-xsi: The {target namespace} of an attribute declaration must not match 'http://www.w3.org/2001/XMLSchema-instance'. SystemID: file:/C:/workspace/mapping/xsixsd
Line: 4
xsixsd mapping line 4
This ist what the xsixsd file contains:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xs:import schemaLocation="kunde.xsd"/>
<xs:attribute name="noNamespaceSchemaLocation" type="xs:NCName"/> <!-- ERROR in this Line -->
</xs:schema>
Thanks & Regards,
Chris
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Chris,
Oxygen uses TRANG [1] for generating an XML Schema from an instance document. It seems that TRANG does not ignore the schema insstance attributes used to associate an XML Schema to an instance document. You have two options further:
1. Remove the xsi:noNamespaceSchemaLocation from your instance document before you run the conversion.
2. Remove the import of the schema instance namespace
<xs:import namespace="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="xsixsd"/>
and the attribute reference from your root element:
<xs:attribute ref="xsi:noNamespaceSchemaLocation" use="required"/>
BTW, why do you need to generate a schema if you already have one set on the document ?
[1] http://www.thaiopensource.com/relaxng/trang.html
Best Regards,
George
Oxygen uses TRANG [1] for generating an XML Schema from an instance document. It seems that TRANG does not ignore the schema insstance attributes used to associate an XML Schema to an instance document. You have two options further:
1. Remove the xsi:noNamespaceSchemaLocation from your instance document before you run the conversion.
2. Remove the import of the schema instance namespace
<xs:import namespace="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="xsixsd"/>
and the attribute reference from your root element:
<xs:attribute ref="xsi:noNamespaceSchemaLocation" use="required"/>
BTW, why do you need to generate a schema if you already have one set on the document ?
[1] http://www.thaiopensource.com/relaxng/trang.html
Best Regards,
George
-
- Posts: 3
- Joined: Wed Oct 06, 2004 2:55 pm
Post by cschlaefcke »
I made it like this, because I first tried to do the xsd stuff by handgeorge wrote:Hi Chris,
BTW, why do you need to generate a schema if you already have one set on the document ?

This was before I installed oxygen and the complexity of xsd nearly drove my nuts

So I already had a test xsd that I tried to use without any success, before I found the tranformation feature of oxygen.
What is the recommended way? Straight XML without any xsd in it and then transforming it?
Regards,
Chris
-
- Posts: 3
- Joined: Wed Oct 06, 2004 2:55 pm
Post by cschlaefcke »
Thank you! It´s working now!george wrote:Hi Cris,
Yes, that will be better.
Best Regards,
George
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