#39851 [Opn->Bgs]: Indentation with XMLWriter::writePi()

From: Date: Sat, 16 Dec 2006 11:01:13 +0000
Subject: #39851 [Opn->Bgs]: Indentation with XMLWriter::writePi()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106418@lists.php.net to get a copy of this message
ID: 39851 Updated by: rrichards@php.net Reported By: fabrice at scriptsphp dot org -Status: Open +Status: Bogus Bug Type: XML related Operating System: debian sarge PHP Version: 5.2.0 New Comment: Not PHP issue. Upgrade to libxml2 2.6.24+. Was a bug there. Previous Comments: ------------------------------------------------------------------------ [2006-12-16 10:27:13] fabrice at scriptsphp dot org Description: ------------ It seems that Indentation is not working well when the XMLWriter::writePi() method is called. Reproduce code: --------------- <?php $X = new XMLWriter; $X->openMemory(); $X->setIndent(true); $X->startDocument('1.0', 'UTF-8'); $X->writePi('xml-stylesheet' , 'type="text/css" href="/style.css"'); $X->writePi('xml-stylesheet' , 'type="text/xsl" href="/style.xsl"'); $X->writeComment('XMLWriter - PHP5.2'); $X->startElement ('tag'); $X->endElement(); echo $X->flush(); ?> Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="/mon-style.css"?> <?xml-stylesheet type="text/xsl" href="/mon-style.xsl"?> <!--XMLWriter - PHP5.2--> <tag/> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="/mon-style.css"?><?xml-stylesheet type="text/xsl" href="/mon-style.xsl"?><!--XMLWriter - PHP5.2--> <tag/> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39851&edit=1

« previous php.bugs (#106418) next »