[xml/sgml-pkgs] Bug#389023: libxslt1.1: Incorrect handling of <xsl:param> names with namespaces.

Alexander Hvostov alex at aoi.dyndns.org
Sat Sep 23 12:07:48 UTC 2006


Package: libxslt1.1
Version: 1.1.17-4
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This version of libxslt appears to not properly handle the case of a
template with a parameter whose name has a namespace.

For example, the following stylesheet will fail when transforming any XML
document, while it will succeed when using Xalan (from package
xalan 1.10-3).

- -----
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:e="http://www.example.com/"
	version="1.0"
>
	<xsl:template match="/*">
		<xsl:call-template name="e:named">
			<xsl:with-param name="e:param" select="name()"/>
		</xsl:call-template>
	</xsl:template>
	
	<xsl:template name="e:named">
		<xsl:param name="e:param"/>
		
		<xsl:message><xsl:value-of select="$e:param"/></xsl:message>
	</xsl:template>
</xsl:stylesheet>
- -----

Running this through xsltproc (1.1.17-4) or xmlstarlet (1.0.1-2) yields
an error:

- -----
runtime error: file test.xsl line 16 element value-of
unregistered variable param
xmlXPathCompiledEval: evaluation failed
runtime error: file test.xsl line 16 element value-of
xsltValueOf: text copy failed
- -----

I'm guessing the namespace of the parameter is getting lost somewhere.

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libxslt1.1 depends on:
ii  libc6                      2.3.6.ds1-4   GNU C Library: Shared libraries
ii  libgcrypt11                1.2.3-2       LGPL Crypto library - runtime libr
ii  libgpg-error0              1.2-1         library for common error values an
ii  libxml2                    2.6.26.dfsg-3 GNOME XML library

libxslt1.1 recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFFSOUtHQW4HWNftkRAgNYAJ0dOQjeUsoSjUw3mad0S4ogmOV6hACgmSn4
fwPVYNFcoFX5Ah4E/aHerC8=
=shys
-----END PGP SIGNATURE-----




More information about the debian-xml-sgml-pkgs mailing list