You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Vadim Solonovich <vs...@park.ru> on 2001/04/17 17:04:15 UTC
Need help to understand using external schemas.
Dear All !
Could anybody help me understand how can I use the features from XML/Xpath/Xlink/Xpointer or other schemas ?
1.How can I correctly import element definfitions and type declarations from those schemas ?
As a a test I've tried to import attribute type xml:lang from XML namespace.
The following very simple example failed with the error:
Schema error: Globally-declared attributes containing values MUST have "use" present and set to "FIXED" or "DEFAULT"
sample.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd='http://www.w3.org/2000/10/XMLSchema'
xmlns:xml='http://www.w3.org/XML/1998/namespace' >
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2000/10/xml.xsd"/>
<xsd:element name="faq">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref = "xml:lang" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>
What am i doing wrong ?
2. Which value should I use in schemaLocation attribute for
- XLink ?
- XPointer ?
- XPath ?
- other XML related ?
Thanks in advance,
Vadim Solonovich