I have an XSD definition that has a list of tagged elements. In what way is it possible to allow developer's to only select from a list of elements already defined in the XML file when entering values for a choice-restricted element?
In other words, given this XML declaration:
<collection>
<myItem name="Item_1">
<childElement />
</myItem>
<myItem name="Item_2">
<childElement>
<item name="Item_1"/>
</childElement>
</myItem>
<myItem name="Item_3">
<childElement>
<item name="Child_2"/>
</childElement>
</myItem>
</collection>
... and this XSD definition
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="collection">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="collection">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="childElement" >
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="item">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I would like to enable users to select from a list of myItem elements already defined in the XML file whenever they want to enter the name value of the childEelement?
This concept is seen when selecting attributes values in XAML or even some of Visual Studio 2008's schemas.