This sounds right up Cocoon's alley <http://xml.apache.org>. There is also a
custom tag library called "xsl" in the Jakarta Taglibs project
<http://jakarta.apache.org/taglibs> that lets you do this sort of thing in a
JSP page.
Craig McClanahan
Danny Rubis wrote:
> Hey!
>
> Has anyone written servlet that can apply a stylesheet to a source.
> It needs to transform using a XSL and an XML documents.
>
> Given a XSL of:
> <?xml version="1.0"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/TR/WD-xsl">
> <xsl:template match="/">
> <html>
> <body>
> Title: <xsl:value-of select="book/title"/>
>
> <br/>
> Author: <xsl:value-of
> select="book/author"/>
> <br/>
> Format: <xsl:value-of
> select="book/format/spine"/>
> <br/>
> <xsl:value-of
> select="book/format/pages/@number"/> pages
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
> and an XLM of:
>
> <?xml version="1.0"?>
> <book>
> <title>Moby Dick</title>
> <author>Herman Melville</author>
> <format>
> <spine>Hardback</spine>
> <pages number="559"/>
> </format>
> </book>
> and produce:
>
> <html>
> <body>
> Title: Moby Dick
> <br/>
> Author: Herman Melville
> <br/>
> Format: Hardback
> <br/>
> 559 pages
> </body>
> </html>
>
> Thank you.
>
> Sans adieu,
> Danny Rubis
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--
====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00): Sun Technical Briefing
Session T06 (24-Oct 14h00-15h00): Migrating Apache JServ
Applications to Tomcat
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html