OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
xsd uniqueness on element names?

	I have a question about how to implement a uniqueness constraint that tests for uniqueness on element names.  I worked through examples that use attribute values and element values, but I wasn't able to get the xsd:unique element to test for element names.  The following is a description of a sample schema:


	I'd like the schema to limit the contents of the Basket element to a unique set of "Animals", "Vegetables", or "Minerals" elements, which wrap more specific elements that represent members of those categories.  

	I've gotten the functional affect of what I want by limiting each of the three categories to only appear zero or one times, but I'm still curious about whether or not using xsd:unique or xsd:key is possible.  The technical problem seemed to be that xpath functions like "local-name()" were not part of the restricted xpath set that is valid for unique "field" attribute.  Is that the entire issue, or is there a more abstract principle behind not allowing node names in uniqueness tests?  

     Any help or tips would be greatly appreciated,


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS