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


           Summary: fn:path() should support fragments as well as
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.0
        AssignedTo: mike@saxonica.com
        ReportedBy: vdv@dyomedea.com
         QAContact: public-qt-comments@w3.org

For the fn:path() function the spec says that "An error is raised
[err:FODC0001] if $arg, or the context item if the second argument is absent,
is a node in a tree whose root is not a document node."

This distinction makes that function difficult to use on a node set variable
because you don't always know if it comes from a document or a fragment.

I reckon that the XPath expression is more concise when the node comes from a
document, but couldn't it still be constructed when the node comes from a
fragment by using "ancestor-or-self::node())[1]" (or the root() function) to
access the root node and adding the relative XPath from the root to the current



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 Thursday, 1 March 2012 19:15:23 UTC