XML Schema keys, uniqueness based on ancestor's attribute
Is the following constraint possible to be expressed with XML Schema
Suppose we have a document in the form
Is it possible to define a key for the parts of a car such that the key
will include the type of the car too.
In this way the door of the BMW will be unique because a) it's a door
and b) it is part of the BMW and will differ from the door of the Ford
since it is not defined in the ford.
Say the schema is
<xs:element name="part" maxOccurs="unbounded">
<xs:attribute name="name" type="xs:string"/>
So i want a key definition that uniquely identifies the element "part"
of the element "car" by using the part's "name" attribute *and* the
car's "name" attribute.
I thought something in the line of
BUT, the XML Schema recommendation's restricted XPATH usage in key
definitions forbids that.
Any other ideas?
|All times are GMT. The time now is 03:12 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.