I want to be able to allow the following in my XSD but am stumped. I understand that I could use xs:any in a structure like this but this does not allow me define attributes for the elements that occur.
<xs:element name="parent">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
I would like to be able to have a defined parent and then have any element as a child but the children must have attributes specified by the following.
<xs:attribute name="attribute1" type="xs:string" use="required" />
<xs:attribute name="attribute2" type="xs:string" />
<xs:attribute name="attribute3" type="xs:string" use="required" />
So I guess what I'm really asking is can I define the attributes for an any element? Below is the structure I want to acheive. Where the child elements of parent can take any name but must have the attributes as specified above. Thanks!
<parent>
<AnyElementName1 attribute1="val1" attribute2="val2" attribute3="val3"/>
<AnyElementName2 attribute1="val1" attribute2="val2" attribute3="val3"/>
<AnyElementName3 attribute1="val1" attribute3="val3"/>
</parent>