W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Key/Keyref for Element names

From: Graham Mann <gmann@adobe.com>
Date: Fri, 28 Feb 2003 12:10:03 +0000
Message-Id: <>
To: xmlschema-dev@w3.org


I'm trying to make a Key that is the combination of an Elements Children's name and ID attribute.
These will then be used by a Keyref that has two attributes to do the match.

The ID is no problem - but I can't seem to get a permitted XPath expression to return a childs' name as a string.

<xs:keyref name="Element_rRef" refer="Element_ID">
        <xs:selector xpath=".//Pool/*"/>
                <xs:field xpath="@rRef"/>
                <xs:field xpath="@Name"/>
This is OK 

<xs:key name="Element_ID">
        <xs:selector xpath="./*"/>
                <xs:field xpath="@ID"/>
                <xs:field xpath="{name()}"/>

The second field is incorrect - but its the XPath function I'd like to use

Graham Mann
Adobe Systems Europe Ltd.
Received on Friday, 28 February 2003 07:17:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC