Here I cut&pasted a code fragment of my JSP. ---------------------------------------------------------------- <h3>raw Model</h3> <c:import var="xslturl2" url="/WEB-INF/transform/IdentityTransform.xsl" charEncoding="Shift_JIS"/> <%@ page import="java.io.StringWriter" %> <%@ page import="javax.xml.transform.stream.StreamResult" %> <% StringWriter sw = new StringWriter(); pageContext.setAttribute("resultString",sw); StreamResult outputResult = new StreamResult(sw); pageContext.setAttribute("outputResult", outputResult); %> <x:transform xml="${pipeline_final_output_String}" xslt="${xslturl2}" result="${outputResult}"/> <table border="1"> <tr><td><pre><c:out value="${resultString}" escapeXml="true" /></pre></td></tr> </table> ----------------------------------------------------------------
What is this doing? /WEB-INF/trasnform/IdentityTransform.xsl is a XSLT stylesheet which just copies the input source to the output result while changing the character encoding from UTF-8 to Shifg_JIS (Japanese local charaset). <x:transform xml="${pipeline_final_output_String}" xslt="${xslturl2}" result="${outputResult}"/> this fragment set the String format of the input XML (${pipeline_final_output_String} EL variable stands for it) to a variable ${resultString}. Then <c:out value="${resultString}" escapeXml="true" /> this tag prints the String which contains lot of <s and >s , but it is just a String -:). A cute portion of the above code might be that StringWriter class. This scriptlet trick the XSLT processor to write the transformation result as a plain String into the ${resultString}. Would this help? MATSUHASHI, kazuaki Japan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]