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>&#160;<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>&nbsp;John Doe(born
> on 01.01.1974)</LI>
> <LI><I>A002</I>&nbsp;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]>

Reply via email to