java pull parser / fragment processing

Stefan Haustein stefan.haustein at trantor.de
Mon Dec 27 20:56:21 GMT 1999


> Perhaps, then, you could define what you mean by "fragment"
> if it doesn't match the definition in the W3C spec.  I don't
> find it a word with a necessarily obvious precise definition
> when used in relation to XML.

What I mean by "fragment" is exactly what is defined in
http://www.w3.org/TR/WD-xml-fragment. But in contrast to the spec I am
not addressing general fragment interchange problems, but how to hand
over a parser between different fragment processors. For example, if I
nest xhtml into an xml message envelope:

<message>
  <sender>agent1</sender> 
  <receiver>agent2</receiver>
  <content type="xhtml">
   <xhtml>
    ....
   </xhtml>
  </content>
</message>

In the SAX push world, I cannot simply switch the DocumentHandler to my
xhtml processor when I reach the content start tag (how do I switch
back? how do I get the result?). With a pull model, I can hand over the
parser to the xhtml processor. The xhtml processor "pulls" out its
events and returns. Then I can continue parsing the envelope.

Best regards

Stefan 


-- 
KJAVA AWT project: www.trantor.de/kawt
SAX-based access to WBXML and WML: www.trantor.de/wbxml

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list