#32209 [Opn->Bgs]: Missing ? in processing instruction
| From: | derick@php.net | Date: | Mon, 07 Mar 2005 07:10:09 +0000 |
| Subject: | #32209 [Opn->Bgs]: Missing ? in processing instruction | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76878@lists.php.net to get a copy of this message | ||
ID: 32209
Updated by: derick@php.net
Reported By: md2perpe at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: *
PHP Version: 5CVS-2005-03-06
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 02:01:22] Jared dot Williams1 at ntlworld dot com
saveHTML is correctly using SGML processing instruction close. HTML
isnt XML.
Use saveXML for XML/XHTML.
------------------------------------------------------------------------
[2005-03-06 22:35:42] md2perpe at gmail dot com
Description:
------------
According to http://www.w3.org/TR/REC-xml/#sec-pi
a processing
instruction should begin with <?something and end with ?>. But
DOMDocument::createProcessingInstruction doesn't output the
questionmark at the end.
Reproduce code:
---------------
<?php
$doc = new DOMDocument();
$pi = $doc->createProcessingInstruction('name', 'content');
$doc->appendChild($pi);
echo $doc->saveHTML();
?>
Expected result:
----------------
<?name content?>
Actual result:
--------------
<?name content>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32209&edit=1