You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/07/18 22:35:10 UTC

RE: XSLT with SAX, Reduced Instruction Set Optimization and Liter al Result Element Stylesheets.

This is something that really interests me.

I am new to Xalan, so I have little idea of the internals, some comments
below:

> -----Original Message-----
> From: Vincent-Olivier Arsenault [mailto:vincent@neuro6.com]
> 
> 
> [...]
> 
> 
> 
> 
> Reduced Instruction Set Optimization and Literal Result 
> Element Stylesheets:
> Could streaming be achieved for reduced instruction set 
> stylesheets? In
> order to decide if a transformation is safe for streaming 
> without keeping an
> input dom, could the processor analyze the stylesheet first (for
> pooled-reused stylesheets, could that be beneficial)? I'm 
> thinking of simple
> templates like:
> 
> <xsl:template match="person">
> 	<xsl:value-of select="firstname"/>
>   	<xsl:copy-of select="address"/>
> </xsl:template>
> 

This template above is kind of deceiving, if my reading is correct,
the exact meaning is:

"Under person, collect ALL the firstname elements and print their values;
AND THEN collect ALL the address elements and copy them".

In other words, unless the stylesheet is aware that there is only one
"firstname" and only one "address" per "person", it cannot stream the output
of this template until the entire "person" node is read.

Am I interpreting the semantics of "select" correctly? Without knowing the
format of the input document, stream processing only possible for very few
cases. 

What strucks me as quite strange is that the XSLT spec does not provide for
specifying an input schema or for providing a way to secify "select THE ONE
AND ONLY ONE firstname in the person entity". I guess you need such
capability for the processor to really do streaming. How is Xalan thinking
about it, would this be some sort of Xalan specific PI instruction?

Am I mistaken? If I am please let me know, I really would like to write
stylesheets for streamable transformations. In particular because I would
like to compose them in pipelines.

> 
> Or literal result element stylesheets like:
> 
> <html xsl:version="1.0"
>       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>       xmlns="http://www.w3.org/TR/xhtml1/strict">
>   <head>
>     <title>Expense Report Summary</title>
>   </head>
>   <body>
>     <p>Total Amount: <xsl:value-of select="expense-report/total"/></p>
>   </body>
> </html>
> 
> 
> Is that implemented? Would that help? Could it be done easily?
> 
> thanks,
> vincent-oliver arsenault
>