Re: [xsl] using exsl:node-set()

Subject: Re: [xsl] using exsl:node-set()
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Mon, 26 Jul 2004 04:37:51 -0600
What processor are you using? I would personally recommend Saxon which implements the exslt node-set() function built into the architecture. But every other major processor either implements all or portions of the exslt functions or variations there of, which, other than namespace and syntax of the function names, perform the needed functionality you are looking for. This is not to suggest that the templates available at are of no use... many of them will serve your needs quite well. But the node-set() function can not be implemented using an XSLT template. But it's the hard work and efforts of the exslt group that helped convince many of the processor vendors to build the outlined functionality directly into the processors themselves. By looking at the documentation that came with your processor you are more than likely to find exact details that outline how to implement that processors implementation of the node-set() function.

An example using Saxon:

<xsl:stylesheet version="1.0"

and then implement it in your stylesheet by using the namespace:function combination:

<xsl:variable name="foo">
...logic to build temporary tree

<xsl:apply-templates select="exsl:node-set($foo)"/>

Best of luck!

:: Saxon.NET general public early beta will be available Tuesday, July 27th ::
:: DISCLAIMER: All efforts have been made to ensure a quality beta release ::
:: None-the-less, this is an early beta release that should only be used ::
:: in test environments for the purpose of testing performance and helping ::
:: to locate potential bugs and performance bottlenecks. With this in mind ::

Markus Hanel wrote:
I make something wrong! I want to use the exsl:node-set() function but at there is no download of the exsl.node-set.xsl stylesheet. But
in the main download there are two stylesheets: exsl.node-set.1.xsl and
exsl.node-set.2.xsl, but this not works.


<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:exsl=""; extension-element-prefixes="exsl">

<xsl:import href="exsl.node-set.1.xsl" />
<xsl:import href="exsl.node-set.2.xsl" />

<xsl:template match="/">

  <xsl:apply-templates select="./table" />

<xsl:template match="table">
<xsl:variable name="sorted-rows-rtf">
    <xsl:for-each select="./row">
      <xsl:sort select="sum(./cell/@points)" data-type="number"
order="descending" />
      <xsl:copy-of select="." />

  <xsl:variable name="sorted-rows"
select="exsl:node-set($sorted-rows-rtf)/row" />
  <xsl:value-of select="sum($sorted-rows[position() &lt;= 4]/cell/@points)"

Current Thread