[xslt] BUG: [1] != [position()=1]
- From: Matthias Benkmann <m s b gmx net>
- To: xslt gnome org
- Subject: [xslt] BUG: [1] != [position()=1]
- Date: Thu, 27 Jun 2002 17:04:56 +0200
The attached 2 files demonstrate a bug in xsltproc/libxslt/libxml2
xml> xsltproc --version
Using libxml 20422, libxslt 10018 and libexslt 709
xsltproc was compiled against libxml 20422, libxslt 10018 and libexslt 709
libxslt 10018 was compiled against libxml 20422
libexslt 709 was compiled against libxml 20422
/xml> xsltproc bug.xsl test.xml
<?xml version="1.0"?>
21
The expected result (and the result produced by saxon) is 22, i.e. [1] is
supposed to be the same as [position()=1].
MSB
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="set1"
select="(/descendant::node()/attribute::*|/descendant::node())/ancestor-or-self::node()[1]"/>
<xsl:variable name="set2"
select="(/descendant::node()/attribute::*|/descendant::node())/ancestor-or-self::node()[position()=1]"/>
<xsl:template match="/">
<xsl:value-of select="count($set1)"/>
<xsl:value-of select="count($set2)"/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="iso-8859-1"?>
<net foo="bar"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]