Re: [xslt] Namespace issue
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] Namespace issue
- Date: Wed, 25 Apr 2001 08:56:06 -0400
On Wed, Apr 25, 2001 at 02:27:53PM +0200, Echoes wrote:
> Hello,
>
> I attached two test files that cause xsltproc to
> core dump. The seg fault traces back to an xpath.c
> function :
Okay, fixed, was a problem related to the attempt to sort namespace nodes.
Applying the enclosed patch to libxml fixes it:
orchis:~/XSLT/tests/general -> xsltproc ./bug-12-.xsl ./../docs/bug-12-.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<namespace>http://test.com</namespace>
orchis:~/XSLT/tests/general ->
I was surprized at first by the result (one would expect 2 namespaces
to show up, the expression //namespace::* returns a node list with both
but string() prints only the value of the first, so it's normal)
thanks for the report,
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Index: xpath.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/xpath.c,v
retrieving revision 1.102
diff -c -r1.102 xpath.c
*** xpath.c 2001/04/23 13:41:34 1.102
--- xpath.c 2001/04/25 12:55:23
***************
*** 1098,1103 ****
--- 1098,1106 ----
*/
if (node1 == node2)
return(0);
+ if ((node1->type == XML_NAMESPACE_DECL) ||
+ (node2->type == XML_NAMESPACE_DECL))
+ return(1);
if (node1 == node2->prev)
return(1);
if (node1 == node2->next)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]