You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Sergey S. Kljopov" <kl...@wetellyou.com> on 2000/10/18 08:16:53 UTC

StylesheetRoot processing

Hi!

I'm trying to process xsl to StylesheetRoot than put it to the Hashtable.
After all i get some StylesheetRoots from Hashtable and set to the imports
of one of them (e.g. a.xsl) each other (e.g. b.xsl and c.xsl). It works but
if i wanna set to imports for a.xsl different xsls (e.g. b1.xsl and c1.xsl),
it process stylesheet of a.xsl such as include previous version of
setImports. For obviousness:
in a.xsl is   <xsl:call-template name="XXX"/>
in b.xsl is   <xsl:template name="XXX">aka-baka</xsl:template>
in b1.xsl is <xsl:template name="XXX">aba-haba</xsl:template>

so when i call my /servlet/my?import=b i saw phrase aka-baka, but when i
call /servlet/my?import=b1 i saw aka-baka also.
i took all stylesheets from one Hashtable. All setImport and .process makes
in one method which is called from doGet of my servlet. After process i call
getImports().clear() for a.xsl. Calling reset() is not helps me. Storing in
hashtable serialized form of stylesheet root and deserializing before
processing helps, but it's too slowly. Storing org.w3c.dom.Node instead of
StylesheetRoot helps so, but for setImports i must process Node to
StylesheetRoot, which is slow too. There will be no problem if
StylesheetRoot implements Cloneable. But it is not so.

What is of my problem?

WBR, Sergey S. Kljopov