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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [Sax-devel] Re: SAX survey: expected local name for non-namespace q

[ Lists Home | Date Index | Thread Index ]

Yuval Oren wrote
> > >
> > > With namespace processing off, SAX2 compliant parsers can provide a
> > > localName value of either "" or "doc"
> >
> > This is nonsense.  If namespace processing is off, what specification
are
> > you invoking to come up with a localName of "doc"?
> >
> > ~Rob
>
> By "namespace processing off" I meant that the
> "http://xml.org/sax/features/namespaces"; feature was set to false. I was
> thus referring to the Javadoc for ContentHandler.startElement():
>
> *  the Namespace URI and local name are required when the namespaces
> property is true (the default), and are optional when the namespaces
> property is false (if one is specified, both must be);
>
> I read this to mean that if a SAX2 parser so chooses, it can process the
> element for namespaces even though the feature is off. And that's how we
get
> a localName of "doc".

I see.  I have always understood the http://xml.org/sax/features/namespaces
feature to mean "behave as a vanilla XML 1.0 processor without reference to
the Namespaces in XML recommendation".

I think there are good reasons for treating the option in this way, rather
than just using it as a flag to control the parameters to startElement().
For one thing, the Namespaces recommendation introduces "namespace
constraints", (e.g. no ':' in entity name), which I would expect to be
flagged [1] by an XML processor in namespace mode but ignored when in plain
XML 1.0 mode.

~Rob

[1] xmlvalid treats namespace constraint violations as fatal errors when
namespaces are enabled






 

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

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