My method of doing this is using the "Standard" Tag Library from the Taglibs project to do my XSLT Tranformation. My JSP's are really very simple, only containing XML that has title, heading and form elements. Then I wrap each page with the <x:transform> tag and specify the stylesheet.
My only "application" issue left is determining which stylesheet to use for the client. With plain client-xsl, this is easy because there is a "media" attribute that you can specify "wap" and such, but not with the transform tag. Also, I think it's important to create a stylesheet that allows for just spitting out the XML, in case I ever need to expose pages as web services. Hope this helps, Matt --- Wim Fournier <[EMAIL PROTECTED]> wrote: > owkie.. clear enough.. but how do i implement that in struts? > I know we've got an input property, but how do i apply an xsl sheet onto it? > > > > On Mon, Jan 21, 2002 at 11:04:11AM +0100, David Cypers wrote: > > Wim, > > > > For the WML,HTML, XHTML part, just write a xsl-stylesheet which transforms > > your xml into those formats. Just mix your xsl-commands with tags of the > > markup language you want as desired output. > > > > eg. > > > > <?xml version=...?> > > <data> > > <user id="A001"> > > <name>John Doe</name> > > <dob>01.01.1974</dob> > > </user> > > <user id="A002"> > > <name>Jane Doe</name> > > <dob>01.02.1974</dob> > > </user> > > </data> > > > > <xsl:stylesheet> > > > > <xsl:template match="data"> > > <HTML> > > <BODY> > > <H1>User data</H1> > > <UL> > > <xsl:apply-templates match="user"/> > > </UL> > > </BODY> > > </HTML> > > </xsl:template> > > > > <xsl:template match="user"> > > <LI><I><xsl:value-of select="@id"/></I> <xsl:value-of > > select="name"/>(born on <xsl:value-of select="dob"/>)</LI> > > </xsl:template> > > > > </xsl:stylesheet> > > > > this should generate > > <HTML><BODY><H1>User data</H1><BODY><UL><LI><I>A001</I> John Doe(born > > on 01.01.1974)</LI> > > <LI><I>A002</I> Jane Doe(born on 01.02.1974)</LI></UL></BODY></HTML> > > > > > > For output to pdf, you should use xsl:fo , but I can't help you with that. > > > > An interesting link : > > http://www.zvon.org/xxl/XSLTreference/Output/index.html > > > > Regards, > > David > > > > -----Original Message----- > > From: Wim Fournier [mailto:[EMAIL PROTECTED]] > > Sent: maandag 21 januari 2002 10:46 > > To: [EMAIL PROTECTED] > > Subject: howto use xsl to translate to diff formats? > > > > > > Hi, > > > > I've got a design question. > > > > What I basicly want is that my application uses xml as output and then > > translate > > it into html/xhtml/pdf/wml or whatever using xsl. > > > > How is this correctly done? > > > > grtz > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

