[xslt] some bugs with pattern node()
- From: Matthias Benkmann <m s b gmx net>
- To: xslt gnome org
- Subject: [xslt] some bugs with pattern node()
- Date: Sun, 21 Jul 2002 11:50:36 +0200
The attached 2 files demonstrate some bugs in xsltproc/libxslt/libxml2
xml> xsltproc --version
Using libxml 20423, libxslt 10019 and libexslt 710
xsltproc was compiled against libxml 20423, libxslt 10019 and libexslt 710
libxslt 10019 was compiled against libxml 20423
libexslt 710 was compiled against libxml 20423
1st bug:
xml> xsltproc test.xsl test.xml
<?xml version="1.0"?>
bar
This is incorrect. The "bar" text node should not appear in the output
because it should be matched by the template with pattern "node()".
2nd bug:
If "node()" is replaced with the equivalent "child::node()", xsltproc
fails with
xsltCompilePattern : failed to compile 'child::node()'
3rd bug:
If "node()" is replaced with "node()|text()" as a workaround to bug 1,
then xsltproc does not output anything. The correct behaviour would be to
output just the xml declaration, because omit-xml-declaration="no".
MSB
<foo>
bar
</foo>
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="no"/>
<xsl:template match="/|foo">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="node()">
</xsl:template>
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]