|
Subject: splitting into separate files and linking From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 17 Jun 1999 22:22:02 +0100 (BST) |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Performance question, Larry Mason | Thread | Re: splitting into separate files a, James Clark |
| Re: Building the "World's Largest P, Chuck White | Date | Re: splitting into separate files a, James Clark |
| Month |