Multiple imports for the same name space?
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 5
- Joined: Thu May 26, 2005 9:16 pm
Multiple imports for the same name space?
I have an XML and modular schema that validate under XMLSpy. When I attempt to validate them under Oxygen6 it appears that the second, third, ... imports within an XSD for the same namespace are ignored as I get pairs of the form
i.e., Others.xsd (in a different namespace) contains a sequence like
Code: Select all
cannot resolve the name 'prefix:SchemaType' to a(n) 'type definition' component
cannot resolve the name 'prefix:SchemaType' to a(n) 'simpleType definition' component
Code: Select all
<xs:schema targetNamespace="http://domain.tld/OTHERS"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://domain.tld/OTHERS"
xmlns:prefix="http://domain.tld/PREFIX">
<xs:import namespace="http://domain.tld/PREFIX" schemaLocation="http://domain.tld/PREFIX/Schema1.xsd"/>
<xs:import namespace="http://domain.tld/PREFIX" schemaLocation="http://domain.tld/PREFIX/Schema2.xsd"/>
<xs:import namespace="http://domain.tld/PREFIX" schemaLocation="http://domain.tld/PREFIX/Schema3.xsd"/>
...
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Hi,
Oxygen uses Xerces for validation.
Xerces only uses the first <xsd:import> for each namespace. It
ignores subsequent ones, leading to problems if you, as in this example,
have multiple schemas with the same namespace imported in the same schema.
Having reported this as a bug in Xerces, it was pointed out that
the spec makes supporting multiple imports into the same namespace up to the processor. Further the comment made was that they believed that they were encouraging better Schema authoring practice by disallowing this.
See the link below:
http://issues.apache.org/bugzilla/show_bug.cgi?id=13193
As a workaround you can define a new schema with the target namespace "http://domain.tld/PREFIX" which can include all the other schemas with the same namespace. This schema can be then imported in your main schema.
Hope this helps.
Regards, Radu.
Oxygen uses Xerces for validation.
Xerces only uses the first <xsd:import> for each namespace. It
ignores subsequent ones, leading to problems if you, as in this example,
have multiple schemas with the same namespace imported in the same schema.
Having reported this as a bug in Xerces, it was pointed out that
the spec makes supporting multiple imports into the same namespace up to the processor. Further the comment made was that they believed that they were encouraging better Schema authoring practice by disallowing this.
See the link below:
http://issues.apache.org/bugzilla/show_bug.cgi?id=13193
As a workaround you can define a new schema with the target namespace "http://domain.tld/PREFIX" which can include all the other schemas with the same namespace. This schema can be then imported in your main schema.
Hope this helps.
Regards, Radu.
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