W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > September 2008

XPath2 F&O fn:id() broken wrt XPointer

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Wed, 03 Sep 2008 17:07:52 +0100
To: public-xml-core-wg@w3.org
Message-ID: <f5b4p4xfc13.fsf@hildegard.inf.ed.ac.uk>

Hash: SHA1

F&O defines fn:id [1], which retrieves element(s) with a given ID, as
you would expect wrt elements with attributes of type ID, but as
follows for elements:

 "The is-id property (See Section 5.5 is-id AccessorDM.) of the
  element node is true, and the typed value of the element node is
  equal to V under the rules of the eq operator using the Unicode code
  point collation."

So if we have

 <foo xml:id='baz'/>


 <foo myid='baz'/> where myid is assigned type ID by schema validation

the value of fn:id('baz') is the foo element, but if we have

  <myid>baz</myid>   where myid is assigned type ID by schema validation

the value of fn:id('baz') is the myid element.

This is out of sync with XML Schema's intentions, and, more to the
point for this WG, at odds with the XPointer framework spec's
definition of shorthand (barename) pointer resolution [2].

I think we should ask QT for an erratum.


[1] http://www.w3.org/TR/xquery-operators/#func-id
[2] http://www.w3.org/TR/xptr-framework/#term-sdi
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Wednesday, 3 September 2008 16:08:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:39 UTC