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


--- Comment #5 from Eric van der Vlist <vdv@dyomedea.com> 2012-03-28 21:15:28 UTC ---
(In reply to comment #4)

> In your example there should be no "/foo" step, since the foo element is not a
> child of anything.

Yes, of course.

> I think I can see why you want a path that works regardless where in the tree
> you are currently positioned, rather than requiring you to be positioned at the
> root. But I don't understand why ((ancestor-or-self::node())[1] is preferable
> to root().
> Neither of these works as an XSLT pattern. If we want to generate something
> that works both (a) as a pattern that selects the original node, and only the
> original node (which is a use case I hadn't thought of), and (b) as a path
> expresion that selects the original node, and only the original node, starting
> from an origin anywhere within the tree, then it would have to be something
> rather clumsy. Perhaps the cleanest would be for us to allow root() at the
> start of a pattern, and then generate root()[self::foo]/bar[1].

Agreed. To take my example, returning either "root()" or "root()[self::foo]"
(more verbose but more self describing) to identify the <foo/> element and
"root()/bar" or "root()[self::foo]/bar" would work for me.



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 Wednesday, 28 March 2012 21:15:32 UTC