list4xt : Mailing list for the XT users community.
[list4xt] Re: Eric's XhtmlOutputHandler
Subject: [list4xt] Re: Eric's XhtmlOutputHandler
From: guy (guy@polylab.sfu.ca)
Date: 21/12/2000 - 21:36
I got it to work!
Thanks
guy wrote:
> > 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://merchant-account-explorer.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://merchant-account-services.org -
> > 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://gunmerchantservice.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://communitybankotc.com
> > http://zymico.com - http://nfcpglobal.com http://merchantaccountsllc.com
> > ------------------------------------------------------------------------
> >
> > --
> > Mailing list for the XT users community. (http://lthosting.com)
> > (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
--
Mailing list for the XT users community. (http://medicalmarijuana-hempexpo.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
Archive générée par hypermail 2b28 le 25/04/2001 - 07:16 CEST
webmaster@4xt.org
|