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

Re: the infoset is two infosets (or even three?) [was:Re: [xml


clip rita
On Tue, 2002-08-20 at 06:44, Erik Wilde wrote:
> Amelia A Lewis wrote:
> > A namespace declaration is not an attribute (even if DOM treats it like
> > one).  When you turn on namespace processing in SAX2, prefix mappings
> > are reported before the element that they appear on.  The thing that is
> > lexically an attribute in the XML is not reported as an attribute in the
> > start element event.
> 
> so people have already accepted the fact that some semantics (probably 
> useful to them) are exposed through the infoset, in this case the 
> namespaceness of an attribute. however, this also requires an additional 
> layer of processing, identifying namespace declarations, testing names 
> for their conformance to namespace-requirements, and making sure that 
> all prefixes are used consistently. in most cases, people don't want to 
> do this themselves and are happy that it is already done by their parser 
> or xslt processor or whatever they are using.

This is wrong.  Sorry to be blunt.

Please check the SAX API.  There is no layering.  Check the Infoset
specification.  "Documents that do not conform to Namespaces [...] are
not considered to have meaningful information sets."  So leave out SAX1
style processing, as well as DOM level 1.

Item 5 in the description of the element information item.  "An
unordered set of attribute information items ....  Namespace
declarations do not appear in this set."  SAX2 gets this right.  DOM
does not, since namespace declarations are represented in the DOM tree
as attributes.

> and even though a namespace declaration *is* an attribute, treating it 

I repeat, read the infoset.  A namespace declaration is *not* an
attribute, in infoset terms.

This is not layering.  This is directly changing processing.  Namespace
declarations are not accessible through the infoset attributes
property.  They are only available through the namespaces property, and
even so not directly (there isn't a namespace declarations property; in
a true infoset object model, the only way of knowing about a declaration
is detection of an additional namespace in the namespaces property of a
newly-entered element information item).

As an infoset advocate, you really *should* be aware of all the nuances.

Amy!
-- 
Amelia A. Lewis       amyzing@t...      alicorn@m...
Yankees are compelled by some mysterious force to imitate Southern 
accents and they're so damn dumb they don't know the difference beween
a Tennessee drawl and a Charleston clip.
                -- Rita Mae Brown, "Rubyfruit Jungle"

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.