W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2009

[XML Schema 1.1] XPath in <alternative> cannot look up or down the tree, correct?

From: Costello, Roger L. <costello@mitre.org>
Date: Mon, 11 May 2009 08:17:04 -0400
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003F3FE36FC@IMCMBX3.MITRE.ORG>

Hi Folks,

I wish to confirm my understanding.

Here's an example that uses the <alternative> element:

<xs:element name="Publication" type="PublicationType">
    <xs:alternative test="____" type="..." />
</xs:element>


It is my understanding that the XPath expression in test="____" must only reference attributes of Publication. It cannot reference ancestors and it cannot reference descendants. 

That is, the XPath in an alternative element cannot look up or down the tree.

Do I have a correct understanding?

/Roger
Received on Monday, 11 May 2009 12:17:42 GMT

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