Re: [xsl] generate several html files?

Subject: Re: [xsl] generate several html files?
From: abbouh <abbouh@xxxxxxxxxxxxxxxxx>
Date: Mon, 05 Jan 2004 15:44:30 +0000
try this:

................
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:lxslt="http://xml.apache.org/xslt";
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes ="redirect">
.....
<xsl:for-each select="/allcats/cat">
<redirect:write select="concat(./name,'.html')" method="html">
<h1><xsl:value-of select="./desc"/></h1>
</redirect:write>
</xsl:for-each>

.............



james walker a écrit :

> Is it possible to generate several html files using xslt?
> i have an xml files like this:
> <allcats>
> <cat><name>one</name><desc>this is one</desc></cat>
> <cat><name>two</name><desc>this is two</desc></cat>
> <cat><name>three</name><desc>this is three</desc></cat>
> <cat><name>four</name><desc>this is four</desc></cat>
> </allcats>
> i wanted to name html files according to the cat name and <h1> tags within
> each files to correspond with its desc tag. This would create:
>
> one.html (<h1>this is one</h1> inside the file)
> two.html (<h1>this is two</h1> inside the file)
> three.html (<h1>this is three</h1> inside the file)
> four.html (<h1>this is four</h1> inside the file)
>
> thanks
> james walker
>
> _________________________________________________________________
> Tired of 56k? Get a FREE BT Broadband connection
> http://www.msn.co.uk/specials/btbroadband
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread