On 30.04.2011, at 22:05, Ben Schmidt wrote:
> This adds a certain ambiguity to document creation if it is used, but it
> does add functionality not currently there. I guess it's only worth
> doing if there are specs out there in the wild that (wrongly IMHO)
> require "unqualified" names in XMLName
Again, xmlns="" puts an element in no namespace. That already works in
SimpleXML. There is no issue here that needs fixing.
IIUC, the OP doesn't want the element to be in no namespace, but wants
it to be in the default namespace, but unprefixed.
I have already laid out my reasons for believing
On 29.04.2011, at 09:44, Tom Samplonius wrote:
>
>> While I think this would make SimpleXML more stupid, not less, as it
>> seems
>> braindead to me to allow users to create documents ambiguously and/or
>> which
>> essentially violate the XML namespace spec, I think the way to do
>
> Allowing c
> > $sxe->addChild('child', 123); # Adds element with namespace
> > inherited from the parent
> > $sxe->addChild('child', 123, 'urn:somenamespace'); # Adds child
> > with specified namespace
> > $sxe->addChild('child', 123, -1); # Adds child with no namespace
> > qualification
>
> Again, there is
On 4/29/11 3:44 AM, Tom Samplonius wrote:
While I think this would make SimpleXML more stupid, not less, as it
seems
braindead to me to allow users to create documents ambiguously and/or
which
essentially violate the XML namespace spec, I think the way to do
Allowing child elements to be unqu
While I think this would make SimpleXML more stupid, not less, as it
seems braindead to me to allow users to create documents ambiguously
and/or which essentially violate the XML namespace spec, I think the
way to do
Allowing child elements to be unqualified is neither braindead or
ambiguous. A
> While I think this would make SimpleXML more stupid, not less, as it
> seems
> braindead to me to allow users to create documents ambiguously and/or
> which
> essentially violate the XML namespace spec, I think the way to do
Allowing child elements to be unqualified is neither braindead or am
While I think this would make SimpleXML more stupid, not less, as it seems
braindead to me to allow users to create documents ambiguously and/or which
essentially violate the XML namespace spec, I think the way to do this would be to
define a magic constant and use that. E.g.
const SIMPLEXML_D
> That patch is not a good idea.
>
> Assume you have this situation:
>
>
>
>
>
>
> Adding a child "baz" to bar and have it default to no namespace
Actually, my patch wouldn't change the default action of addChild(). It would
still inherit the namespace qualification of the parent
On 4/27/11 1:59 AM, Tom Samplonius wrote:
- Original Message -
Looking at this in more detail...I don't think there's a bug here, or
a
patch required.
...
problem for me, as I have an XML schema that specifies that the
child
elements must not namespace qualified.
Is this possible in
problem for me, as I have an XML schema that specifies that the
child elements must not namespace qualified.
Is this possible in an XML schema? I don't know much about schemas,
but
...
Absolutely, if the XML schema has the "elementFormDefault" attribute
set to "unqualified", the child element
That patch is not a good idea.
Assume you have this situation:
Adding a child "baz" to bar and have it default to no namespace prefix would
result in this:
Now would be in the namespace "urn:lol".
Keep in mind that xmlns="" is, as per the XML spec, a perfectly valid way to
- Original Message -
> Looking at this in more detail...I don't think there's a bug here, or
> a
> patch required.
...
> > problem for me, as I have an XML schema that specifies that the
> > child
> > elements must not namespace qualified.
> Is this possible in an XML schema? I don't k
Looking at this in more detail...I don't think there's a bug here, or a
patch required.
It is not possible to use SimpleXML to add a child element without a
namespace prefix to a parent element that has a namespace element.
Instead, the child element inherits the namespace prefix of the
parent.
I would expect the children() method to return just the last two elements of
your input XML:
http://localhost/a"; xmlns:ns="http://localhost/a";>
as the last two elements are the only ones in the 'http://localhost/a'
namespace.
No, every element in the document is in the same namespace.
Personally I'd love to see an option to make it spit out an array. Just like te
second parameter in json_decode()
Since array keys can include colons prefix work would also be easier. Then
something akin to array2XML() to spit it back out.
On Apr 26, 2011, at 7:43 PM, Tom Samplonius wrote:
>
- Original Message -
> A similar problem regarding attributes, that got classified as a doc
> bug, but I
> don't think is one: http://bugs.php.net/42083
> If you're fishing around that area of the code, though, perhaps it is
> quite
> obvious to you where/how a patch should be made?
A similar problem regarding attributes, that got classified as a doc bug, but I
don't think is one: http://bugs.php.net/42083
If you're fishing around that area of the code, though, perhaps it is quite
obvious to you where/how a patch should be made?
Ben.
On 27/04/11 9:23 AM, Tom Samploniu
It is not possible to use SimpleXML to add a child element without a
namespace prefix to a parent element that has a namespace element. Instead, the
child element inherits the namespace prefix of the parent. So this XML
fragment:
abc
is impossible to construct with SimpleXML. The Simp
19 matches
Mail list logo