file 1
<xsl:call-template name="showbox-c02-box-only" select="."/>
</xsl:when>
the select is redundant, the current context is maintained when
the call-template call is made.
(xt is lax at error reporting)
same with line 1302
<xsl:call-template name="hidebox-c02-box-only" select="."/>
Also note that the
<xsl:apply-templates select=".">
the select is redundant.
Again it is implied, i.e. process all child nodes of the current context.
Otherwise cbs1 OK, produces an empty toc on the given file, is this what is
expected?
File cbs2, same issue. all select="." are redundant.
file cbs3,
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xt="http://www.jclark.com/xt"
extension-element-prefixes="xt">
Requires 'version="1.0"' adding.
The saxon equivalent to xt:document requires
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon" (to remove the saxon ns from output)
and the function call is:
<xsl:template match="preface">
<saxon:output file="{$dir}\preface.html">
<html><body bgcolor="#00eeee"><center>
<xsl:apply-templates/>
</center><hr/></body></html>
</saxon:output>
<a href="{$dir}\preface.html">Preface</a>
</xsl:template>
for example.
in file 4
<xsl:for-each select="entry">
<td valign="top"><xsl:value-of select="."/></td>
The <xsl:value-of .../> could be replaced more safely with
<xsl:apply-templates/>
The operation is that if the content of an element is text, it is added
to the output stream, if it contains markup, then it is processed with
the appropriate templates. See the xslt spec for details, its the
default templates.
Mmmm. Without pouring over the stylesheets and xml example for hours,
I'm getting no output other than the empty frames!
Is that expected?
HTH DaveP
|