Generating dynamic "choice" content

Hi all,

I'm pretty new to XML-schema and am wondering about dynamical generation of
schemas.

Let's assume I want to dynamically fill or add new elements in a choice
list, as follows :

<!-- extract from XML Schemas tutorial - Roger Costello - available at
http://www.xfront.com/-->
<xsd:element name="transportation">
	<xsd:complexType>
		<xsd:choice>
			<xsd:element name="train" type="xsd:string"/>
			<xsd:element name="plane" type="xsd:string"/>
			<xsd:element name="automobile" type="xsd:string"/>
			...
		</xsd:choice>
	</xsd:complexType>
</xsd:element>

The "choice" elements (train, plane, automobile) should be read from a DB
and dynamically added ; the complete element definition (type, minOccurs,
maxOccurs, etc.) would be read from the DB too.

What options do I have to achieve this ? 

For now, the only option I see is to programmatically generate a schema for
this type and then ref it from my main schema.

I would be very grateful if any of you could give me some "pointers" to
available documents/products involving dynamic generation of schemas.

Thanks a lot in advance for your help and best regards

Régis

Received on Monday, 3 December 2001 06:26:40 UTC