Comparing XSLT engines
| From: | Stefan Livieratos | Date: | Mon, 26 Jun 2000 02:50:00 +0000 |
| Subject: | Comparing XSLT engines | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-22325@lists.php.net to get a copy of this message | ||
Hi,
did some simple tests with the C++ XSLT parsers Sablotron
and TransforMiiX.
To test the parsers I dynamically constructed an xml document using
domxml and then parsed it by opening a pipe to the standalones:
$ph = popen("echo '$xml'|/usr/local/bin/transfrmx -s form.xsl", "r");
OR
$ph = popen("echo '$xml'|/usr/local/bin/sabcmd form.xsl", "r");
fpassthru($ph);
I have also tried the Sablotron PHP wrapper php_sablot by reading the
XSLT Stylesheet from a file and then using:
print SablotProcessStringsSR($xsl, $xml);
Both parsers worked fast. However the major flaw with Sablotron when
trying to generate HTML is that it always transforms an empty tag like <br/>
or <input .../> into an opening and a closing tag <br></br>. TransforMiiX
on the other hand has a neat feature: it automatically recognizes xml2html
stylesheets and then prints nicely formatted (indented) HTML 4.0.
According to Laurent Bossavit TransforMiiX also supports a bigger subset
of all XSLT features than Sablotron which e.g. lacks support of <xsl:sort>.
Conclusions:
- Sablotron's xml to html transformation isn't satisfying right now. However
there is already a PHP extension available for this parser.
- TransforMiiX's support of XSLT features seems to be more mature. Laurent
Bossavit's PHP extension for this parser unfortunately is not available
at this time and he can't tell if and when it will ever be open source.
Regards,
Stefan