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

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


vanilla local name
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



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.