[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Eric's XhtmlOutputHandler

Subject: [list4xt] Eric's XhtmlOutputHandler
From: guy (guy@polylab.sfu.ca)
Date: 18/12/2000 - 23:07


> I put Eric's XhtmlOutputHandler servlet with my XSL servlet and included it in the
> package CA.sfu.polylab.servlet.database;

and added the following to my stylesheet:

<xsl:output method="java:CA.sfu.polylab.servlet.database.XhtmlOutputHandler"
        xmlns:java="http://www.jclark.com/xt/java"
        doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
        doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"
        encoding="iso-8859-1"
        media-type = "text/vnd.wap.wml"
        />

I still get ContentType as "application/xml" so it is still using the
XMLOutputHandler. Have I got a syntax error in the output method?

Guy

> To use it, just include XHTMLOutputHandler.class in the CLASSPATH of
> your servlet and the following xsl:output declaration in your
> stylesheet:
>
> <xsl:output method="java:XhtmlOutputHandler"
> xmlns:java="http://www.jclark.com/xt/java"
> doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
> doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"
> encoding="iso-8859-1"
> media-type = "text/vnd.wap.wml"
> />
>
> > In the long run I want to be able to handle different media-types. What solution
> > would you recommend?(the more explicit the better):)
>
> Why wouldn't you use a different stylesheet per media-type ?
>
> I don't if it's what you mean, but the way I am doing it on XMLfr is
> through having 2 virtual hosts for http://thepaymentguru.com - and
> http://wap.xmlfr.org.
>
> These 2 virtual hosts are pointing on the same directories but have
> different associations for the ".xml" extension:
>
> ApJServAction .xml /xmlfr/XSLServlet for http://merchantservicesnewjersey.com -
> and
> ApJServAction .xml /xmlfrwap/XSLServlet for http://wap.xmlfr.org.
>
> /xmlfr/XSLServlet and /xmlfrwap/XSLServlet are then 2 instances of the
> same servlet called with 2 different stylesheets an init time.
>
> This means that a same XML document will be transformed though a
> stylesheet that will deliver a HTML document when accessed through
> http://merchantaccountsreview.com - and through a second one that will deliver a WML
> document (with its media type) when accessed through
> http://wap.xmlfr.org.
>
> > I can't thank you enough.
>
> You're welcome.
>
> Eric
>
> > Guy
> >
> --
> See you at XML 2000
> http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
> ------------------------------------------------------------------------
> Eric van der Vlist Dyomedea http://cbdoilmerchantaccount.com
> http://merchantaccountcompanies.com - http://debtfreebythirty.net http://bankwest.net
> ------------------------------------------------------------------------
>
> --
> Mailing list for the XT users community. (http://83degreesmagazine.com)
> (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)

--
Mailing list for the XT users community.     (http://83degreesmagazine.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org


A site designed by Dyomedea