W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

Limited XPath possibilities for fields in identity constraints

From: Stefan Wachter <stefan.wachter@db.com>
Date: Tue, 17 Apr 2001 17:51:14 +0100
To: "www-xml-schema-comments@w3.org" <www-xml-schema-comments@w3.org>
Message-ID: <OF190997CE.AD09FA4B-ON41256A31.005C6061@db.com>

Dear all,

in the March 30 publication of the XML schema the XPath possibilities for selectors and fields were restricted compared to the full XPath possibilities. With the new proposal it is no longer possible to access ancestors, i.e. the following example is no longer valid:

<xs:element name="country">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="city" minOccurs="0" maxOccurs="unbounded">
                <xs:key name="cityIndex">
                    <xs:selector xpath="."/>
                    <xs:field xpath="../@countryName/> <!-- No longer allowed to access ancestor -->
                    <xs:field xpath="@cityName/>
                </xs:key>
                <xs:complexType>
                    <xs:attribute name="cityName" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="countryName" type="xs:string" use="required"/>
    </xs:complexType>
</xs:element>

In this example, an index is built up in which elements are inserted under compound keys that depend on an ancestor of the elements.

Is there another possibility to built such kinds of indices?

Ciao,
Stefan


--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Received on Tuesday, 17 April 2001 11:51:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:50 GMT