[oXygen-user] Using xs:unique
Florent Georges
lists at fgeorges.org
Thu Nov 29 12:30:14 CST 2012
Olumide wrote:
> <xs:unique name="UniqueIdConstraint">
> <xs:selector xpath=".//*"/>
> <xs:field xpath="@id"/>
> </xs:unique>
If @id must be unique across all descendent elements, yes. If the IDs must be unique across all descendent a elements on the one hand, and unique across all b elements on the other hand, then you need two xs:unique, and change .//* to resp. .//a and .//b.
Regards,
--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
More information about the oXygen-user
mailing list