After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 354900 - text copy failed with XInclude
text copy failed with XInclude
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-09-08 05:08 UTC by Oleg Paraschenko
Modified: 2007-01-11 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Oleg Paraschenko 2006-09-08 05:08:15 UTC
Please describe the problem:
libxml, xsltproc from CVS of 8 September 2006.

1) I get the following error

[screen]
$ xsltproc -o doc.html --xinclude test.xsl doc.xml
runtime error: file doc.xml element text
xsltDefaultProcessOneNode: text copy failed
error: file doc.xml
xsltRunStylesheet : run failed
[/screen]

when using near-identity transformation

[test.xsl]
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- -->

<xsl:template match="*">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>
[/test.xsl]

for the following XML files:

[doc.xml]
<doc>
  <xi:include href="inc.xml" xpointer="xpointer(/subdoc/sect[@id='id1']/range-to(following::sect[@id='id2']/node()[last()]))" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</doc>
[/doc.xml]

[inc.xml]
<subdoc>
  <sect id="id1">lalala</sect>
  <sect id="id2">lalala</sect>
</subdoc>
[/inc.xml]

2) Pre-running xnllint gives no error:

xmllint --xinclude doc.xml >x.xml
xsltproc -o doc.html --xinclude test.xsl x.xml


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 William M. Brack 2007-01-11 17:53:22 UTC
This was actually caused by an empty text node being produced by XInclude (i.e. libxml2-related).  I have modified libxslt (transform.c) to accept and ignore it. Thanks for the report.