Bug #72052 [Opn->Fbk]: DOM truncates XML namespace prefixes to 20 characters

From: Date: Tue, 02 May 2017 10:37:38 +0000
Subject: Bug #72052 [Opn->Fbk]: DOM truncates XML namespace prefixes to 20 characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208900@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 Updated by: requinix@php.net Reported by: fg at numlog dot fr Summary: DOM truncates XML namespace prefixes to 20 characters -Status: Open +Status: Feedback 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: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. https://3v4l.org/pq53Z Previous Comments: ------------------------------------------------------------------------ [2017-05-02 10:27:07] radu dot groza at bitstone dot eu any updates on this ? having the exact same issue ------------------------------------------------------------------------ [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

« previous php.bugs (#208900) next »