php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68454 ID already defined errors after update to anything after 1.1.26
Submitted: 2014-11-19 17:43 UTC Modified: 2021-07-18 04:22 UTC
Votes:5
Avg. Score:4.2 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: x9sim9 at hotmail dot com Assigned: cmb (profile)
Status: No Feedback Package: XSLT related
PHP Version: 5.4.35 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: x9sim9 at hotmail dot com
New email:
PHP Version: OS:

 

 [2014-11-19 17:43 UTC] x9sim9 at hotmail dot com
Description:
------------
This issue has already been well documented on stack exchange so I thought it made sense to add the link here instead: 

http://stackoverflow.com/questions/25893393/xsltprocessortransformtoxml-id-already-defined/27023224#27023224

The issue seems to have been created by fixing an existing bug and that the XHTML is now being treated as XML whereas older versions were treated as HTML.

I am hoping a compatibility flag or similar could be implemented so that codebases built on this flaw can still operate.

Test script:
---------------
XML demonstrating the issue (rare)

<x>
 <my_tag id="1234" id="4567">aaa</my_tag>
</x>


XSL demonstrating the issue (more common)

<xsl:template match="/">
  <div id="1234">aaa</div>

  <!-- further down the code -->
  <div id="1234">bbbb</div>
</xsl:template>


Expected result:
----------------
Render the HTML

Actual result:
--------------
XSLT ERROR OCCURED: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: ID already defined

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-06 16:33 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-06 16:33 UTC] cmb@php.net
According to the SO thread, you have filed a bug report against
libxml2.  What came out of that?
 [2021-07-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC