You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sean Forde <sf...@lizardtech.com> on 2000/11/21 23:26:52 UTC

xalan-java - xsl:import and efficiency

Hallo all,

I have a style sheet "A" which has an <xsl:import href="B"> tag. I process
"A" by calling (psuedo-code)XSLTProcessor.processStylesheet(new
XSLTInputSource("A") ), and then I store the processed style sheet in a hash
table for easy retrieval.

My question is this: in the above example, does "B" get processed also? Or
is "B" reprocessed each time I actually perform an XSLT transformation with
"A"?

Thank you,

	-Sean

Sean P. Knight Forde
Software Architect
LizardTech Inc.
http://www.lizardtech.com
(206) 652-5211

We Make Imaging Work. Everywhere!(tm)
Copyright 2000, LizardTech Inc. All rights reserved. Unauthorized disclosure
prohibited.


Re: xalan-java - xsl:import and efficiency

Posted by "Sergey S. Kljopov" <kl...@wetellyou.com>.
No. A.xsl Stylesheet is kept in hash with included B.xsl.

WBR, Sergey S. Kljopov

----- Original Message -----
From: "Gary L Peskin" <ga...@firstech.com>
To: <xa...@xml.apache.org>
Sent: Wednesday, November 22, 2000 4:57 AM
Subject: Re: xalan-java - xsl:import and efficiency


> Sean Forde wrote:
> > I have a style sheet "A" which has an <xsl:import href="B"> tag. I
process
> > "A" by calling (psuedo-code)XSLTProcessor.processStylesheet(new
> > XSLTInputSource("A") ), and then I store the processed style sheet in a
hash
> > table for easy retrieval.
> >
> > My question is this: in the above example, does "B" get processed also?
Or
> > is "B" reprocessed each time I actually perform an XSLT transformation
with
> > "A"?
>
> In XalanJ2, the Templates or Transformer object will include the
> processed "B" stylesheet so it will not be reprocessed, I belive.  Not
> sure about XalanJ1.  You could test this easily enough by call
> processStylesheet, then renaming "B", then trying to do the transform
> and see what happens.
>
> Gary
>


Re: xalan-java - xsl:import and efficiency

Posted by Gary L Peskin <ga...@firstech.com>.
Sean Forde wrote:
> I have a style sheet "A" which has an <xsl:import href="B"> tag. I process
> "A" by calling (psuedo-code)XSLTProcessor.processStylesheet(new
> XSLTInputSource("A") ), and then I store the processed style sheet in a hash
> table for easy retrieval.
> 
> My question is this: in the above example, does "B" get processed also? Or
> is "B" reprocessed each time I actually perform an XSLT transformation with
> "A"?

In XalanJ2, the Templates or Transformer object will include the
processed "B" stylesheet so it will not be reprocessed, I belive.  Not
sure about XalanJ1.  You could test this easily enough by call
processStylesheet, then renaming "B", then trying to do the transform
and see what happens.

Gary