W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2004

Re: Another multi-field key question

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Tue, 14 Dec 2004 17:20:06 +0100
Message-ID: <41BF12B6.60707@4commerce.de>
To: Jim Stanley <JimS@Media-Services.Com>
CC: xmlschema-dev@w3.org

Hi,

Kasimier Buchcik wrote:
> 
> Hi,
> 
> Jim Stanley wrote:
> 
>> Just when I think I understand all this key/keyref stuff, another
>> conundrum arises:
>>
>> I have "categories" under my root, each with one or more "property
>> definitions" consisting of name-value pairs.   Several of my categories
>> have duplicate property definitions, something like below:
>>

> I don't see a way to do this, since you want only the _first_ 'propDef'
> child element of the 'category' element to be used as a field. This is

Correction: "the _first_ 'propDef' child element of the 'category' 
element to be used in the XPath of the field"

> not expressible by the reduced XPath syntax of the indentity-constraint
> mechanism. In your example the XPath 'propDef/name' resolves to multiple
> nodes, which is not allowed. What you would need, would be
> 'propDef/name[1]' - unfortunately not supported.

Correction: this should be "propDef[1]/name"

Kasimier
Received on Tuesday, 14 December 2004 16:20:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:48 GMT