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-apps] Permalinks resources


Thanks so much for responding Thomas.  I have some in-line stuff if you don't mind having a look.

Best,
Scott


On Tue, May 20, 2014 at 9:46 AM, Thomas Schraitle <tom_schr@web.de> wrote:
Hi Scott,

On Tue, 20 May 2014 08:26:55 +0300
Scott Rifenbark <srifenbark@gmail.com> wrote:

> I am trying to implement some permanlinks throughout a manual and am
> working from here -
> http://doccookbook.sourceforge.net/html/en/dbc.html/permalinks.html

Great, you found my cookbook! :)
There is a small typo, the "/" should be "."; the correct URL is:

http://doccookbook.sourceforge.net/html/en/dbc.html.permalinks.html

Ahh yes.  My bad here.  I hand-entered that URL
 


> I am hitting some issue where some links are being constructed
> correctly (chapters) but some are not (sections).

In that case, I think you've hit a bug in my stylesheet(s). I will look
into the issue and come back to you later.

Perfect... I hope you can spot something.  I look forward to hearing back on it.
 


>  Does anyone know
> of any more information available on implementing these links beyond
> the URL I have mentioned?  I can't seem to find much information out
> there on the Internet.

Well, a permalink is a constant string which is immune to reordering or
restructuring of your document.

The best approach that fits into this requirement is your own IDs.

With the "use.id.as.filename" parameter you can create stable filenames
as well.

I'm not aware of any better approach.

I put that "use.id.as.filename" in my customization layer as follows:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">

  <xsl:import href="" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl">http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />

  <xsl:include href="">   <xsl:include href="">  <xsl:include href="">  <xsl:include href="">   <xsl:include href="">
  <xsl:param name="html.stylesheet" select="'ref-style.css'" />
  <xsl:param name="chapter.autolabel" select="1" />
  <xsl:param name="appendix.autolabel" select="A" />
  <xsl:param name="section.autolabel" select="1" />
  <xsl:param name="section.label.includes.component.label" select="1" />
  <xsl:param name="use.id.as.filename" select="1" />

</xsl:stylesheet>

I tried making the document using 'select="1"' as well as 'select="0"'.  I it had no effect on my generated HTML.  Granted, I don't know if I am using this parameter correctly or not.  I am by means an XSL person.

I don't know if this will help you when you are looking at your stylesheet but here are two (hand-formatted) snippets of the HTML showing when I try to implement the permalinks and when I do not.  In the top one, which attempts to implement them, my <a> tag is basically blank with no value for the "id", which I consistently use in my .XML source files for all <section> tags. The actual text title is also being dropped.

<h2 
class="title"
style="clear: both">
<a id=""></a>
<span class="permalink">
<a alt="Permalink" title="Permalink" href="">#">¶</a>
</span>
</h2>

<h2
class="title"
style="clear: both">
<a id="intro-welcome"></a>
1.1. Introduction
</h2>



--
Gruß/Regards,
    Thomas Schraitle



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