Re: [xslt] Error on identity transform
- From: "William M. Brack" <wbrack mmm com hk>
- To: "The Gnome XSLT library mailing-list" <xslt gnome org>
- Subject: Re: [xslt] Error on identity transform
- Date: Sat, 15 Dec 2007 11:04:50 -0800 (PST)
Schubert, Aaron wrote:
> I am testing an upgrade of libxml/libxslt with the following versions:
>
> - XML_LIBS = /libxml/2.6.23/lib/libxml2.a
> + XML_LIBS = /libxml/2.6.30/lib/libxml2.a
>
> - XSLT_LIBS = /libxslt/1.1.15/lib/libxslt.a
> + XSLT_LIBS =/libxslt/1.1.22/lib/libxslt.a
>
> C code that calls xsltParseStylesheetFile is spitting out the following
> error:
>
> runtime error: file /........../upgrade.xsl line 15 element copy
> Attribute nodes must be added before any child nodes to an element.
>
> This appears to be complaining about the identity transform. See below.
>
> That xsl file has the following lines at the start of the file:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:variable name="Modified">false</xsl:variable>
> <xsl:variable name="no_button">NoButton</xsl:variable>
> <xsl:variable name="newline">
> <xsl:text>
>
> </xsl:text>
> </xsl:variable>
>
> <xsl:template match="node()|@*">
> <xsl:copy>
> <xsl:apply-templates select="node()|@*" />
> </xsl:copy>
> </xsl:template>
>
> .
> .
> .
>
> I also tried the following:
> <xsl:template match="@*|node()">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()" />
> </xsl:copy>
> </xsl:template>
>
> One example on the web stated that I should add the following after
> <xsl:copy>
>
> <xsl:copy-of select="@*"/>
>
> Didn't work.
>
> I'm assuming this must be some environment issue. Any ideas?
>
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt gnome org
I don't see the problem you're reporting:
[bill bbxp work]$ xsltproc --version
Using libxml 20630, libxslt 10122 and libexslt 813
xsltproc was compiled against libxml 20629, libxslt 10122 and libexslt 813
libxslt 10122 was compiled against libxml 20629
libexslt 813 was compiled against libxml 20629
[bill bbxp work]$ xsltproc bug.xsl bug.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:variable name="Modified">false</xsl:variable>
<xsl:variable name="no_button">NoButton</xsl:variable>
<xsl:variable name="newline">
<xsl:text>
</xsl:text>
</xsl:variable>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
[bill bbxp work]$
Bill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]