<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> ProcessingInstruction pi = new
ProcessingInstruction("xml-stylesheet", "type=\"text/xsl\"
href=\"/ssi/TestExp.xsl\"");<BR> jdomDoc.addContent(pi);<BR></DIV></FONT>
<DIV><FONT face=Arial size=2>But it still doesn't appear in the
output</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> XMLOutputter xmlOut = new
XMLOutputter(" ",
true);<BR> xmlOut.setTextNormalize(true);<BR> // if I uncomment next
line, it appears fine</FONT></DIV>
<DIV><FONT face=Arial size=2> //xmlOut.output(pi,
response.getOutputStream());<BR> xmlOut.output(jdomDoc,
response.getOutputStream());<BR></DIV>
<DIV></FONT><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Basically, my server is receiving an HTTP request,
servicing the request via a DB query and using those results to filter a static
XML doc (a periodic data extract) then using JDOM to produce an XML document via
a custom ContentHandler and SAX.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I then created an XSL stylesheet for the new JDOM
doc</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I then forward the HTTP request to a JSP that's
declared to produce XML output.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I want the response then handled by IE to render
the XML/XSL into HTML</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Everything works, except for putting the PI into
the JDOM when the doc is first created. Any ideas?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><BR>_______________________________________<BR>Rob Mitchell<BR>Base Class
Technologies, Inc.<BR>Java, WebSphere, Domino, Oracle, Web development<BR><A
href="mailto:rjmitchell@attbi.com">rjmitchell@attbi.com</A><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=rjmitchell@attbi.com href="mailto:rjmitchell@attbi.com">Rob
Mitchell</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jdom-interest@jdom.org
href="mailto:jdom-interest@jdom.org">jdom-interest@jdom.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, March 12, 2003 4:23
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [jdom-interest] Include a PI
when building a JDOM doc?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can anyone answer this please?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT size=1>
<P>Element elemRoot = </FONT><FONT color=#7f0055 size=1>new </FONT><FONT
size=1>Element(</FONT><FONT color=#2a00ff size=1>"ExpenseReports"</FONT><FONT
size=1>);</P>
<P>jdomDoc = </FONT><FONT color=#7f0055 size=1>new </FONT><FONT
size=1>Document(elemRoot);</P><FONT color=#3f7f5f size=1>
<P>//<xsl:stylesheet version="1.0"
xmlns:xsl="MyExpenseReport.xsl"></P></FONT><FONT size=1>
<P>jdomDoc.addContent(</FONT><FONT color=#7f0055 size=1>new </FONT><FONT
size=1>ProcessingInstruction(</FONT><FONT color=#2a00ff size=1>""</FONT><FONT
size=1>,</FONT><FONT color=#2a00ff size=1>""</FONT><FONT size=1>));</FONT></P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT size=1><FONT face=Arial size=2>How do I put the processing
instruction for the XSL stylesheet into the JDOM doc? We want the user's
browser to render the XML/XSL into HTML. </FONT></FONT></P>
<P><FONT size=1><FONT face=Arial size=2>TIA!</FONT></FONT></FONT></P></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2><BR>_______________________________________<BR>Rob Mitchell<BR>Base
Class Technologies, Inc.<BR>Java, WebSphere, Domino, Oracle, Web
development<BR><A
href="mailto:rjmitchell@attbi.com">rjmitchell@attbi.com</A><BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>