From: fabrice at scriptsphp dot org Operating system: debian sarge PHP version: 5.2.0 PHP Bug Type: XML related Bug description: Indentation with XMLWriter::writePi()
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 bug report at http://bugs.php.net/?id=39851&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39851&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39851&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39851&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39851&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39851&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39851&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39851&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39851&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39851&r=support Expected behavior: http://bugs.php.net/fix.php?id=39851&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39851&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39851&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39851&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39851&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39851&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39851&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39851&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39851&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39851&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39851&r=mysqlcfg