xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: SAX
Date Sat, 13 May 2000 10:45:55 GMT
Scott Boag/CAM/Lotus wrote:
> Michal Mosiewicz <mimo@interdata.com.pl> wrote:
> >  I'm talking about improvement
> > that is possible along the whole processing path - from content
> >  generators, that may be sometimes not required to generate full content,
> >  to translators, and finally to serializer, which is able to get the
> >  information about cacheable parts of the document and remember them in
> >  serialized form.
> I agree with Mike.  Something along the lines of what he's saying (i.e.
> return codes to skip sections) could be very cool.  It would be very
> interesting to pre-analyze a stylesheet, and then skip sections that
> couldn't possibly be processed.  

I don't understand how this would do any good in practice... the parser
must have to parse in order to skip something. You mean, not calling the
method? Well, just compile your stylesheet to return right after the
call and hotspot engines will optimize that call and skip it by

> The primary wins would be that the section
> of the buffer wouldn't have to be decoded to Unicode, and the string
> objects that have to be passed wouldn't have to be created for that
> section.  Also, a streaming XSLT process (i.e. pre-analyze the stylesheet
> to see if an internal tree needs to be built, and, if not, do the whole
> transform in streaming mode without building a tree) should be able to tell
> the parser to quit if it has completed the transformation.  

Ok, this makes more sense.

> Consider how
> important this would be if you were using an extended XSLT processor as a
> query engine to retrieve partial sections of hundreds of documents...
> perhaps you just want to get the <description>...</description> sections.

Oh, c'mon. This is what happens when you have a hammer and everything
looks like a nail: XPath is not a database query language and XSLT is
not a database query optmizer.

You need read DBs to do those things....

Also, even if you pre-analyze your stylesheet and you know that the
element <foo> and <bar> are never processed, how do you know where to
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message