|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Double declaring same element
Hi, I have a question regarding good XML developing practice (I am using XML as a data exchange technology for storing the data in a relational database): I have the following structure in my XML document: <Country> <AdminUnit> </AdminUnit> <AdminUnit> </AdminUnit> </Country> In my XSD I have the following: <element name="Country"> <complexType> <sequence> <element name="AdminUnit" macOccurs="unbounded"> </sequence> </complexType> </element Now, the case might occur that one wants to insert another AdminUnit later. Would it be 'good XML practice' to declare ANOTHER GLOBAL AdminUnit element in order to allow the insertion of a AdminUnit without the need to specify all the data about the Country? The AdminUnit element would be extended for the CountryID the user has to specify in order to indicate which Country the AdminUnit should belong to: <element name="AdminUnit"> <simpleType> <extension base="AdminUnitType"> <element name="CountryID"> </extension> </simpleType> </element> Thanks, Markus -- Markus Seibold ------------------------------ Krebsgasse 6 D-93047 Regensburg Germany ------------------------------ Email: markus.seibold@g... Phone: +49 (941) 504 1009 Mobile: +49 (171) 212 6869 FAX: +49 (89) 1488 210457
|
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








