[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
Re: Another multi-field key question

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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.