Re: Making SimpleXML more useful
| From: | David Zülke | Date: | Sat, 30 Apr 2011 16:53:53 +0000 |
| Subject: | Re: Making SimpleXML more useful | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52105@lists.php.net to get a copy of this message | ||
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 child elements to be unqualified is neither braindead or ambiguous. All standalone
> XML documents are ambiguous, because XML is just structured information without a definition of the
> structure (let alone the semantics of the information). XMLSchemas precisely define the structure,
> including allowable elements, child elements, quantities of elements and data types. And if that
> schema includes the attribute 'elementFormDefault="unqualified"', then child
> elements have to be unqualified. And that is certainly strictly specified, unlike a schemaless XML.
The elementFormDefault="qualified" attribute simply acts as a shortcut in Schemas so that
you don't have to use form="qualified" on every element declaration. It makes no
difference to instance documents which method you use.
Again, xmlns="" puts an element in no namespace. That already works in SimpleXML. There is
no issue here that needs fixing.
David
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s