[xml] segfault with example prog.
- From: crille <crille cccab net>
- To: xml gnome org
- Subject: [xml] segfault with example prog.
- Date: Mon, 13 Aug 2001 22:50:35 +0200
Hi,
im trying to use the example from :
http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html
and the following xml/xsl.
XSL:
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="/">
<html>
<head><title>Know Your Dromedaries</title></head>
<body>
<table bgcolor="eeeeee" border="1">
<tr>
<th>Species</th>
<th>No of Humps</th>
<th>Disposition</th>
</tr>
<xsl:for-each select="dromedaries">
<xsl:apply-templates select="./species" />
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="species">
<tr>
<td><xsl:value-of select="@name" /></td>
<td><xsl:value-of select="./humps" /></td>
<td><xsl:value-of select="./disposition" /></td>
</tr>
</xsl:template>
</xsl:stylesheet>
--------------------------
XML:
<?xml version="1.0"?>
<dromedaries>
<species name="Camel">
<humps>1 or 2</humps>
<disposition>Cranky</disposition>
</species>
<species name="Llama">
<humps>1 (sort of)</humps>
<disposition>Aloof</disposition>
</species>
<species name="Alpaca">
<humps>(see Llama)</humps>
<disposition>Friendly</disposition>
</species>
</dromedaries>
This xslt works great in xsltproc but segfaults with the example code.
libxml2-2.4.1
libxslt-1.0.1
GNU gdb 5.0
Copyright 2000 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-slackware-linux"...
(gdb) run drome.xsl drome.xml
Starting program: /home/crille/C/./libxml drome.xsl drome.xml
Program received signal SIGSEGV, Segmentation fault.
xsltGatherNamespaces (style=0x8059d90) at xslt.c:1183
1183 if (cur->type == XML_ELEMENT_NODE) {
(gdb)
What's missing? am i an idiot or what?
please advice,
Crille
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]