XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] [ANNOUNCE] New MicroXML draft available

Stephen D Green scripsit:

> What is required of a parser handling prefixed and namespaced
> attributes in MicroXML?

Nothing at all, except that attribute names may contain a colon, whereas
element names must not.

The MicroLark parser can provide an object from which element objects
are pulled, or can push element objects to a content handler, or can
construct a tree of element objects.  In any of these cases, one can
use the getNamespace method to search along the ancestor-or-self axis
for the nearest appropriate namespace declaration.  If you think this
is too slow, you can create a subclass of Element that overrides the
getNamespace method to memoize its results, and use an ElementFactory to
tell the parser to instantiate your class rather than Element itself.

(One of the irritating non-features of SAX is that it doesn't expose
the parser's element stack, forcing the application to keep its own.
MicroLark push and pull parsing does expose the stack, though Ghu help
you if you mutate it in any way.)

-- 
De plichten van een docent zijn divers,         John Cowan
die van het gehoor ook.                         cowan@ccil.org
      --Edsger Dijkstra                         http://www.ccil.org/~cowan


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS