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

splitting into separate files and linking

Subject: splitting into separate files and linking
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Jun 1999 22:22:02 +0100 (BST)
separate files
I wonder if someone can post an example of a working system to 
split up a master file into separate output chunks? 

Using XT's facilities, I have it almost working by borrowing stuff
from James Clark:

<xsl:template match="div0">
 <xsl:call-template name="write">
    <xsl:param name="file" expr="concat(generate-id(),'.html')"/>
    <xsl:param name="contents">
 ...

<xsl:template name="write">
  <xsl:param-variable name="contents"/>
  <xsl:param-variable name="file"/>
  <xsl:value-of select="w:write($contents,string($file))"
     xmlns:w="http://www.jclark.com/xt/java/com.jclark.xsl.sax.HTMLFileWriter"
   />
</xsl:template>

This works fine, making eg "N110.html" from a <div0>. The problem
comes when I want to put in a navigation bar. James has a plausible example:

<xsl:if test="from-preceding-siblings(div0)">
  <a href="{from-preceding-siblings(div0[1])/@name}.html">Previous article</a>
</xsl:if>

but this uses a `name' attribute for the div0 (which I don't have, and
don't really want), and I do not see how to get the generated-id()
function to do its stuff in this context.

Do other people do this regularly? Is there some  obvious technique I
am missing?

sebastian


 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.