|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Problem with restricting a W3C Schema Type
Hi I have got a complex type in a schema that looks like this: <xsd:complexType name="Term"> <xsd:sequence> <xsd:element name="years" minOccurs="0"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="origo:SmallNumber"> <xsd:attribute name="id" type="xsd:ID"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <xsd:element name="months" minOccurs="0"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="origo:SmallNumber"> <xsd:attribute name="id" type="xsd:ID"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <xsd:attribute name="id" type="xsd:ID"/> </xsd:complexType> I want to construct an element that restricts type "Term" to have only a "years" child element. I am having problems getting this to work. If I remove the attribute "id" from the definition of "years", a restriction of "Term" works fine, but otherwise I get an error. Any hints, or pointers to helpful documentation would be gratefully received. All the best Mark Seaborne The information in this email is sent in confidence for the addressee only and may be legally privileged. Unauthorised recipients must preserve this confidentiality and should please advise the sender immediately of the error in transmission. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on its content is prohibited and may be unlawful. Origo Services Ltd accepts no responsibility for any loss or damage resulting directly or indirectly from the use of this email or the contents.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








