Lists Home |
Date Index |
- From: "Simon St.Laurent" <email@example.com>
- To: Sunny <firstname.lastname@example.org>, email@example.com
- Date: Sun, 06 Aug 2000 14:45:34 -0400
At 02:01 PM 8/6/00 -0400, Sunny wrote:
>As I understand it - SAX lets you stream the xml data, providing events
>that can be trapped as and when needed.
>So, biggest advantage - it doesn't have to maintain an in-memory tree of
>Two questions here -
>1) Without loading the document, how does a sax-based parser know that the
>document is valid and well-formed ? Is that something that I sacrifice when
>I use a sax - parser ?
It doesn't know up front, so it has to die in the middle of the document
when it encounters an error. Your application would be wise not to commit
information until the document completes.
>2a) Now, the document hasn;t been loaded yet , so how do I apply
>transformation or xsl-fo to the xml-document ? Is that something that 'they'
>are still trying to figure out - or is there some documentation somewhere
>2b) Does Xalan do this ?
XSLT processors like XT can take SAX events and then report new SAX events
from the transformation. I think SAXON does this too, but I don't know
about Xalan. I think Xalan demands a DOM. XT builds an internal tree, but
it's smaller than a full DOM tree would be.
XML Elements of Style / XML: A Primer, 2nd Ed.
http://www.simonstl.com - XML essays and books