I'm trying to create a simple type that holds two different types. The first is IDREF and the second is an enumeration of string. When I generate a sample xml, I can enter any ID previously stated in the xml and validates correctly. When I try to use one of the enumeration in the drop down list, the xml will not validate.
When I validate the xml in xmlspy, i get the error message "IDREF 'endofprogam': referenced ID 'endofprogam' was not found."
Anyone knows a solution to having a union of enumeration and IDREF? I would appreciate any help.
<xs:simpleTyp e name="Persist_E num_Type">
<xs:annotatio n>
<xs:documentati on>Persist gives the UTR multiple options of lifetime</xs:documentatio n>
</xs:annotation>
<xs:union memberTypes="xs :IDREF">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:annotatio n>
<xs:documentati on>
End of Program (EOP)
End of Children (EOC)
End of Lifetime (EOL)
Persist to Label (PTL)
</xs:documentatio n>
</xs:annotation>
<xs:enumerati on value="endofpro gram"/>
<xs:enumerati on value="endofchi ldren"/>
<xs:enumerati on value="endoflif etime"/>
<xs:enumerati on value="persistt olabel"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
When I validate the xml in xmlspy, i get the error message "IDREF 'endofprogam': referenced ID 'endofprogam' was not found."
Anyone knows a solution to having a union of enumeration and IDREF? I would appreciate any help.
<xs:simpleTyp e name="Persist_E num_Type">
<xs:annotatio n>
<xs:documentati on>Persist gives the UTR multiple options of lifetime</xs:documentatio n>
</xs:annotation>
<xs:union memberTypes="xs :IDREF">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:annotatio n>
<xs:documentati on>
End of Program (EOP)
End of Children (EOC)
End of Lifetime (EOL)
Persist to Label (PTL)
</xs:documentatio n>
</xs:annotation>
<xs:enumerati on value="endofpro gram"/>
<xs:enumerati on value="endofchi ldren"/>
<xs:enumerati on value="endoflif etime"/>
<xs:enumerati on value="persistt olabel"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
Comment