[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: ANN: SAX Filters for Namespace Processing

  • From: Richard Tobin <richard@c...>
  • To: rpbourret@r...
  • Date: Tue, 31 Jul 2001 12:15:57 +0100 (BST)

sax supported elements
>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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.