Re: [xsl] Implementing XPointer Resolution With saxon:evaluate()

Subject: Re: [xsl] Implementing XPointer Resolution With saxon:evaluate()
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 14 Aug 2002 19:12:36 +0100
Hi Eliot,

> I still think it would be useful to have an XSLT element that
> returns a node set such that:
>
> <xsl:variable name="result-node-set">
>  <xsl:get-node-set select="."/>
> </xsl:variable>
> <xsl:if test="generate-id(.) = generate-id($result-node-set[1])">
>   <xsl:message>identity is preserved</xsl:message>
> </xsl:if>
>
> works. It would certainly simplify my current task and provide the
> natural companion to copy-of.

I agree. Based on the current WDs, XSLT 2.0 will be just the same
here, except that you'll be able to do all (or some!) of the funky
processing that you need to create the node-set that you want within
an XPath expression. Mostly, though, I think you'll still have to
create the node-set by building it through recursion in the ways we've
just looked at.

My preferred solution to the problem of creating sequences was to
introduce a xsl:item element to XSLT language, working in precisely
the way you illustrate above, so that you can use the full power of
XSLT for creating sequences of all kinds (see
http://lists.w3.org/Archives/Public/xsl-editors/2002JanMar/0050.html).
But it looks as though that isn't going to be adopted.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread