|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] splitting into separate files and linking
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
|
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








