This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Index problems with Xalan but not Saxon


Hi Bob,

Bob Stayton wrote:
You can go ahead and file a bug report on SourceForge for the stylesheets.
That will at least help keep the issue alive and looked at.  But since it
works in other processors, I suspect it is a bug in Xalan.  It needs to be
isolated, though, as just passing the entire DocBook XSL stylesheet to Xalan
would be overwhelming to them, especially since indexing includes some of
the most complex XSL code in the stylesheets.  If I can isolate the problem,
I'll post a bug on Xalan.

The difference is that Saxon 6.5.3 enters in the xsl:for-each loop below while Xalan 2.5.1 skips it.


File xsl/xhtml/autoidx.xsl, start line 116, DocBook XSL 1.64.1:

<xsl:template match="indexterm" mode="index-primary">
  <xsl:param name="scope" select="."/>

<xsl:variable name="key" select="normalize-space(concat(primary/@sortas, primary[not(@sortas)]))"/>
<xsl:variable name="refs" select="key('primary', $key)[count(ancestor::node()|$scope) = count(ancestor::node())]"/>
<dt>
<xsl:value-of select="primary"/>
<xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &#34; &#34;, generate-id((ancestor-or-self::set |ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::reference |ancestor-or-self::partintro |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::article |ancestor-or-self::section |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::refentry |ancestor-or-self::refsect1 |ancestor-or-self::refsect2 |ancestor-or-self::refsect3 |ancestor-or-self::simplesect |ancestor-or-self::bibliography |ancestor-or-self::glossary |ancestor-or-self::index |ancestor-or-self::webpage)[last()])))[count(ancestor::node()|$scope) = count(ancestor::node())][1])]">
<xsl:apply-templates select="." mode="reference">
<xsl:with-param name="scope" select="$scope"/>
</xsl:apply-templates>
</xsl:for-each>


<!-- ... -->

</xsl:template>

Hope that helps,
George
-----------------------------------------------
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger
http://www.oxygenxml.com

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]