[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Language Theorie concerning XML Schema (heavy, at least to me)
I'll answer a simple question which I understand, and which I _think_ is what you're asking. The following XML document is valid: <!DOCTYPE root [ <!ELEMENT root (a|x)> <!ELEMENT a (b|y)> <!ELEMENT b (c|z)> <!ELEMENT c EMPTY> ]> <root><a><b><c/></b></a></root> Note it contains no declarations for the elements x, y and z. The corresponding schema document successfully validates the same instance: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="root"> <xs:complexType> <xs:choice> <xs:element ref="a"/> <xs:element ref="x"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="a"> <xs:complexType> <xs:choice> <xs:element ref="b"/> <xs:element ref="y"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="b"> <xs:complexType> <xs:choice> <xs:element ref="c"/> <xs:element ref="z"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="c"> <xs:complexType/> </xs:element> <xs:element name="x" type="unknown1"/> <xs:element name="y" type="unknown2"/> <xs:element name="z" type="unknown3"/> </xs:schema> So yes, you can do incremental development of a schema for a complex XML language. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@i... URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
|
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
|