Bug #72052 [NEW]: DOM truncates XML namespace prefixes to 20 characters
| From: | fg at numlog dot fr | Date: | Mon, 18 Apr 2016 18:22:09 +0000 |
| Subject: | Bug #72052 [NEW]: DOM truncates XML namespace prefixes to 20 characters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200637@lists.php.net to get a copy of this message | ||
From: fg at numlog dot fr
Operating system: Linux Debian 8.4
PHP version: 5.6.20
Package: DOM XML related
Bug Type: Bug
Bug description:DOM truncates XML namespace prefixes to 20 characters
Description:
------------
First : my PHP version is 5.6.19, but it's not listed above.
When using DOMNode::replaceChild or DOMNode::appendChild or
DOMNode::insertBefore in order to insert a node which includes long
namespace prefixes (ex. :
"variable_trade_item_information:variableTradeItemInformationModule"),
the prefix is truncate to 20 characters. In this example it becomes
"variable_trade_item_:variableTradeItemInformationModule".
When inserting such a node, DOM also adds in the root tag of the node
all the definitions of the prefix used in the node. This bunch of prefix
definitions include the same truncated prefixes.
May be this header is created because the truncated prefixes are not
declared (after they have been truncated), as their definitions in the
tag itself are not truncated. Ex; :
<variable_trade_item_:variableTradeItemInformationModule
xmlns:variable_trade_item_information="urn:gs1:gdsn:variable_trade_item_information:xsd:3"
... (snipped) >
Test script:
---------------
Sorry but my test script depends on large XML file...
--
Edit bug report at https://bugs.php.net/bug.php?id=72052&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72052&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72052&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72052&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72052&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72052&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72052&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72052&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72052&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72052&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72052&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72052&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72052&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72052&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72052&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72052&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72052&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72052&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72052&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72052&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72052&r=mysqlcfg