[xslt] "text" output bug(?)
- From: ben <nicolas marsgui libertysurf fr>
- To: xslt gnome org
- Subject: [xslt] "text" output bug(?)
- Date: Fri, 27 Jul 2001 18:04:39 +0200
Hello,
I'm new to the list and I try to use xsltproc. I want to use it to
transform some XML files to another format thanks to private XSL
stylesheets.
Releases:
- libxml2-2.4.1
- libxslt-0.14.0
With the following case, xsltproc doesn't want to work:
* I run xsltproc on the following stylesheet:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
<xsl:import href="/path/to/my-main-stylesheet.xsl"/>
</xsl:stylesheet>
* with my-main-stylesheet.xsl output method set to "text".
Then, I've the stderr output:
xsltApplyStylesheet: unsupported method (null)
Looking in the code, I've patched libxslt/transform.c like this, since
in my working case the style method is null:
diff -u libxslt/transform.c.original libxslt/transform.c
--- libxslt/transform.c.original
+++ libxslt/transform.c
@@ -1500,7 +1500,8 @@
res = htmlNewDoc(doctypeSystem, doctypePublic);
if (res == NULL)
goto error;
- } else if (xmlStrEqual(style->method, (const xmlChar *) "text")) {
+// } else if (xmlStrEqual(style->method, (const xmlChar *) "text")) {
+ } else if (xmlStrEqual(method, (const xmlChar *) "text")) {
ctxt->type = XSLT_OUTPUT_TEXT;
res = xmlNewDoc(style->version);
if (res == NULL)
@@ -3063,7 +3064,8 @@
res = htmlNewDoc(doctypeSystem, doctypePublic);
if (res == NULL)
goto error;
- } else if (xmlStrEqual(style->method, (const xmlChar *) "text")) {
+// } else if (xmlStrEqual(style->method, (const xmlChar *) "text")) {
+ } else if (xmlStrEqual(method, (const xmlChar *) "text")) {
ctxt->type = XSLT_OUTPUT_TEXT;
res = xmlNewDoc(style->version);
if (res == NULL)
Can you confirm that the patch is ok? If not, can you give me a
workaround to make my translation work?
Thanks,
BG
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]