php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #37380 DOMDocument->createAttribute[NS] can't set value
Submitted: 2006-05-09 12:04 UTC Modified: 2019-09-22 21:31 UTC
Votes:4
Avg. Score:2.5 ± 0.9
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: bjori@php.net Assigned:
Status: Wont fix Package: DOM XML related
PHP Version: 6CVS-2006-05-09 (CVS) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 - 20 = ?
Subscribe to this entry?

 
 [2006-05-09 12:04 UTC] bjori@php.net
Description:
------------
DOMDocument->createAttribute[NS] can't set attribute value
but DOMDocument->createElement[NS] and DOMAttr->__construct 
can.

Patch: 
http://php.is/bugs/dom/dom_document_create_attribute.default_value.patch.txt
phpt: http://php.is/bugs/dom/dom_create_attribute_ns.phpt

It "breaks" the W3 spec, but we already broke it with 
allowing ->createElement[NS] to set the value.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-09 12:06 UTC] bjori@php.net
and phpt for ->createAttribute(): 
http://php.is/bugs/dom/dom_create_attribute.phpt
 [2011-02-21 21:26 UTC] jani@php.net
-Package: Feature/Change Request +Package: DOM XML related
 [2019-09-22 21:31 UTC] beberlei@php.net
-Status: Open +Status: Wont fix
 [2019-09-22 21:31 UTC] beberlei@php.net
Even though createElement deviates from the spec, we should stay spec compliant here. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC