[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Output method html

Subject: Output method html
From: "Kaarle Kaila" <kaarle.kaila@xxxxxx>
Date: Thu, 2 Sep 2004 15:32:03 +0300
xsl output method html
hi,

I have created using JDOM an xml-structure inside my application in tomcat
5.0.
Finally I want to output the xml-structure in html-format using xslt
transformation. Else this works nicely but I cannot get the <xsl:output
method="html"/> to work.

If I get the same xml-structure in an XML-file and convert it to html using
the same xslt stylesheet using xmlstart (I believe uses libxslt) the result
is what I ask. The output encoding is iso-8859-1 and the <br/> has become
<br> etc.
When I use JDOM command to do this I get it with xml-headers, <br/> etc

Here is the code in my servlet that does the transformation:
---------------------
FileInputStream xslt = new FileInputStream(xsltpath);
XSLTransformer trans = new XSLTransformer(xslt);
Document htm = trans.transform(doc);
XMLOutputter out = new XMLOutputter();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
out.output(htm,bout);
ServletOutputStream sos = resp.getOutputStream();
sos.write(bout.toByteArray());
---------------------------

I don't know what xslt processor uses as a default. I have tried by adding
saxon.jar or saxon8.jar to the WEB-INF/lib directory with the same result.

The xslt sheet I have begins like this:

<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:template match="/miniproject">
<xsl:variable name="lcopy"><xsl:value-of
select="header/copyright"/></xsl:variable>
..............
Any help would be appreciated.

Kaarle Kaila

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.