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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook] collect.targets and Index


[I'm moving this over to the docbook-apps mailing list where application
issues are discussed. The docbook list is for DTD issues.]

Hi,
I am not able to duplicate your error using your sample file and your
stylesheet.  I am using xsltproc 1.1.11 based on libxml2 2.6.14.  I couldn't
tell from your stylesheet what version of the stylesheets you are using, but
I tested with the latest 1.67.2.  I get both the target.xml and the index
output with one index entry.

I know that xsltproc has exhibited problems with the profiling versions of
the stylesheets, and some people resort to using a two-step process to
profile first and then process for output. But like I said, it works for in
the current versions.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Cai Qian" <caiqian@gnome.org>
To: <docbook@lists.oasis-open.org>
Sent: Friday, December 10, 2004 7:51 AM
Subject: [docbook] 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]