Re: [xslt] Selecting on nodeset in variable from stylesheet



On Fri, Dec 12, 2003 at 10:05:15PM +0100, Elizabeth Mattijsen wrote:
> Hmmm... I can't find a "result value tree" in here.  I assume you 
> mean "result tree fragment" as in paragraph 11.1:
> 
> 11.1 Result Tree Fragments
yes

> >you must use a non-standard extension called node-set() to do what
> >you want, and it's noti correct from an XSLT-1.0 point of view.
> 
> So I guess my stylesheet should have looked like this:
> 
> <xsl:stylesheet version="1.0"
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>  xmlns:exslt="http://exslt.org/common";
> >
> <xsl:template match="/">
> 
> <xsl:variable name="foo"><name>bar</name></xsl:variable>
> <xsl:value-of select="exslt:node-set($foo)/name"/>

  yes,

> Ok, fair enough.  I think it is a particularly ugly thing that you 
> need to do to get the result you expect.  I assume that will be 
> better in XSLT 2.0...  ;-)

  Assuming I implement XSLT-2.0 ...

> Thanks for the feedback, Daniel.

  No problem, it's a FAQ really, not limited to libxslt, it's a general
problem for beginners with the language.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]