|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Outputting multiple HTML files
Hello,
I'm trying to output multiple HTML files from one XLM file. The source XML file
has the following structure:
<doc>
<p_entree>
...
</p_entree>
or
</p_section>
<p_entree>
...
</p_entree>
</p_section
...
</doc>
I was able to output one HTML file per "p_entree" section. However, I can't
find how to output several "p_entree" (100, for instance) to one HTML file and
then switch to another file. The following code is worst than kludgy, it
doesn't work at all. The output files (called 1.html, 2.html, etc.) overwrite
one another, so they only contain the 99, 199, 299, etc. entries:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
xmlns:xt="http://www.jclark.com/xt" extension-element-prefixes="xt">
<xsl:variable name="limite">100</xsl:variable>
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="p_entree">
<xsl:variable name="num_entree"><xsl:number level="any"
format="1"/></xsl:variable>
<xt:document method="html" href="{concat(floor($num_entree div $limite) +
1,'.html')}" encoding="windows-1252">
<html><header><title>Bla bla</title></header><body bgcolor="#FFFFFF">
<xsl:apply-templates/>
</body></html>
</xt:document>
</xsl:template>
etc.
How can I write several "p_entry" entries to the same HTML file?
Thanks.
Alexandre
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








