<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [jdom-interest] JDOM and XSLT</TITLE>
</HEAD>
<BODY>

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

<P><FONT SIZE=2>mani</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Laurent Bihanic [<A HREF="mailto:laurent.bihanic@atosorigin.com">mailto:laurent.bihanic@atosorigin.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Wednesday, February 27, 2002 8:11 PM</FONT>
<BR><FONT SIZE=2>To: Mani Doraisamy</FONT>
<BR><FONT SIZE=2>Cc: jdom-interest@jdom.org</FONT>
<BR><FONT SIZE=2>Subject: Re: [jdom-interest] JDOM and XSLT</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi,</FONT>
</P>

<P><FONT SIZE=2>Mani Doraisamy wrote:</FONT>
<BR><FONT SIZE=2>&gt; Hi all,</FONT>
<BR><FONT SIZE=2>&gt; What is the fastest XSLT processor available in market. I am</FONT>
<BR><FONT SIZE=2>&gt; using JDOM and I would like to do XSLT so that I can present</FONT>
<BR><FONT SIZE=2>&gt; it as HTML.</FONT>
</P>

<P><FONT SIZE=2>Saxon (<A HREF="http://saxon.sourceforge.net" TARGET="_blank">http://saxon.sourceforge.net</A>) can be up to 3 times faster than Xalan, </FONT>
<BR><FONT SIZE=2>depending on your stylesheet, and is very stable.</FONT>
</P>

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

<P><FONT SIZE=2>XSLT processes an entire document. So the only way to apply a stylesheet to </FONT>
<BR><FONT SIZE=2>only a part of a document is to detach that part and make it a standalone </FONT>
<BR><FONT SIZE=2>document. You can then apply the stylesheet to this &quot;small&quot; document and </FONT>
<BR><FONT SIZE=2>attach the result back to the original document.</FONT>
</P>

<P><FONT SIZE=2>Hope this helps,</FONT>
</P>

<P><FONT SIZE=2>Laurent</FONT>
</P>

</BODY>
</HTML>