Jump to content

Using IDREF and enumration within Union


stran

Recommended Posts

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:simpleType name="Persist_Enum_Type"> <xs:annotation> <xs:documentation>Persist gives the UTR multiple options of lifetime</xs:documentation> </xs:annotation> <xs:union memberTypes="xs:IDREF"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:annotation> <xs:documentation> End of Program (EOP) End of Children (EOC) End of Lifetime (EOL) Persist to Label (PTL) </xs:documentation> </xs:annotation> <xs:enumeration value="endofprogram"/> <xs:enumeration value="endofchildren"/> <xs:enumeration value="endoflifetime"/> <xs:enumeration value="persisttolabel"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType>

Link to comment
Share on other sites

How about:

<xs:union memberTypes="xs:IDREF xs:string">

?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...