<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: [jdom-interest] JDOM and XSLT</TITLE>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>Again
i am stuck with this! Now i need to say that i need to get</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>only
one child with 2 level of nesting and other children removed</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>from
an element to do XSLT.</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>My
XSLT has become very slow.</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>Has
anyone tried something like a view on the JDOM structure</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff size=2>which
will get a part of the structure for XSLT, so as to increase
</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff
size=2>performance?</FONT></SPAN></DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=618393906-04032002><FONT face=Arial color=#0000ff
size=2>mani</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mani Doraisamy
<BR><B>Sent:</B> Thursday, February 28, 2002 1:07 AM<BR><B>To:</B> Laurent
Bihanic<BR><B>Cc:</B> jdom-interest@jdom.org<BR><B>Subject:</B> RE:
[jdom-interest] JDOM and XSLT<BR><BR></FONT></DIV>
<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>> Hi
all,</FONT> <BR><FONT size=2>> What is the fastest XSLT processor available
in market. I am</FONT> <BR><FONT size=2>> using JDOM and I would like to do
XSLT so that I can present</FONT> <BR><FONT size=2>> 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>> Another question,</FONT> <BR><FONT size=2>> my JDOM
structure is huge and the Elements in the structure</FONT> <BR><FONT
size=2>> actually gets the value from performance intensive
calculations</FONT> <BR><FONT size=2>> and database operations, by
overriding getText() method. Now</FONT> <BR><FONT size=2>> when i want to
do XSLT i wouldnt want the entire tree for XSLT.</FONT> <BR><FONT size=2>>
Although i can pass the whole tree for XSLT, what is the most</FONT> <BR><FONT
size=2>> 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 "small" 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></BLOCKQUOTE></BODY></HTML>