This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: DocBook XSL Stylesheets V1.52.0 released
* Norman Walsh <ndw@nwalsh.com> [020708 14:01]:
...
> I can't reproduce that error and looking at the code, I can't even see
> how it's possible. Are you using a customization layer? Can you
> provide a small sample that causes the problem?
Caused by the following customization:
<xsl:param name="output.method" select="'xml'"/>
<xsl:param name="output.doctype-public"
select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
<xsl:param name="output.doctype-system"
select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'"/>
<!-- override template "process-chunk" to get chunk HTML output with a
DOCTYPE declaration, taken from:
http://lists.oasis-open.org/archives/docbook-apps/200111/msg00343.html
This is necessary at least up to V1.51.1 of the DocBook XSL stylesheets
-->
<xsl:template name="process-chunk-element">
<xsl:choose>
<xsl:when test="$onechunk != 0 and not(parent::*)">
<xsl:call-template name="chunk-all-sections"/>
</xsl:when>
<xsl:when test="$onechunk != 0">
<xsl:apply-imports/>
</xsl:when>
<xsl:when test="$chunk.first.sections = 0">
<xsl:call-template name="chunk-first-section-with-parent"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="chunk-all-sections"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="process-chunk">
<xsl:param name="prev" select="."/>
<xsl:param name="next" select="."/>
<xsl:variable name="ischunk">
<xsl:call-template name="chunk"/>
</xsl:variable>
<xsl:variable name="chunkfn">
<xsl:if test="$ischunk='1'">
<xsl:apply-templates mode="chunk-filename" select="."/>
</xsl:if>
</xsl:variable>
<xsl:if test="$ischunk='0'">
<xsl:message>
<xsl:text>Error </xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text> is not a chunk!</xsl:text>
</xsl:message>
</xsl:if>
<xsl:variable name="filename">
<xsl:call-template name="make-relative-filename">
<xsl:with-param name="base.dir" select="$base.dir"/>
<xsl:with-param name="base.name" select="$chunkfn"/>
</xsl:call-template>
</xsl:variable>
<!-- BEGIN change -->
<xsl:if test="$output.doctype-public=''">
<xsl:call-template name="write.chunk">
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="content">
<xsl:call-template name="chunk-element-content">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$output.doctype-public!=''">
<xsl:call-template name="write.chunk.with.doctype">
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="method" select="$output.method"/>
<xsl:with-param name="doctype-public" select="$output.doctype-public"/>
<xsl:with-param name="doctype-system" select="$output.doctype-system"/>
<xsl:with-param name="content">
<xsl:call-template name="chunk-element-content">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<!-- END change -->
</xsl:template>
Is this still neccessary with 1.52.1?
Michael
--
mw@miwie.in-berlin.de http://www.miwie.org
mw@miwie.org