Open GoogleCodeExporter opened 9 years ago
Probably a problem of xsltproc. On Windows 2000 with msxsl.exe it's fractions
of a second:
@echo off
cls
echo Start
echo. | time
msxsl.exe testselect.xml xml2json.xsl -o own.json.txt
echo Stop
echo. | time
echo --------------------------------------------
echo Start
echo. | time
msxsl.exe testselect.xml xml2json-martynas.xsl -o xml2json-martynas.json.txt
echo Stop
echo. | time
Output:
Start
The current time is: 22:38:23,54
Enter the new time:
Stop
The current time is: 22:38:23,82
Enter the new time:
--------------------------------------------
Start
The current time is: 22:38:23,84
Enter the new time:
Stop
The current time is: 22:38:23,91
Enter the new time:
About the different output: we probably don't want to have breaking changes,
but I'll leave it open for now.
Benchmarked using a Athlon(tm) XP 1800+ and 256MB RAM running Windows 2000 SP4
Original comment by doek...@gmail.com
on 17 Jun 2010 at 8:44
Interesting. Thanks for looking into it. I tested a little more, this time
using PHP. It looks like it's a problem in libxml and/or libxslt.
[colin@vwing debug]$ php5 -a
Interactive shell
php > $xml = new DOMDocument();
php > $xml->load("testselect.xml");
php > $xslt = new XSLTProcessor();
php > $xsl = new DOMDocument();
php > $xsl->load("xml2json.xsl", LIBXML_NOCDATA);
php > $xslt->importStylesheet($xsl);
php > print $xslt->transformToXML($xml);
<output snipped>
php > $xsl = new DOMDocument();
php > $xsl->load("xml2json-martynas.xsl",LIBXML_NOCDATA);
php > $xslt->importStylesheet($xsl);
php > print $xslt->transformToXML($xml);
<output snipped>
I just wall-clocked it this time, and the time was approximately the same.
Original comment by colind...@gmail.com
on 17 Jun 2010 at 9:16
Original issue reported on code.google.com by
colind...@gmail.com
on 17 Jun 2010 at 4:10Attachments: