[Tickets #10229] Re: XML_WBXML decodeToString(): xml prolog and dtd is missing, xmlns is wrong

bugs at horde.org bugs at horde.org
Wed Jul 6 01:55:49 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10229
------------------------------------------------------------------------------
  Ticket             | 10229
  Updated By         | Michael Rubinsky <mrubinsk at horde.org>
  Summary            | XML_WBXML decodeToString(): xml prolog and dtd is
                     | missing, xmlns is wrong
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             | Jan Schneider
------------------------------------------------------------------------------


Michael Rubinsky <mrubinsk at horde.org> (2011-07-06 01:55) wrote:

Looking at this further, I don't see how that is supposed to work  
anyway. In Horde_Xml_Wbxml_DtdManager::__construct() a bunch of calls  
are made to registerDTD using the same exact $uri parameter, e.g.:
<code>
         $this->registerDTD(Horde_Xml_Wbxml_Dtd::METINF_1_0,  
'syncml:metinf', new Horde_Xml_Wbxml_Dtd_SyncMlMetInf(0));
         $this->registerDTD(Horde_Xml_Wbxml_Dtd::METINF_1_1,  
'syncml:metinf', new Horde_Xml_Wbxml_Dtd_SyncMlMetInf(1));
         $this->registerDTD(Horde_Xml_Wbxml_Dtd::METINF_1_2,  
'syncml:metinf', new Horde_Xml_Wbxml_Dtd_SyncMlMetInf(2));
</code>

Looking at the registrDTD() method it looks like only the last of  
those registrations is kept:

public function registerDTD($publicIdentifier, $uri, $dtd)
{
     // <snip>
    $this->_strDTDURI[strtolower($uri)] = $dtd;

}

every call with the same $uri will overwrite the previous assignment.  
Am I missing something?








More information about the bugs mailing list