[xslt] Namespace issue



  Hello,

 I attached two test files that cause xsltproc to
core dump. The seg fault traces back to an xpath.c
function :

GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `xsltproc namespace.xsl namespace.xml'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libxslt.so.0...done.
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Reading symbols from /usr/lib/libz.so.1...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x40075dd7 in xmlXPathCmpNodes (node1=0x805cb20, node2=0x805cb00) at
xpath.c:1115
xpath.c:1115: No such file or directory.
(gdb) bt
#0  0x40075dd7 in xmlXPathCmpNodes (node1=0x805cb20, node2=0x805cb00) at
xpath.c:1115
#1  0x40075ea7 in xmlXPathNodeSetSort (set=0x804cd48) at xpath.c:1175
#2  0x4007e0a9 in xmlXPathCompOpEval (ctxt=0x804caa8, op=0x804cb50) at
xpath.c:7244
#3  0x4007e31d in xmlXPathRunEval (ctxt=0x804caa8) at xpath.c:7351
#4  0x4007e602 in xmlXPathCompiledEval (comp=0x804cad8, ctx=0x805dbd8)
at xpath.c:7490
#5  0x4002799d in xsltValueOf (ctxt=0x805d680, node=0x805a910,
inst=0x805dc80, comp=0x804c9c8) at transform.c:1852
#6  0x4002638b in xsltApplyOneTemplate (ctxt=0x805d680, node=0x805a910,
list=0x805d638, real=1) at transform.c:886
#7  0x40026220 in xsltProcessOneNode (ctxt=0x805d680, node=0x805a910) at
transform.c:815
#8  0x40028bc2 in xsltApplyStylesheet (style=0x805ab98, doc=0x805a910,
params=0xbffff814) at transform.c:2570
#9  0x8049225 in main (argc=3, argv=0xbffff8a4) at xsltproc.c:191
#10 0x400ec9bf in __libc_start_main (main=0x8048b40 <main>, argc=3,
argv=0xbffff8a4, init=0x80488e8 <_init>, 
    fini=0x80494cc <_fini>, rtld_fini=0x4000b210 <_dl_fini>,
stack_end=0xbffff89c) at ../sysdeps/generic/libc-start.c:92
(gdb)

 The problem arise only if several namespaces are
declared in the xml file.

 Regards,

	Eugène

<?xml version='1.0' encoding="ISO-8859-1"?>

<test:schema xmlns:test="http://test.com";
             xmlns:xlink="http://xlink.com";>
<test:root >
   <test:child>
   </test:child>
</test:root>
</test:schema>
<?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"
            version="1.0"
	    encoding="ISO-8859-1"
	    indent="yes" />
	    
<xsl:template match="/">
   <namespace>
   <xsl:value-of select="//namespace::*"/>
   </namespace>
</xsl:template>

</xsl:stylesheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]