Hi Folks, Consider this usage of xs:error: <xs:element name="Publication" type="PublicationType"> <xs:alternative test="@kind eq 'magazine'" type="MagazineType" /> <xs:alternative test="@kind eq 'book'" type="BookType" /> <xs:alternative test="(@kind ne 'book') and (@kind ne 'magazine')" type="xs:error" /> </xs:element> It says that if an instance document has a Publication element with a kind attribute not equal to 'book' or 'magazine' then throw an error. But that doesn't illustrate the usefulness of xs:error because the same functionality can be accomplished by simply constraining @kind: <attribute name="kind"> <simpleType> <restriction base="string"> <enumeration value="book" /> <enumeration value="magazine" /> </restriction> </simpleType> </attribute> Can you provide an example that illustrates the usefulness of xs:error? /RogerReceived on Tuesday, 21 July 2009 19:57:35 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 21 July 2009 19:57:36 GMT