Re: [docbook-apps] Generating e-pub and html indexes

2015-12-16 Thread Pc Thoms
Hi Bob & Jirka
Thanks for this. Bit late in saying so.
But I am using this customization on a document I am working with,
presently, and it does the trick. Thanks again.


On Tue, Jul 23, 2013 at 1:47 PM, Bob Stayton <b...@sagehill.net> wrote:

> I seem to recall that Framemaker's HTML output used something simple like
> this for the link text:
>
> cat, [1]
> dog, [1], [2], [3], [4]
> egret, [1], [2]
>
> This is easily achieved in DocBook XSL by customizing this template from
> autoidx.xsl:
>
>   
>
> by replacing how the "title" variable is computed in that template with
> this:
>
>
>  [
>  
>  ]
>
>
> Here the $position value was passed to the template as a parameter, giving
> it the position in the list of links for that indexterm.  If you are using
> zones in your indexterms, there are a couple of other templates you will
> need to customize as well.
>
> If you want to pursue your c1s3p7 scheme, the context node for this
> template is the indexterm in its location in the text.  To get the number
> of its chapter, for example, you could use something like this within the
> template:
>
>mode="label.markup"/>
>
> When customizing index templates, your customization layer will usually
> need to incorporate the entity declarations that are used in most of the
> index templates.  See the top of the autoidx.xsl file to see how to do that.
>
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
>
>
> From: Pc Thoms
> Sent: Tuesday, July 23, 2013 5:57 AM
>
> To: Bob Stayton
> Cc: Jirka Kosek ; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Generating e-pub and html indexes
>
>
> Hi Paul
> You are right about my desire to change the appearance of the locator in
> the generated index. I would prefer a locator like a page number.
> I understand that the locators generated in html, etc., give the context
> of the . However, I would prefer a locator such as
> c1s3p7 (chapter one, section 3, paragraph 7), or c4t3 (chapter four, table
> 3), if not the exact locator given in an equivalent pdf file. Or, each
> locator might be given a sequential number. I am looking for a simply link
> in an index than the chapter title.
> With thanks
>
>
>
>
>
>
>
> On Tue, Jul 23, 2013 at 4:12 AM, Bob Stayton <b...@sagehill.net> wrote:
>
> Hi Paul,
> I misunderstood what you meant by locator.  As you said in your earlier
> mail, setting the stylesheet parameter 'index.links.to.section' to a value
> of  zero creates an href that sends the link directly to the point in the
> text where the indexterm was located.  I don't think you can get any more
> specific than that.  So I think your last paragraph is satisfied.
>
> The hot link text displayed in the index is still the section title, even
> though the link lands at the specific point.  I thought you wanted to
> change the hot text, from the section title to something like a page
> number, so I was asking about an example of what you want the hot text to
> say instead of the section title, given that page numbers don't exist in
> HTML output.
>
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
>
>
> From: Pc Thoms
> Sent: Monday, July 22, 2013 5:02 PM
> To: Bob Stayton
> Cc: Jirka Kosek ; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Generating e-pub and html indexes
>
>
> A specific example I should not provide, as it is beyond my expertise, but
> I have expectations and hopes for such. I am fairly competent in xml, but
> not with xslt.
>
>
> If the locators in a DocBook formatted xml file can point to the
> , , , , etc., within the document, the
> more specific the reference between the locator and the origination of the
>  so much the better. Preferably the generated locator will
> point directly to the originating  placed in the document, or
> the lowest hierarchical block element. Rather than linking to the
> , which may contain hundreds, to thousands, of words it would be
> better to link to the lowest hierarchical block element that contains the
> , such as a  or  (DocBook-Publisher).
> This should make the an  locator link directly to specific place
> in the text, that one would presumably be interested in once they click a
> link.
> Locators that link to the beginning of a  or  that may
> contain 500+ words is not very useful. But a locator that links one
> directly to the , , , or , would serve its’
> readers well.
>
>
> What I’m looking for is an index locator that has an “href” attribute that
> links directly to an anchored point in an XHTML and E-Pub document.
> Any assistance, and direction, is appreciated.
>
> Paul
>


Re: [docbook-apps] Generating e-pub and html indexes

2013-07-30 Thread Richard Hamilton
Sorry for the delay in getting back to you all on this. I have been trying to 
upload the customization to wiki.docbook.org, but I am having a bit of trouble 
doing that. I may end up putting it on a different site temporarily, unless I 
can figure out what's going on in the wiki.

I should be set one way or the other in the next day or two, and I'll let 
everyone know at that point.

Dick 
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



On Jul 22, 2013, at 7:33 PM, Xmplar wrote:

 Hi Richard,
 Please do publicize my customization - I haven't changed any of that coding 
 in the meantime.
 Dave
 
 On 23-07-13 11:49 AM, Richard Hamilton wrote:
 Hi Paul,
 
 Dave Gardiner put together an index customization that I've used to generate 
 index entries that point to numbered sections.
 
 That is, if you have section numbering turned on, and you use this 
 customization, the index will use the section number instead of the title. 
 So you get index entries that look like this:
 
 agile development, 1.4, 2.3.6
 
 This doesn't work if you have section numbering turned off. I have an item 
 on my todo list to make it so it will still work with section numbering on 
 or off, but that has sunk to the bottom of my todo list for now:-).
 
 If you'd like to see the customization, I can send it to you if it's okay 
 with Dave.
 
 Dick Hamilton
 ---
 XML Press
 XML for Technical Communicators
 http://xmlpress.net
 hamil...@xmlpress.net
 
 
 
 On Jul 22, 2013, at 5:02 PM, Pc Thoms wrote:
 
 A specific example I should not provide, as it is beyond my expertise, but 
 I have expectations and hopes for such. I am fairly competent in xml, but 
 not with xslt.
 
 If the locators in a DocBook formatted xml file can point to 
 thechapter/,section,para/,table/, etc., within the document, the 
 more specific the reference between the locator and the origination of 
 theindexterm/  so much the better. Preferably the generated locator will 
 point directly to the originatingindexterm/  placed in the document, or 
 the lowest hierarchical block element. Rather than linking to 
 thechapter/, which may contain hundreds, to thousands, of words it would 
 be better to link to the lowest hierarchical block element that contains 
 theindexterm/, such as apara/  orline/  (DocBook-Publisher).
 This should make the anindex/  locator link directly to specific place in 
 the text, that one would presumably be interested in once they click a link.
 Locators that link to the beginning of achapter/  orsection/  that may 
 contain 500+ words is not very useful. But a locator that links one 
 directly to thesection,para/,table/, orline/, would serve its’ 
 readers well.
 
 What I’m looking for is an index locator that has an “href” attribute that 
 links directly to an anchored point in an XHTML and E-Pub document.
 Any assistance, and direction, is appreciated.
 
 Paul
 
 
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating e-pub and html indexes

2013-07-23 Thread Bob Stayton
Hi Paul,
I misunderstood what you meant by locator.  As you said in your earlier mail, 
setting the stylesheet parameter 'index.links.to.section' to a value of  zero 
creates an href that sends the link directly to the point in the text where the 
indexterm was located.  I don't think you can get any more specific than that.  
So I think your last paragraph is satisfied.

The hot link text displayed in the index is still the section title, even 
though the link lands at the specific point.  I thought you wanted to change 
the hot text, from the section title to something like a page number, so I was 
asking about an example of what you want the hot text to say instead of the 
section title, given that page numbers don't exist in HTML output.  

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


From: Pc Thoms 
Sent: Monday, July 22, 2013 5:02 PM
To: Bob Stayton 
Cc: Jirka Kosek ; docbook-apps@lists.oasis-open.org 
Subject: Re: [docbook-apps] Generating e-pub and html indexes


A specific example I should not provide, as it is beyond my expertise, but I 
have expectations and hopes for such. I am fairly competent in xml, but not 
with xslt.


If the locators in a DocBook formatted xml file can point to the chapter/, 
section, para/, table/, etc., within the document, the more specific the 
reference between the locator and the origination of the indexterm/ so much 
the better. Preferably the generated locator will point directly to the 
originating indexterm/ placed in the document, or the lowest hierarchical 
block element. Rather than linking to the chapter/, which may contain 
hundreds, to thousands, of words it would be better to link to the lowest 
hierarchical block element that contains the indexterm/, such as a para/ or 
line/ (DocBook-Publisher).
This should make the an index/ locator link directly to specific place in the 
text, that one would presumably be interested in once they click a link.
Locators that link to the beginning of a chapter/ or section/ that may 
contain 500+ words is not very useful. But a locator that links one directly to 
the section, para/, table/, or line/, would serve its’ readers well.


What I’m looking for is an index locator that has an “href” attribute that 
links directly to an anchored point in an XHTML and E-Pub document.
Any assistance, and direction, is appreciated.

Paul



Re: [docbook-apps] Generating e-pub and html indexes

2013-07-23 Thread Pc Thoms
Hi Paul
You are right about my desire to change the appearance of the locator in
the generated index. I would prefer a locator like a page number.
I understand that the locators generated in html, etc., give the context of
the indexterm/. However, I would prefer a locator such as
c1s3p7 (chapter one, section 3, paragraph 7), or c4t3 (chapter four, table
3), if not the exact locator given in an equivalent pdf file. Or, each
locator might be given a sequential number. I am looking for a simply link
in an index than the chapter title.
With thanks




On Tue, Jul 23, 2013 at 4:12 AM, Bob Stayton b...@sagehill.net wrote:

 **
 Hi Paul,
 I misunderstood what you meant by locator.  As you said in your earlier
 mail, setting the stylesheet parameter 'index.links.to.section' to a value
 of  zero creates an href that sends the link directly to the point in the
 text where the indexterm was located.  I don't think you can get any more
 specific than that.  So I think your last paragraph is satisfied.

 The hot link text displayed in the index is still the section title, even
 though the link lands at the specific point.  I thought you wanted to
 change the hot text, from the section title to something like a page
 number, so I was asking about an example of what you want the hot text to
 say instead of the section title, given that page numbers don't exist in
 HTML output.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net

  *From:* Pc Thoms pcth...@gmail.com
 *Sent:* Monday, July 22, 2013 5:02 PM
 *To:* Bob Stayton b...@sagehill.net
 *Cc:* Jirka Kosek ji...@kosek.cz ; docbook-apps@lists.oasis-open.org
 *Subject:* Re: [docbook-apps] Generating e-pub and html indexes

  A specific example I should not provide, as it is beyond my expertise,
 but I have expectations and hopes for such. I am fairly competent in xml,
 but not with xslt.

 If the locators in a DocBook formatted xml file can point to the
 chapter/, section, para/, table/, etc., within the document, the
 more specific the reference between the locator and the origination of the
 indexterm/ so much the better. Preferably the generated locator will
 point directly to the originating indexterm/ placed in the document, or
 the lowest hierarchical block element. Rather than linking to the
 chapter/, which may contain hundreds, to thousands, of words it would be
 better to link to the lowest hierarchical block element that contains the
 indexterm/, such as a para/ or line/ (DocBook-Publisher).
 This should make the an index/ locator link directly to specific place
 in the text, that one would presumably be interested in once they click a
 link.
 Locators that link to the beginning of a chapter/ or section/ that may
 contain 500+ words is not very useful. But a locator that links one
 directly to the section, para/, table/, or line/, would serve its’
 readers well.

 What I’m looking for is an index locator that has an “href” attribute that
 links directly to an anchored point in an XHTML and E-Pub document.
 Any assistance, and direction, is appreciated.

 Paul




Re: [docbook-apps] Generating e-pub and html indexes

2013-07-23 Thread Bob Stayton
I seem to recall that Framemaker's HTML output used something simple like 
this for the link text:


cat, [1]
dog, [1], [2], [3], [4]
egret, [1], [2]

This is easily achieved in DocBook XSL by customizing this template from 
autoidx.xsl:


  xsl:template match=indexterm mode=reference

by replacing how the title variable is computed in that template with 
this:


   xsl:variable name=title
 xsl:text[/xsl:text
 xsl:value-of select=$position/
 xsl:text]/xsl:text
   /xsl:variable

Here the $position value was passed to the template as a parameter, giving 
it the position in the list of links for that indexterm.  If you are using 
zones in your indexterms, there are a couple of other templates you will 
need to customize as well.


If you want to pursue your c1s3p7 scheme, the context node for this template 
is the indexterm in its location in the text.  To get the number of its 
chapter, for example, you could use something like this within the template:


  xsl:apply-templates select=ancestor::d:chapter[1] 
mode=label.markup/


When customizing index templates, your customization layer will usually need 
to incorporate the entity declarations that are used in most of the index 
templates.  See the top of the autoidx.xsl file to see how to do that.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


From: Pc Thoms
Sent: Tuesday, July 23, 2013 5:57 AM
To: Bob Stayton
Cc: Jirka Kosek ; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Generating e-pub and html indexes


Hi Paul
You are right about my desire to change the appearance of the locator in the 
generated index. I would prefer a locator like a page number.
I understand that the locators generated in html, etc., give the context of 
the indexterm/. However, I would prefer a locator such as
c1s3p7 (chapter one, section 3, paragraph 7), or c4t3 (chapter four, table 
3), if not the exact locator given in an equivalent pdf file. Or, each 
locator might be given a sequential number. I am looking for a simply link 
in an index than the chapter title.

With thanks







On Tue, Jul 23, 2013 at 4:12 AM, Bob Stayton b...@sagehill.net wrote:

Hi Paul,
I misunderstood what you meant by locator.  As you said in your earlier 
mail, setting the stylesheet parameter 'index.links.to.section' to a value 
of  zero creates an href that sends the link directly to the point in the 
text where the indexterm was located.  I don't think you can get any more 
specific than that.  So I think your last paragraph is satisfied.


The hot link text displayed in the index is still the section title, even 
though the link lands at the specific point.  I thought you wanted to change 
the hot text, from the section title to something like a page number, so I 
was asking about an example of what you want the hot text to say instead of 
the section title, given that page numbers don't exist in HTML output.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


From: Pc Thoms
Sent: Monday, July 22, 2013 5:02 PM
To: Bob Stayton
Cc: Jirka Kosek ; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Generating e-pub and html indexes


A specific example I should not provide, as it is beyond my expertise, but I 
have expectations and hopes for such. I am fairly competent in xml, but not 
with xslt.



If the locators in a DocBook formatted xml file can point to the chapter/, 
section, para/, table/, etc., within the document, the more specific 
the reference between the locator and the origination of the indexterm/ so 
much the better. Preferably the generated locator will point directly to the 
originating indexterm/ placed in the document, or the lowest hierarchical 
block element. Rather than linking to the chapter/, which may contain 
hundreds, to thousands, of words it would be better to link to the lowest 
hierarchical block element that contains the indexterm/, such as a para/ 
or line/ (DocBook-Publisher).
This should make the an index/ locator link directly to specific place in 
the text, that one would presumably be interested in once they click a link.
Locators that link to the beginning of a chapter/ or section/ that may 
contain 500+ words is not very useful. But a locator that links one directly 
to the section, para/, table/, or line/, would serve its’ readers 
well.



What I’m looking for is an index locator that has an “href” attribute that 
links directly to an anchored point in an XHTML and E-Pub document.

Any assistance, and direction, is appreciated.

Paul 



-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Jirka Kosek
On 19.7.2013 2:00, Pc Thoms wrote:

 Can the generated index linked be changed to reflect the paragraph/line
 number, or something other than the chapter/section title.

You can modify the following template from autoidx.xsl:

xsl:template match=indexterm mode=reference

Jirka

-- 
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
   Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
--
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--



signature.asc
Description: OpenPGP digital signature


Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Bob Stayton
  Locators like those in pdfs generated via FO are ideal. 

Can you give an example of what those locators would look like in the context 
of HTML and ePub, which have no fixed page numbers?

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


From: Pc Thoms 
Sent: Thursday, July 18, 2013 5:00 PM
To: Jirka Kosek 
Cc: docbook-apps@lists.oasis-open.org 
Subject: Re: [docbook-apps] Generating e-pub and html indexes


Thanks for the link:
http://docbook.sourceforge.net/release/xsl/current/doc/html/index.links.to.section.html



Changing the parameter to 0 links the indexentry/ directly to the appropriate 
point in the text.
Can the generated index linked be changed to reflect the paragraph/line number, 
or something other than the chapter/section title.
Locators like those in pdfs generated via FO are ideal. 
I am aware that the index.prefer.titleabbrev can also be set to 1, or the 
default 0, but this is not desire-able in the documents at hand.





On Thu, Jul 18, 2013 at 6:51 PM, Pc Thoms pcth...@gmail.com wrote:

  Thanks Jirka 
  Now I know where to change a parameter.
  I'll give that a go.






  On Thu, Jul 18, 2013 at 12:46 PM, Jirka Kosek ji...@kosek.cz wrote:

On 18.7.2013 13:51, Pc Thoms wrote:

 However, rendering to e-pub and html it is not as specific, pointing to 
the
 beginning of a chapter/section.


As HTML doesn't use page numbers you need another anchor -- only
sensible anchor with a label is the closest section with the title.


 Is there a way to generate an index for e-pub and html that will generate
 an index like the PDF output?


Yes, just set the following parameter to 0:


http://docbook.sourceforge.net/release/xsl/current/doc/html/index.links.to.section.html


 Every indexterm/ used is given a unique xml:id.


You don't even need to manually assign IDs for this, they can be
autogenerated.

--
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
   Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
--
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--







Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Pc Thoms
A specific example I should not provide, as it is beyond my expertise, but
I have expectations and hopes for such. I am fairly competent in xml, but
not with xslt.

If the locators in a DocBook formatted xml file can point to the
chapter/, section, para/, table/, etc., within the document, the
more specific the reference between the locator and the origination of the
indexterm/ so much the better. Preferably the generated locator will
point directly to the originating indexterm/ placed in the document, or
the lowest hierarchical block element. Rather than linking to the
chapter/, which may contain hundreds, to thousands, of words it would be
better to link to the lowest hierarchical block element that contains the
indexterm/, such as a para/ or line/ (DocBook-Publisher).
This should make the an index/ locator link directly to specific place in
the text, that one would presumably be interested in once they click a link.
Locators that link to the beginning of a chapter/ or section/ that may
contain 500+ words is not very useful. But a locator that links one
directly to the section, para/, table/, or line/, would serve its’
readers well.

What I’m looking for is an index locator that has an “href” attribute that
links directly to an anchored point in an XHTML and E-Pub document.
Any assistance, and direction, is appreciated.

Paul


Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Richard Hamilton
Hi Paul,

Dave Gardiner put together an index customization that I've used to generate 
index entries that point to numbered sections.

That is, if you have section numbering turned on, and you use this 
customization, the index will use the section number instead of the title. So 
you get index entries that look like this:

agile development, 1.4, 2.3.6

This doesn't work if you have section numbering turned off. I have an item on 
my todo list to make it so it will still work with section numbering on or off, 
but that has sunk to the bottom of my todo list for now:-). 

If you'd like to see the customization, I can send it to you if it's okay with 
Dave.

Dick Hamilton
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



On Jul 22, 2013, at 5:02 PM, Pc Thoms wrote:

 A specific example I should not provide, as it is beyond my expertise, but I 
 have expectations and hopes for such. I am fairly competent in xml, but not 
 with xslt.
 
 If the locators in a DocBook formatted xml file can point to the chapter/, 
 section, para/, table/, etc., within the document, the more specific 
 the reference between the locator and the origination of the indexterm/ so 
 much the better. Preferably the generated locator will point directly to the 
 originating indexterm/ placed in the document, or the lowest hierarchical 
 block element. Rather than linking to the chapter/, which may contain 
 hundreds, to thousands, of words it would be better to link to the lowest 
 hierarchical block element that contains the indexterm/, such as a para/ 
 or line/ (DocBook-Publisher).
 This should make the an index/ locator link directly to specific place in 
 the text, that one would presumably be interested in once they click a link.
 Locators that link to the beginning of a chapter/ or section/ that may 
 contain 500+ words is not very useful. But a locator that links one directly 
 to the section, para/, table/, or line/, would serve its’ readers 
 well.
 
 What I’m looking for is an index locator that has an “href” attribute that 
 links directly to an anchored point in an XHTML and E-Pub document.
 Any assistance, and direction, is appreciated.
 
 Paul
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Pc Thoms
Thanks Dick
That would be helpful.
I'll give it a try, and thanks to Dave.


On Mon, Jul 22, 2013 at 11:19 PM, Richard Hamilton hamil...@xmlpress.netwrote:

 Hi Paul,

 Dave Gardiner put together an index customization that I've used to
 generate index entries that point to numbered sections.

 That is, if you have section numbering turned on, and you use this
 customization, the index will use the section number instead of the title.
 So you get index entries that look like this:

 agile development, 1.4, 2.3.6

 This doesn't work if you have section numbering turned off. I have an item
 on my todo list to make it so it will still work with section numbering on
 or off, but that has sunk to the bottom of my todo list for now:-).

 If you'd like to see the customization, I can send it to you if it's okay
 with Dave.

 Dick Hamilton
 ---
 XML Press
 XML for Technical Communicators
 http://xmlpress.net
 hamil...@xmlpress.net



 On Jul 22, 2013, at 5:02 PM, Pc Thoms wrote:

  A specific example I should not provide, as it is beyond my expertise,
 but I have expectations and hopes for such. I am fairly competent in xml,
 but not with xslt.
 
  If the locators in a DocBook formatted xml file can point to the
 chapter/, section, para/, table/, etc., within the document, the
 more specific the reference between the locator and the origination of the
 indexterm/ so much the better. Preferably the generated locator will
 point directly to the originating indexterm/ placed in the document, or
 the lowest hierarchical block element. Rather than linking to the
 chapter/, which may contain hundreds, to thousands, of words it would be
 better to link to the lowest hierarchical block element that contains the
 indexterm/, such as a para/ or line/ (DocBook-Publisher).
  This should make the an index/ locator link directly to specific place
 in the text, that one would presumably be interested in once they click a
 link.
  Locators that link to the beginning of a chapter/ or section/ that
 may contain 500+ words is not very useful. But a locator that links one
 directly to the section, para/, table/, or line/, would serve its’
 readers well.
 
  What I’m looking for is an index locator that has an “href” attribute
 that links directly to an anchored point in an XHTML and E-Pub document.
  Any assistance, and direction, is appreciated.
 
  Paul
 




Re: [docbook-apps] Generating e-pub and html indexes

2013-07-22 Thread Xmplar

Hi Richard,
Please do publicize my customization - I haven't changed any of that 
coding in the meantime.

Dave

On 23-07-13 11:49 AM, Richard Hamilton wrote:

Hi Paul,

Dave Gardiner put together an index customization that I've used to generate 
index entries that point to numbered sections.

That is, if you have section numbering turned on, and you use this 
customization, the index will use the section number instead of the title. So 
you get index entries that look like this:

agile development, 1.4, 2.3.6

This doesn't work if you have section numbering turned off. I have an item on 
my todo list to make it so it will still work with section numbering on or off, 
but that has sunk to the bottom of my todo list for now:-).

If you'd like to see the customization, I can send it to you if it's okay with 
Dave.

Dick Hamilton
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



On Jul 22, 2013, at 5:02 PM, Pc Thoms wrote:


A specific example I should not provide, as it is beyond my expertise, but I 
have expectations and hopes for such. I am fairly competent in xml, but not 
with xslt.

If the locators in a DocBook formatted xml file can point to thechapter/,section,para/,table/, etc., within 
the document, the more specific the reference between the locator and the origination of theindexterm/  so much the better. 
Preferably the generated locator will point directly to the originatingindexterm/  placed in the document, or the lowest 
hierarchical block element. Rather than linking to thechapter/, which may contain hundreds, to thousands, of words it would be 
better to link to the lowest hierarchical block element that contains theindexterm/, such as apara/  orline/  
(DocBook-Publisher).
This should make the anindex/  locator link directly to specific place in the 
text, that one would presumably be interested in once they click a link.
Locators that link to the beginning of achapter/  orsection/  that may contain 500+ words is not 
very useful. But a locator that links one directly to thesection,para/,table/, 
orline/, would serve its’ readers well.

What I’m looking for is an index locator that has an “href” attribute that 
links directly to an anchored point in an XHTML and E-Pub document.
Any assistance, and direction, is appreciated.

Paul






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating e-pub and html indexes

2013-07-18 Thread Jirka Kosek
On 18.7.2013 13:51, Pc Thoms wrote:

 However, rendering to e-pub and html it is not as specific, pointing to the
 beginning of a chapter/section.

As HTML doesn't use page numbers you need another anchor -- only
sensible anchor with a label is the closest section with the title.

 Is there a way to generate an index for e-pub and html that will generate
 an index like the PDF output?

Yes, just set the following parameter to 0:

http://docbook.sourceforge.net/release/xsl/current/doc/html/index.links.to.section.html

 Every indexterm/ used is given a unique xml:id.

You don't even need to manually assign IDs for this, they can be
autogenerated.

-- 
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
   Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
--
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--



signature.asc
Description: OpenPGP digital signature


Re: [docbook-apps] Generating e-pub and html indexes

2013-07-18 Thread Pc Thoms
Thanks Jirka
Now I know where to change a parameter.
I'll give that a go.



On Thu, Jul 18, 2013 at 12:46 PM, Jirka Kosek ji...@kosek.cz wrote:

 On 18.7.2013 13:51, Pc Thoms wrote:

  However, rendering to e-pub and html it is not as specific, pointing to
 the
  beginning of a chapter/section.

 As HTML doesn't use page numbers you need another anchor -- only
 sensible anchor with a label is the closest section with the title.

  Is there a way to generate an index for e-pub and html that will generate
  an index like the PDF output?

 Yes, just set the following parameter to 0:


 http://docbook.sourceforge.net/release/xsl/current/doc/html/index.links.to.section.html

  Every indexterm/ used is given a unique xml:id.

 You don't even need to manually assign IDs for this, they can be
 autogenerated.

 --
 --
   Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
 --
Professional XML consulting and training services
   DocBook customization, custom XSLT/XSL-FO document processing
 --
  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
 --
 Bringing you XML Prague conferencehttp://xmlprague.cz
 --