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 53304 - Problem selecting attributes with a namespace
Problem selecting attributes with a namespace
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-04-17 23:25 UTC by TJ Mather
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description TJ Mather 2001-04-17 23:25:33 UTC
I'm having a problem when selecting an attribute using LibXSLT 0.7.0.
I have included an XML file, XSL file, and the output:

test.xml:
<?xml version="1.0"?>
 
<aaa bbb:ddd="ccc" eee="fff"/>

====================================================
test.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
  <xsl:template match="aaa">
    <xsl:value-of select="@bbb:ddd"/>
    <xsl:value-of select="@eee"/>
  </xsl:template>
 
</xsl:stylesheet>
====================================================
output:
<?xml version="1.0"?>
 
fff
Comment 1 Daniel Veillard 2001-04-18 08:00:23 UTC
The test case provided is wrong. The namespace prefix bbb is not
defined in both the stylesheet and the document. Contrary to 
common belief, namespace matching is not done with the prefixes
but with the URI references associated to them.

The CVS version fixes the namespaces problems, on the given input
it produces the following result:

orchis:~/XSLT/tests/general -> xsltproc bug-7-.xsl ../docs/bug-7-.xml 
Error xpath.c:6567: Undefined namespace prefix
xmlXPathEval: evaluation failed
xsltDefaultProcessOneNode: text copy failed
<?xml version="1.0"?>
fff
orchis:~/XSLT/tests/general -> 

when both the document and the stylesheet were fixed by
adding xmlns:bbb="test:7" to their root nodes, the CVs version
generates the expected output

orchis:~/XSLT/tests/general -> xsltproc bug-7-.xsl ../docs/bug-7-.xml 
<?xml version="1.0"?>
cccfff
orchis:~/XSLT/tests/general -> 

So I consider this fixed, it will be in the next release,

Daniel