Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML schema restrictions

Status
Not open for further replies.

botsGuy

Programmer
Joined
Nov 12, 2002
Messages
5
Location
AU
hi there,

I want to have an abstract type:

<xs:complexType name="itemType" abstract="true">
<xs:attribute name="key" type="xs:string"use="required">
</xs:complexType>

And then extend types with possibly more attributes and
at the same time restrict the type of data inside the element.

For example:

In the XML I would have something like:

<stringItemType key="X" otherAttr="Y"> blah </stringItemType>

The schema should restrict 'blah' to type xs:string and
extend the itemType to have an extra attribute.

I don't see how you are supposed to restrict the data
inside an element to a type in this case.

cheers,

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top