[xsl] Re: libxslt version changes RTF or exsl node-set sorting behavior

Subject: [xsl] Re: libxslt version changes RTF or exsl node-set sorting behavior
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sun, 1 Feb 2004 14:45:58 +0100
>   Well libxslt works for a lot of stuff, maybe you hit a problem
> nobody else hit or reported before. If it is not reported I cannot
> guess there is a problem, and we cannot fix it.

Unfortunately, my experience with libxslt is quite similar to that of David

The latest problem was using this stylesheet:

<xsl:stylesheet version="1.0"

  <xsl:output method="text"/>

 <xsl:key name="kdistNS" match="namespace" use="."/>

  <xsl:template match="/">
    <xsl:variable name="vrtfNamespaces">
      <xsl:apply-templates select="*">
        <xsl:with-param name="pNamespaces" select="/.."/>

                   generate-id(key('kdistNS', .)[1])
      select="concat('&#xA;', substring-before(.,'|'),
                     ': ', substring-after(.,'|')

  <xsl:template match="*">
    <xsl:for-each select=" namespace::*">
        <xsl:value-of select="concat(name(), '|', .)"/>

    <xsl:apply-templates select="*"/>

to transform this source xml document:

  <foo:test xmlns:foo="bigrabbit" foo:gg="3"
    <bar xmlns:foo="littlerabbit"
    <baz xmlns:hi="anothernamespace"
         hi:attr="value" />
  <p1:anc1 xmlns:p1="ns1">
    <p1:anc2 xmlns:p1="ns2">
      <p1:anc3 xmlns:p1="ns1" />

As result I do not get any output from the transformation, but only these

Transformation failed.
Using libxml 20504, libxslt 10027 and libexslt 718
xsltproc was compiled against libxml 20504, libxslt 10027 and libexslt 718
libxslt 10027 was compiled against libxml 20504
libexslt 718 was compiled against libxml 20504
Parsing stylesheet (Untitled) took 0 ms
Parsing document (Untitled) took 0 ms
Running stylesheet and saving result took 0 ms

I am aware of the fact that the versions I have of libxml/libxslt are
probably not the latest one available and I hope that this transformation
runs OK with the newest versions.

The result from MSXML3 (with MS native implementation of the node-set()
extension), MSXML4,  dotNet XslTransform(), Saxon 6.5.3, JD, XalanJ 2.4.1
and 4xslt is:

xml: http://www.w3.org/XML/1998/namespace
foo: bigrabbit
foo: littlerabbit
hi: anothernamespace
p1: ns1
p1: ns2


Dimitre Novatchev,
FXSL developer,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

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

Current Thread