Next in thread → Next in month →

Re: [xml-dev] Element equivalence under XML Namespaces

From
Matthew Van Gundy <>
To
Date
2008-01-17T22:22:48Z
ID
<>
Thread
Re: [xml-dev] Element equivalence under XML Namespaces
Thank you all for your responses, they were very instructive and have
satisfied me that:

 > <?xml version="1.0"?>
 > <doc xmlns="http://foo.com/foo">
 >    <foo:elem xmlns:foo="http://foo.com/foo">
 >    </elem>
 > </doc>

cannot correctly be interpreted as a well-formed XML document because
element equivalence (with respect to opening and closing tags) is
determined lexically rather than semantically.  Succinct answers to
that effect are:

Per Michael Kay:
 > No, it's not. Well-formedness is defined in the XML specification,
 > and this doesn't know anything about namespaces; tags must therefore
 > match lexically rather than semantically

Per Paul Spencer:
 > Definitely not well formed. Ignore namespaces for the moment - they
 > came along after the XML specification itself. From an XML point of
 > view, the colon is just a name character like any other. Now the
 > name in the end tag is different from the name in the start tag.

Thanks again for being so helpful,
Matt
Next in thread → Next in month →