jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koegel, Michael" <Michael.Koe...@partner.commerzbank.com>
Subject AW: Newbie Help with viewing XSL in browser
Date Thu, 22 Aug 2002 09:33:30 GMT
Hi Vincent,

I was refering to the Transformer Solution.
Take a look at the SimpleXSLTServlet that ist part of the xalan examples.
http://xml.apache.org/xalan-j/samples.html#simplexsltservlet
It should show how to do it.

To get the init-param use:
String reportXsl = getInitParameter("report-xsl");

If it is a URL use it as is otherwise asume it is bundled with the app:
String xslUrl = HttpUtils.getRequestURL(request)+reportXsl;


Don't know a good way to check if reportXsl is a URL. Perhaps like this:
URL xlsUrl = null;
try{
	xslUrl = new URL(reportXsl);
}catch(MalformedURLException e){
	xslUrl = new URL(HttpUtils.getRequestURL(request)+reportXsl);
}
There is probably more handling needed for cases when reportXsl starts or
starts not with '/'.

Hope that helps.

--MK

-----Urspr√ľngliche Nachricht-----
Von: Vincent Massol [mailto:vmassol@octo.com]
Gesendet am: Donnerstag, 22. August 2002 11:08
An: 'Cactus Users List'
Betreff: RE: Newbie Help with viewing XSL in browser

Hi Michael,

> -----Original Message-----
> From: Koegel, Michael [mailto:Michael.Koegel@partner.commerzbank.com]
> Sent: 22 August 2002 09:50
> To: Cactus Users List
> Subject: AW: Newbie Help with viewing XSL in browser
> 
> Hi,
> 
> I would prefer to have the name of the stylesheet as a <init-param> in
> web.xml for the ServletTestRunner.

Very good idea.

> If the parameter (report-xsl for example) exists use the value as the
> stylesheet if not don't transform.
> This way users can easily customize the stylesheet.

Yep. Agreed.

But I think we also need the internal XSLT transformation for those
using browsers not supporting on the fly XSLT transformation.

Thanks
-Vincent

> 
> --MK
[snip]



--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message