After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 530891 - element-available() : invalid arg expecting a string
element-available() : invalid arg expecting a string
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.22
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-01 14:36 UTC by Manfred Staudinger
Modified: 2008-07-10 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Manfred Staudinger 2008-05-01 14:36:33 UTC
Please describe the problem:
The function receives a text node, which is not converted to its string value.



Steps to reproduce:
1. avail-test.xml:
<e>xsl:number</e>
2. avail-test.xsl:
<xsl:stylesheet version="1.0" 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"><xsl:apply-templates/></xsl:template>
<xsl:template match="e">
	<xsl:copy>
		<xsl:value-of select="element-available(.)"/>
	</xsl:copy>
</xsl:template>
</xsl:stylesheet>
3. xsltproc avail-test.xsl avail-test.xml


Actual results:
<?xml version="1.0"?>
<e/>
runtime error: file avail-test.xsl line 14 element value-of
element-available() : invalid arg expecting a string
runtime error: file avail-test.xsl line 14 element value-of
XPath evaluation returned no result.
>Exit code: 10

Expected results:
<?xml version="1.0"?>
<e>true</e>

Does this happen every time?
Yes

Other information:
Same problem for function-available()
Comment 1 Manfred Staudinger 2008-05-01 14:40:52 UTC
See also on xsl-list:
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/200804/msg00593.html
Comment 2 William M. Brack 2008-07-10 17:13:33 UTC
fixed in svn 1482