OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

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@talsever.com      alicorn@mindspring.com
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"




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS