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

list4xt : Mailing list for the XT users community.

[list4xt] Re: Eric Re: response.setContentType("text,vnd.wap.xml")

Subject: [list4xt] Re: Eric Re: response.setContentType("text,vnd.wap.xml")
From: Eric van der Vlist (vdv@dyomedea.com)
Date: 02/12/2000 - 10:10


guy wrote:
>
> Brilliant.That looks like the solution I have been hunting high and low for.
>
> My Java is not very good yet. Will your XHTMLOutputHandler output XML (WML) and
> how do I get my XSLServlet to use it?

Yes, even though this XML is conform to the C.2 (Empty Elements)
and C.3 (Element Minimization and Empty Element Content) HTML
Compatibility Guidelines of the XHTML 1.0 recommendation.

(see /downloads/examples/outputhandlers/xhtml/).

I'll derive a XML Output method from there, but I won't have the time to
do so before XML 2000 and as a short term solution you can use it.

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://crescentprocessing.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://merchantcashadvance.co -
 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://merchantservicereviews.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://corpipesmokers.org
http://electroniccigarettemerchantaccount.com -           http://medicalcannabiscaregivers.org              http://elsicon2017.org
------------------------------------------------------------------------

-- Mailing list for the XT users community. (http://bullittcountybank.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