Jump to content

Using IDREF and enumration within Union


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...