[XML-SIG] SAX 2.0: Namespaces
Uche Ogbuji
uogbuji@fourthought.com
Tue, 16 May 2000 09:48:35 -0600
> --- Name representation
>
> (What is set out here goes for both ContentHandler and Attributes.)
>
> - All element and attribute names consist of a namespace name
> (represented as a (uri, localname) tuple) and a qualified name
> (the raw name, represented by a string). Which parts of this
> information is available depends on the processing mode and the
> parser, but the API provides for all this information.
>
> - During namespace processing, what namespace declarations are in
> effect at any point in the document can be found from the
> startPrefixMapping/endPrefixMapping events on the ContentHandler
> interface.
>
> - The namespace name:
>
> - Required during namespace processing, optional otherwise.
>
> - If the name is not connected to a namespace, the name tuple
> takes the form (None, localname).
>
> - Namespace processing is off and the parser is not providing
> namespace names this this value should be the same as the
> qualified name. (Alternatively, it could be None. My mind is not
> made up on this.)
I'd say "None" for faster checking (in the very rare cases where checking at
this level makes sense).
Otherwise, more good stuff.
--
Uche Ogbuji Senior Software Engineer
uche.ogbuji@fourthought.com +01 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-9036, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python