eclipse plugin default schema association
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Thu Dec 29, 2005 3:35 pm
eclipse plugin default schema association
I'm having a problem related to the example at http://www.oxygenxml.com/forum/viewtopi ... =3939#3939.
The example is working fine if I try it but I would like to avoid the hardcoded paths in the schemaLocation attributes. Suppose the test.xml file would not have the schemaLocation attributes in the a&b elements:
I would like oxygen to find the needed schemas via the default schema association settings in Windows->preferences->oXygen->Editor->Default Schema Association. I've added the following entries:
The validation fails with:
Can somebody enlighten me?
The example is working fine if I try it but I would like to avoid the hardcoded paths in the schemaLocation attributes. Suppose the test.xml file would not have the schemaLocation attributes in the a&b elements:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<t:test xmlns:t="test">
<a:a xmlns:a="a" a="1"/>
<a:b xmlns:a="b" b="2"/>
</t:test>
- Namespace=test
Root local name=test
File name=<ANY>
Schema type=XML Schema
Schema URI=(path to test.xsd)
Namespace=a
Root local name=a
File name=<ANY>
Schema type=XML Schema
Schema URI=(path to a.xsd)
Namespace=b
Root local name=b
File name=<ANY>
Schema type=XML Schema
Schema URI=(path to b.xsd)
The validation fails with:
The strange thing is that test.xsd is found but a.xsd and b.xsd not.The matching wildcard is strict, but no declaration can be found for element 'a:a'.
@see: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type
The matching wildcard is strict, but no declaration can be found for element 'b:b'.
@see: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type
Can somebody enlighten me?
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: eclipse plugin default schema association
Hi Peter,
What you can do however is to create a schema for the test namespace that imports the schemas for the a and b namespaces. The simplest thing is to have a new schema document that includes the test.xsd and imports a.xsd and b.xsd and use that instead of test.xsd for the test namespace in the default schema association settings.
I hope that helps.
Happy holidays,
George
As you see above, the default schema association is based on the root local name and root namespace. Your a:a and a:b elements are not root elements so they will not be used for finding a schema.Peter wrote:...
Namespace=a
Root local name=a
File name=<ANY>
Schema type=XML Schema
Schema URI=(path to a.xsd)
Namespace=b
Root local name=b
File name=<ANY>
Schema type=XML Schema
Schema URI=(path to b.xsd)
[/list]
....
What you can do however is to create a schema for the test namespace that imports the schemas for the a and b namespaces. The simplest thing is to have a new schema document that includes the test.xsd and imports a.xsd and b.xsd and use that instead of test.xsd for the test namespace in the default schema association settings.
I hope that helps.
Happy holidays,
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