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] DocBookXSL XHTML chunking does not produce hyperlinks in index page.


Well, Saxon 7.9.1 is not compatible with the DocBook XSL stylesheets. Try
version 6.5.3.

Regarding no <a> tag being output by the template <xsl:template
match="indexterm" mode="index-primary">:
The stylesheet does not make the indexterm the hot link. Rather, it appends
the section title that contains the indexterm and makes that the hotlink.
The <xsl:for-each> that follows handles that. See my book's index for an
example of what it should look like:

http://www.sagehill.net/docbookxsl/bookindex.html

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Lee Gwun Wai" <gwunwai@pacific.net.sg>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, June 06, 2004 9:53 PM
Subject: RE: [docbook-apps] DocBookXSL XHTML chunking does not produce
hyperlinks in index page.


> Hello again,
>
> I did some testing, and downloaded Saxon 7.9.1, and used Saxon instead of
> Xalan for the transformation, but still, I get a HTML index page with no
> hyperlinks.
>
> I traced the processing in the stylesheets, and found that it reaches
> xhtml\autoidx.xsl, and this chunk of code:
>
> ...
> <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"/>
> ...
>
> The code here clearly outputs the value of the primary tag, but without
any
> <a> tag, so I'm quite curious how it will be added in later. Perhaps by
> html2xhtml.xsl? But I checked the same autoidx.xsl, but from the html
> folder, and it's exactly the same, ie, no anchor tag introduced.
>
> Perhaps somebody can enlighten me on this, because it doesn't make sense
to
> me, at least for now.
>
> Thanks in advance,
> Gwun Wai
>
> -----Original Message-----
> From: Lee Gwun Wai [mailto:gwunwai@pacific.net.sg]
> Sent: Sunday, June 06, 2004 1:32 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: RE: [docbook-apps] DocBookXSL XHTML chunking does not produce
> hyperlinks in index page.
>
>
> Hello,
>
> Thanks for the quick response, but no luck, it didn't work. I got the same
> output, with the index terms on the index page, but no hyperlinks.
>
> I also tried with the latest version of the DocBook XSL stylesheets, which
I
> believe is 1.65.1, but I got the same result.
>
> I think I installed Xalan correctly, for this is my output when I do a
>
> java  org.apache.xalan.xslt.EnvironmentCheck
>
> #---- BEGIN writeEnvironmentReport($Revision: 1.26 $): Useful stuff
> found: ----
> version.DOM.draftlevel=2.0fd
> java.class.path=.
> version.JAXP=1.1 or higher
> java.ext.dirs=E:\j2sdk1.4.2_02\jre\lib\ext
> #---- BEGIN Listing XML-related jars in:
> foundclasses.sun.boot.class.path ----
> xalan.jar-path=E:\j2sdk1.4.2_02\jre\lib\endorsed\xalan.jar
> #----- END Listing XML-related jars in:
> foundclasses.sun.boot.class.path -----
> version.xerces2=not-present
> version.xerces1=not-present
> version.xalan2_2=Xalan Java 2.6.0
> version.xalan1=not-present
> version.ant=not-present
> java.version=1.4.2_02
> version.DOM=2.0
> version.crimson=present-unknown-version
>
sun.boot.class.path=E:\j2sdk1.4.2_02\jre\lib\endorsed\xalan.jar;E:\j2sdk1.4.
> 2_02\jre\lib\rt.jar;E:\j2sdk1.4.2_02\jre\lib\i18n
>
.jar;E:\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;E:\j2sdk1.4.2_02\jre\lib\jsse.j
> ar;E:\j2sdk1.4.2_02\jre\lib\jce.jar;E:\j2sdk1.4.2
> _02\jre\lib\charsets.jar;E:\j2sdk1.4.2_02\jre\classes
> version.SAX=2.0
> version.xalan2x=Xalan Java 2.6.0
> #----- END writeEnvironmentReport: Useful properties found: -----
> # YAHOO! Your environment seems to be OK.
>
> Or is something else missing?
>
> -----Original Message-----
> From: Bob Stayton [mailto:bobs@sagehill.net]
> Sent: Saturday, June 05, 2004 11:41 PM
> To: gwunwai@pacific.net.sg; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] DocBookXSL XHTML chunking does not produce
> hyperlinks in index page.
>
>
> Yes, the index entries should link back to the HTML pages.  I suspect the
> problem is the with (old) Xalan that is bundled with Java 1.4.  This
> reference tells you how to use a newer Xalan:
>
> http://www.sagehill.net/docbookxsl/InstallingAProcessor.html#InstallXalan
>
> Let me know if that doesn't help.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "Lee Gwun Wai" <gwunwai@pacific.net.sg>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Saturday, June 05, 2004 8:17 AM
> Subject: [docbook-apps] DocBookXSL XHTML chunking does not produce
> hyperlinks in index page.
>
>
> > Hello,
> >
> > I need some help with the generation of index page.
> >
> > I am able to get an index page (ix01.html), for xhtml chunked pages. But
I
> > was expecting the index page to contain the hyperlink back to the actual
> > place in the content where the indexterms are. I can see that in the
page
> > where the indexterms were defined, an anchor was created, but the
missing
> > part is the hyperlink, which is sort of lame for a HTML index page.
> >
> > I tried the fo stylesheets, with FOP, and in the output PDF, I got the
> index
> > page, with the terms and their page numbers, but nothing happens when I
> > click on the terms.
> >
> > I've been searching the net, and it seemed that hyperlinks will be
> > automatically generated, but it didn't work for me. Is there something
> that
> > I am doing wrong?
> >
> > This is something similar,
> > http://sources.redhat.com/ml/docbook/2004-04/msg00025.html, but the
thread
> > sort of just died off, without the solution.
> >
> > I am using DocBook XSL 1.64.1, with Xalan that is bundled with JDK 1.4,
> and
> > I don't have any customization layers.
> >
> > Thanks in advance!
> > Gwun Wai
> >
> > My source:
> > <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
> >
> > <book>
> >     <bookinfo>
> >         <title>My First DocBook</title>
> >     </bookinfo>
> >     <chapter>
> >         <title>The First Chapter</title>
> >         <para>The quick brown fox jumps over the lazy dog.</para>
> >         <section>
> >             <indexterm><primary>Section One</primary></indexterm>
> >             <title>The First Section</title>
> >             <para>This is Section 1</para>
> >         </section>
> >     </chapter>
> >     <index/>
> > </book>
> >
> >
> > To unsubscribe from this list, send a post to
> docbook-apps-unsubscribe@lists.oasis-open.org, or visit
> http://www.oasis-open.org/mlmanage/.
> >
> >
> >
>
>
>
> To unsubscribe from this list, send a post to
> docbook-apps-unsubscribe@lists.oasis-open.org, or visit
> http://www.oasis-open.org/mlmanage/.
>
>
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>



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]