A weaker XSL?

Peter Seibel peter at weblogic.com
Thu Feb 4 22:39:12 GMT 1999


At 09:28 AM 2/4/99 , Paul Prescod wrote:
>Peter Seibel wrote:
>> 
>> At 05:17 AM 2/4/99 , Michael.Kay at icl.com wrote:
>> >> Is there a possibility for creating a sub-set of
>> >> XSL that would work on a stream instead of
>> >> requiring a complete document object?
>> >
>> >Funny you should ask that, I've been experimenting over the last few
days to
>> >see whether I could build such a thing on top of SAXON. Not actually
easy to
>> >do as a pure subset, but I think one can do something that feels quite
>> >XSL-like.
>> 
>> So I obviously lack imagination or understanding of all the intricacies of
>> XSL -- what can you express in XSL that you couldn't implement on top of
SAX?
>
>How do I build a table of contents that is output BEFORE the document
>without reading the whole input before I start to output?

Buffer the rest of the document. Or make two passes. Presumably your XSL
processor can figure out what things need that sort of buffering or
multi-pass treatment. Of course I'm building some stuff in memory but it
could be a lot less than the whole document as a DOM tree. For example if
my document is the Encylopaedia Britanica and I want to output a (strange)
document consisting of a list of all the articles followed by the full text
of all the articles containing the word pink I only have to buffer the
articles with the word pink which is presumably a lot less than the whole
encyclopedia. Another way to look at things is to implement your XSL engine
so it builds a complete tree of the *output* before it writes anything out.
I'm not arguing that you can implement XSL so it uses no heap, just that
you could implement it on top of SAX rather than DOM. Or am I still missing
something?

-Peter


-- 
Peter Seibel          Perl/Java/English Hacker      peter at weblogic.com

                     Is Windows98 Y2K compliant? 



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 (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe 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