Trying to use custom datatype library in RELAX NG
Posted: Thu Mar 12, 2009 11:03 pm
I'm trying to make use of a datatype library I have defined in an XML Schema document in Oxygen for Eclipse.
Here's a portion of my RELAX NG schema where I try to import the custom library:
Here's the schema itself (in my-datatypes.xsd in the same directory):
I know that Oxygen can find this schema because I created an XML Catalog to point to this local version. If I right click on the URI in the datatypeLibrary attribute and select "Open File at Caret", the .xsd file is opened. I've tried changing the local resource that the XML Catalog points to and Oxygen opens up the correct file each time. So that seems fine.
However, Oxygen seems to keep telling me my RELAX NG document is invalid:
Thanks.
Here's a portion of my RELAX NG schema where I try to import the custom library:
Code: Select all
<element name="foo">
<data type="myCustomType" datatypeLibrary="http://example.com/my-datatypes" />
</element>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://example.com/my-datatypes"
targetNamespace="http://example.com/my-datatypes">
<xs:complexType name="myCustomType">
<xs:attribute name="id" type="xs:positiveInteger" use="required" />
<xs:attribute name="name" type="xs:string" use="optional" />
</xs:complexType>
</xs:schema>
However, Oxygen seems to keep telling me my RELAX NG document is invalid:
Can anyone give any clues as to where I'm going wrong?[oNVDL] datatype library "http://example.com/my-datatypes" not recognized
Thanks.