[
Lists Home |
Date Index |
Thread Index
]
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@gmx.net
Phone: +49 (941) 504 1009
Mobile: +49 (171) 212 6869
FAX: +49 (89) 1488 210457
|