Help with namespaces in xsd Schema please?

I

Ingrid

I am trying to create a schema with my own namespace/prefix "in:"
instead of xs: (to be able to import it into a different schema
afterwards) - but can't seem to make it work.

Trying to validate the schema below, the parser keeps on finding an
error at line <in:extension base="pageRange">

The same schema validates ok when the conventional xs: namespace is
used.

Any ideas?

Ingrid

<in:schema targetNamespace="http://did/in"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:in="http://www.w3.org/2001/XMLSchema" >

<in:element name="num" type="numType"></in:element>

<in:complexType name="numType">
<in:simpleContent>
<!-- ERROR ---- ???>
<in:extension base="pageRange">
<!-- ERROR ---- ????>
<in:attribute name="type" use="required">
<in:simpleType>
<in:restriction base="in:string">
<in:enumeration value="page
range"></in:enumeration>
</in:restriction>
</in:simpleType>
</in:attribute>
</in:extension>
</in:simpleContent>
</in:complexType>
<in:simpleType name="pageRange">
<in:restriction base="in:string">
<in:minLength value="3"></in:minLength>
<in:maxLength value="7"></in:maxLength>
<in:pattern value="\d{1,3}-\d{1,3}"></in:pattern>
</in:restriction>
</in:simpleType>
</in:schema>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top