[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Outputting multiple HTML files

Subject: RE: Outputting multiple HTML files
From: Alexandre Ratti <ratti@xxxxxxxxxxxxxxx>
Date: Sat, 21 Aug 1999 22:19:58 +0200
xsl to multiple html
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.