Bug #72052 [Com]: DOM truncates XML namespace prefixes to 20 characters
| From: | radu dot groza at bitstone dot eu | Date: | Tue, 02 May 2017 10:27:11 +0000 |
| Subject: | Bug #72052 [Com]: DOM truncates XML namespace prefixes to 20 characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208898@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72052&edit=1
ID: 72052
Comment by: radu dot groza at bitstone dot eu
Reported by: fg at numlog dot fr
Summary: DOM truncates XML namespace prefixes to 20
characters
Status: Open
Type: Bug
Package: DOM XML related
Operating System: Linux Debian 8.4
PHP Version: 5.6.20
Block user comment: N
Private report: N
New Comment:
any updates on this ? having the exact same issue
Previous Comments:
------------------------------------------------------------------------
[2016-04-18 18:22:04] fg at numlog dot fr
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 this bug report at https://bugs.php.net/bug.php?id=72052&edit=1