|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ANN: SAX Filters for Namespace Processing
>Not qualifying child elements is a bad practice; as Tim Bray pointed >out, it leads to collisions when you start mixing elements from >different namespaces. > >Not qualifying attributes is a neutral practice. It appears to have no >negative side effects (RDF excepted). First to point out the obvious: the reason there is a difference between elements and attributes in this respect is that elements can be nested, but attributes can't. The problem with elements goes away if you take the view implied by Simon's transformations: that an unqualified child element is equivalent (at the application level) to one in the containing namespace. You can then mix elements from different namespaces simply by qualifying the element or setting the "default namespace" at a boundary between namespaces. This interpretation has the disadvantage of not being supported by various standard tools; in particular XSLT will not fix up the namespace declarations as it does for the standard interpretation. >Instead of trying to impose a technical solution, better to write the >author of any schema that uses unqualified child elements an email and >explain that they are not writing a portable schema. Bad design is a >human problem and is better solved by humans. But the use of unqualified child elements (though not Simon's equivalence) is explicitly supported by XML Schemas - see elementFormDefault. It is not universally agreed that this is bad design. -- Richard
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








