Hi. I am writing an xsl file for a TEI lite xml doc. The xml doc contains chapters of a book, something along the lines of:
Now, I would like the XSL to create a navigation panel for this book by pointing to chapter titles as anchor points. SO: I know what I need, but I don't know how to do it:
a) how can I mark the original XML doc so that <head>Blah-blah</head> is also automatically marked as <a href="blah blah"></a>?
b) how can I insert the actual value-of select="head" between the quotation marks in <a href>:
c) is there an even simpler way to do this by doing something with divGen?
Many thanks in advance,
Tench
Code:
<body>
<divGen type="toc">
<div1 type="chapter" n="1">
<head>Blah-blah</head>
<p> text... text... text. </p>
<p> text... text... text. </p>
...
</div1>
...
</body>
Now, I would like the XSL to create a navigation panel for this book by pointing to chapter titles as anchor points. SO: I know what I need, but I don't know how to do it:
a) how can I mark the original XML doc so that <head>Blah-blah</head> is also automatically marked as <a href="blah blah"></a>?
b) how can I insert the actual value-of select="head" between the quotation marks in <a href>:
Code:
<xsl:template match="div1" mode="toc">
<li><a href="#"> <xsl:value-of select="head"/></a></li>
</xsl:template>
c) is there an even simpler way to do this by doing something with divGen?
Many thanks in advance,
Tench