[Bug 16184] [FO30] fn:path() should support fragments as well as documents

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16184

--- Comment #2 from Michael Kay <mike@saxonica.com> 2012-03-27 17:38:48 UTC ---
I was asked to put together a proposal for the detailed rules. Here is the
proposal:

Change the paragraph that reads:

<old>
Otherwise, the function constructs a string that consists of a sequence of
steps, one for each ancestor-or-self of $arg other than the document node. Each
step consists of the character "/" followed by a string whose form depends on
the kind of node selected by that step, as follows:
</old>

to:

<new>
Otherwise, the function constructs a string that consists of a sequence of
steps, one for each ancestor-or-self of $arg other than the root node. This
string is prefixed by "." if the root node is not a document node. Each step
consists of the character "/" followed by a string whose form depends on the
kind of node selected by that step, as follows:
</new>

Delete the error condition.

Add a note:

<note>
Note that if $arg is node that has neither a parent nor children (for example,
a parentless attribute node) then the result of fn:path() will be the string
".". If the root node is an element node, then the root will be represented in
the path by a first step of ".", without any indication of the element name.
</note>

Add examples of use with trees whose root is other than a document node.

(Eric, please indicate whether this specification would satisfy the use cases
you had in mind.)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 27 March 2012 17:38:52 UTC