note 76589 added to function.xsl-xsltprocessor-import-stylesheet
| From: | fcartegnie at osu1 dot php dot net | Date: | Sat, 21 Jul 2007 13:11:59 +0000 |
| Subject: | note 76589 added to function.xsl-xsltprocessor-import-stylesheet | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128795@lists.php.net to get a copy of this message | ||
PHP5 xsl processor has a different behaviour than PHP4's one with CDATA sections. (see http://bugs.php.net/bug.php?id=29837)
Loaded XSL sheet CDATA sections does not allow, by default, output-escaping handling (everything in
the CDATA is escaped by default).
So in this case you can't build your XSL Dom the usual way:
$xsldom = DomDocument::loadXML(file_get_contents('sheet.xsl'));
and must go through this one (allowing LIBXML_NOCDATA parameter):
$xsldom = new DomDocument;
$xsldom->load('sheet.xsl', LIBXML_NOCDATA);
Then the CDATA output-escaping behaviour will be correct.
----
Server IP: 217.174.196.197
Probable Submitter: 82.251.104.119
----
Manual Page -- http://www.php.net/manual/en/function.xsl-xsltprocessor-import-stylesheet.php
Edit -- https://master.php.net/note/edit/76589
Del: integrated -- https://master.php.net/note/delete/76589/integrated
Del: useless -- https://master.php.net/note/delete/76589/useless
Del: bad code -- https://master.php.net/note/delete/76589/bad+code
Del: spam -- https://master.php.net/note/delete/76589/spam
Del: non-english -- https://master.php.net/note/delete/76589/non-english
Del: in docs -- https://master.php.net/note/delete/76589/in+docs
Del: other reasons-- https://master.php.net/note/delete/76589
Reject -- https://master.php.net/note/reject/76589
Search -- https://master.php.net/manage/user-notes.php