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

Re: SAX Filters for Namespace Processing

  • From: Richard Tobin <richard@c...>
  • To: bradford@d...
  • Date: Sun, 05 Aug 2001 01:51:10 +0100 (BST)

move sax
>> As many threads on xml-dev have shown,
>> text-based processing of XML is hazardous at best.

>Do you understand how this statement completely contradicts the original
>intent of XML?  

Hang on, consider the context of this.  The thing that's "hazardous"
is copying a fragment of XML from one place to another, and the
sense in which it's hazardous is that it may become impossible to
identify what vocabulary the elements belong too.

Now this was always true, even before namespaces.  In fact, it was
*more* true before namespaces, because there was nothing you could do
about a name clash short of renaming the elements.  Namespaces have
relieved this somewhat, in that you can bind prefixes locally to
preserve their meaning.  A simple cut-and-paste can't do this,
because you have to insert namespace attributes, but XSLT does it,
XInclude will do it, and a namespace-aware editor can do it.

The use of unqualified local elements (which is not something I
advocate, by the way) does make this more difficult, but that's just
one of the factors you have to consider when choosing whether to use
them.  If you want to use elements whose vocabularies are determined
by their parents, you just can't put such elements from different
vocabularies inside the same parent.  You can only move the whole unit
rooted at the qualified element.  Just as with attributes: if the same
attribute means different things on different elements, you can't move
it around from element to element, but you can move the whole element.

-- 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.