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

Re: SAX survey: expected local name for non-namespace qualifie


is ambiguous in the namespace
Elliotte Rusty Harold wrote
>
> consider this document with no namespaces:
>
> <document>
>    <para>
>      Hello!
>    </para>
> <document>
>
> When a parser calls startElement() or endElement() for these
> elements, is it allowed to report their local names as the empty
> string, and only provide the name as the qName argument? Or must it
> report the local names as "document" and "para"?

When I read this for the first time I assumed that local names would always
be present (when namespaces are enabled).  I can see now that the clause
"(if one is specified, both must be)" is ambiguous if the namespace URI is
empty, but I still think of an empty URI string as providing the namepace
URI - which happens to be empty.

>
> 2. If you've implemented a parser, what does your parser do?

The ElCel SAX Driver always provides a local name.  If the namespace URI is
empty (i.e. there is no default namespace), then the localName is equal to
the qName.  When namespace processing is disabled, we still provide a
localName and a qName which are identical.

Regards
~Rob

--
Rob Lugt
ElCel Technology
http://www.elcel.com/



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.