OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: collect.targets and Index


It seems I can't do collect.xref.targets and create a back cover index.

Here is example.
Sample XML file(1.xml)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd";>
<book>
  <chapter>
    <title>INTRO</title>
    <sect1>
      <title>welcome</title>
      <indexterm>
        <primary>#</primary>
        <secondary>GOOD</secondary>
      </indexterm>
    </sect1>
  </chapter>
  <index/>
</book>

Sample stylesheet(1.xsl)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
  <xsl:import
href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/profile-chunk.xsl" />
  <xsl:param name="generate.index">1</xsl:param> 
  <xsl:param name="collect.xref.targets" select="'yes'" />
  <xsl:param name="targets.filename" select="'target.xml'" />
  <xsl:param name="make.valid.html" select="1" />
  <xsl:param name="chunker.output.indent" select="'yes'" />
<xsl:stylesheet/>

Then I use `xsltproc 1.xsl 1.xml` to transform it to HTML, but the back
cover index is empty. However, if I commented out these two lines
  <xsl:param name="targets.filename" select="'target.xml'" />
  <xsl:param name="make.valid.html" select="1" />
. Everything is fine.

I just debuged it and found in file html/autoidx.xsl (Maybe
xhtml/autoidx.xsl, but it seems it was generated from above.)
<xsl:template match="indexterm" mode="index-symbol-div">
   ...
  <xsl:apply-templates select="key('letter', $key)
       [&scope;][count(.|key('primary',&primary;)[1]) = 1]"
                       mode="index-primary">
  ...

The statement "count(.|key('primary',&primary;)[1])" is going to "2", so
the "select" is ''. I don't how collect.xref.targets make it wrong. Can
someone help?

Regards,
-- 
Cai Qian



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]