#32711 [Bgs->Opn]: CDATA elements are not preserved
ID: 32711 User updated by: phpspam at talkingspider dot com Reported By: phpspam at talkingspider dot com -Status: Bogus +Status: Open Bug Type: DOM XML related Operating System: Fedora C2 PHP Version: 4.3.9 New Comment: Can you give me a link to a previous bug report explaining why this won't be fixed? (Obviously?) Previous Comments: [2005-04-17 04:25:05] [EMAIL PROTECTED] This has been covered in previous bug reports on why it wont be changed [2005-04-17 03:23:33] phpspam at talkingspider dot com No, they are NOT identical. It's called a canonical value. Think back to your computer science education. http://www.w3.org/TR/2001/REC-xml-c14n-20010315 The official spec for DOM does specify that CDATA nodes are labelled as such in the DOM. In other words, in the dom, CDATA nodes are CDATA nodes and text nodes are text nodes, they are not the same thing. So, for example, you should be able to crawl the dom and spot CDATA nodes. So, either one of two things are still broken: Either your parsing function is deciding to convert CDATA into text nodes, in which case, when the DOM is built, it never has CDATA nodes in it, even though they are present in the input xml. Or, your output function is deciding to convert all the CDATA nodes in the DOM into text nodes. In either case, that's a bug. In perl I can choose to preserve CDATA elements when I output. In PHP I can't. http://www.w3schools.com/dom/dom_cdatasection.asp [2005-04-16 02:21:16] [EMAIL PROTECTED] I don't understand. If you're saying that:
#32711 [Bgs->Opn]: CDATA elements are not preserved
ID: 32711 User updated by: phpspam at talkingspider dot com Reported By: phpspam at talkingspider dot com -Status: Bogus +Status: Open Bug Type: DOM XML related Operating System: Fedora C2 PHP Version: 4.3.9 New Comment: No, they are NOT identical. It's called a canonical value. Think back to your computer science education. http://www.w3.org/TR/2001/REC-xml-c14n-20010315 The official spec for DOM does specify that CDATA nodes are labelled as such in the DOM. In other words, in the dom, CDATA nodes are CDATA nodes and text nodes are text nodes, they are not the same thing. So, for example, you should be able to crawl the dom and spot CDATA nodes. So, either one of two things are still broken: Either your parsing function is deciding to convert CDATA into text nodes, in which case, when the DOM is built, it never has CDATA nodes in it, even though they are present in the input xml. Or, your output function is deciding to convert all the CDATA nodes in the DOM into text nodes. In either case, that's a bug. In perl I can choose to preserve CDATA elements when I output. In PHP I can't. http://www.w3schools.com/dom/dom_cdatasection.asp Previous Comments: [2005-04-16 02:21:16] [EMAIL PROTECTED] I don't understand. If you're saying that:
#32711 [Bgs->Opn]: CDATA elements are not preserved
ID: 32711 User updated by: phpspam at talkingspider dot com Reported By: phpspam at talkingspider dot com -Status: Bogus +Status: Open Bug Type: DOM XML related Operating System: Fedora C2 PHP Version: 4.3.9 New Comment: That is not a realistic response. You already have the latest php 4.x version installed somewhere, why should I have to install it on my side? You could do in 5 minutes what would take me 50. You also have access to all of the bugs that were ever fixed, search for this and if it's not there then it was never fixed. Previous Comments: [2005-04-15 14:01:17] [EMAIL PROTECTED] Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. [2005-04-15 04:34:01] phpspam at talkingspider dot com Description: Read in an xml file that has CDDATA elements using domxml_open_file and then write it out using DomDocument->dump_file. The CDATA elements get turned into text elements. Reproduce code: --- //Read in an xml file that has CDDATA elements using //domxml_open_file and then write it out using //DomDocument->dump_file. The CDATA elements get turned into text elements. Expected result: There's no justifiable reason why it should convert CDATA elements to text elements. Actual result: -- The CDATA elements get turned into text elements. -- Edit this bug report at http://bugs.php.net/?id=32711&edit=1
#32711 [NEW]: CDATA elements are not preserved
From: phpspam at talkingspider dot com Operating system: Fedora C2 PHP version: 4.3.9 PHP Bug Type: DOM XML related Bug description: CDATA elements are not preserved Description: Read in an xml file that has CDDATA elements using domxml_open_file and then write it out using DomDocument->dump_file. The CDATA elements get turned into text elements. Reproduce code: --- //Read in an xml file that has CDDATA elements using //domxml_open_file and then write it out using //DomDocument->dump_file. The CDATA elements get turned into text elements. Expected result: There's no justifiable reason why it should convert CDATA elements to text elements. Actual result: -- The CDATA elements get turned into text elements. -- Edit bug report at http://bugs.php.net/?id=32711&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32711&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32711&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32711&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=32711&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=32711&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32711&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32711&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32711&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32711&r=support Expected behavior: http://bugs.php.net/fix.php?id=32711&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32711&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32711&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=32711&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32711&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=32711&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32711&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32711&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32711&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32711&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32711&r=mysqlcfg