I have just entered a bug report, #42332, on CPAN for this problem: Martin, thanks for your help. The xslbug.xsl documents 2 separate problems with the 1.63 version of LibXSLT. Be advised that the LibXSLT module is effectively unuseable with output method = text as follows: 1) < and > are always escaped unless you use the d-o-e option. This is just wrong. 2) the 'd-o-e' option inserts a newline before and after the text-element which is wrong and additionally makes this hack unuseable as a workaround. Summary of the attached documentation: apply.pl: a simple perl script which loads libxslt and libxml, and process a list of files using the first arg: perl -w apply.pl xsl-file xml-file+ xslbug.xml: a trivial single-element xml file. xslbug.xsl: 3 simple, annotated output sequences which expose the two problems. console.txt: contains the output from running xsltproc, running LibXSLT, and the associated version information for all the modules and programs used. The workaround for this problem is to call the XSLTPROC module directly on file versions of the inputs and then load the results as needed for further processing.
Attachment:
apply.pl
Description: apply.pl
<?xml version="1.0"?> <DUMMY> </DUMMY>
Attachment:
xslbug.xsl
Description: xslbug.xsl
****************************************** output using xsltproc -- which is correct C:\myTk\dd>xsltproc xslbug.xsl xslbug.xml SOD"simple-text: <hello>goodbye"EOD SOD"cdata-section: <hello>goodbye"EOD SOD"d-o-e-text-element: <hello>goodbye"EOD C:\myTk\dd> **************************************************************** output using simple XML:LibXSLT, XML::LibXML wrapper (apply.pl) C:\myTk\dd>perl -w apply.pl xslbug.xsl xslbug.xml <?xml version="1.0"?> SOD"simple-text: <hello>goodbye"EOD SOD"cdata-section: <hello>goodbye"EOD SOD "d-o-e-text-element: <hello>goodbye" EOD C:\myTk\dd> ************************************************************* versions C:\myTk\dd>xsltproc --version Using libxml 20702, libxslt 10124 and libexslt 813 xsltproc was compiled against libxml 20701, libxslt 10124 and libexslt 813 libxslt 10124 was compiled against libxml 20701 libexslt 813 was compiled against libxml 20701 C:\myTk\dd> C:\myTk\dd>perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1004 [287188] provided by ActiveState http://www.ActiveState.com Built Sep 3 2008 13:16:37