[jdom-interest] JDOM and XSLT

Mani Doraisamy MDoraisamy at SELECTICA.com
Sun Mar 3 22:43:36 PST 2002


Again i am stuck with this! Now i need to say that i need to get
only one child with 2 level of nesting and other children removed
from an element to do XSLT.
My XSLT has become very slow.
Has anyone tried something like a view on the JDOM structure
which will get a part of the structure for XSLT, so as to increase 
performance?
 
mani

-----Original Message-----
From: Mani Doraisamy 
Sent: Thursday, February 28, 2002 1:07 AM
To: Laurent Bihanic
Cc: jdom-interest at jdom.org
Subject: RE: [jdom-interest] JDOM and XSLT



thanks. the problem in applying a stylesheet to the sub tree 
is that, i might not need the child elements as well. it would 
be too much of overhead to loop through the content and detach 
the child elements. Also it should be able to specify till what 
level i need nested children for XSLT. 
I am thinking of creating a dummy Element which gets the actual 
node and the number of the neting i need, in the contructor and 
recursively loop till the number of nesting. 
i am not sure if this would create a problem though. 

mani 

-----Original Message----- 
From: Laurent Bihanic [ mailto:laurent.bihanic at atosorigin.com
<mailto:laurent.bihanic at atosorigin.com> ] 
Sent: Wednesday, February 27, 2002 8:11 PM 
To: Mani Doraisamy 
Cc: jdom-interest at jdom.org 
Subject: Re: [jdom-interest] JDOM and XSLT 


Hi, 

Mani Doraisamy wrote: 
> Hi all, 
> What is the fastest XSLT processor available in market. I am 
> using JDOM and I would like to do XSLT so that I can present 
> it as HTML. 

Saxon ( http://saxon.sourceforge.net <http://saxon.sourceforge.net> ) can be
up to 3 times faster than Xalan, 
depending on your stylesheet, and is very stable. 

> Another question, 
> my JDOM structure is huge and the Elements in the structure 
> actually gets the value from performance intensive calculations 
> and database operations, by overriding getText() method. Now 
> when i want to do XSLT i wouldnt want the entire tree for XSLT. 
> Although i can pass the whole tree for XSLT, what is the most 
> performant way of doing XSLT for the subtree? 

XSLT processes an entire document. So the only way to apply a stylesheet to 
only a part of a document is to detach that part and make it a standalone 
document. You can then apply the stylesheet to this "small" document and 
attach the result back to the original document. 

Hope this helps, 

Laurent 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020304/64f3be0a/attachment.htm


More information about the jdom-interest mailing list