stran Posted May 18, 2007 Share Posted May 18, 2007 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 More sharing options...
boen_robot Posted May 19, 2007 Share Posted May 19, 2007 How about: <xs:union memberTypes="xs:IDREF xs:string"> ? Link to comment Share on other sites More sharing options...
stran Posted May 19, 2007 Author Share Posted May 19, 2007 Thanks, I tried your suggestion, but it still didn't work. The enumeration is still not validating. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.