[
Lists Home |
Date Index |
Thread Index
]
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/
|