OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX2 and Transformation ?

[ Lists Home | Date Index | Thread Index ]
  • From: "Simon St.Laurent" <simonstl@simonstl.com>
  • To: Sunny <sandeepsethi@email.msn.com>, xml-dev@xml.org
  • 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
>the document.
>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.

Simon St.Laurent
XML Elements of Style / XML: A Primer, 2nd Ed.
http://www.simonstl.com - XML essays and books




 

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

Copyright 2001 XML.org. This site is hosted by OASIS