PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » XML » XML_Beautifier » Bug #1232

The standalone attributes turned to 'on'

Details

Submitted2004-04-17 18:42 UTC
Fromguillaume dot lecanu at online dot fr
Assignedschst
StatusClosed
PackageXML_Beautifier
PHP Version4.3.4
OSDebian Sid
Roadmaps1.2.0a1

Comments

[2004-04-17 18:42 UTC] guillaume dot lecanu at online dot fr

Description:
------------
The standalone attribute of <?xml ?> tag is always change to 'yes'.

Reproduce code:
---------------
<?php
include_once 'XML/Beautifier.php';

$xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
.'<example></example>';

$fmt = new XML_Beautifier();
$out =& $fmt->formatString($xml);

print "<br />Original XML : <br />".htmlSpecialChars($xml);
print "<br />Formatted XML : <br />".htmlSpecialChars($out);
?>

Expected result:
----------------
Original XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>
Formatted XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>

Actual result:
--------------
Original XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>
Formatted XML :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><example />