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] Page number link instead of chapter title link in Index Generation

I'm not sure I understand the question.  The prior mail was about HTML processing.  There are no page numbers in HTML output.  Can you clarify what you want?
Bob Stayton
Sagehill Enterprises
----- Original Message -----
Sent: Tuesday, August 05, 2008 9:32 PM
Subject: [docbook-apps] Page number link instead of chapter title link in Index Generation

Dear All,


Which file need to be modified to get the page number instead of chapter link in the automatic index generation. Please help me.



N. Ganesh Babu


From: Alan Ezust [mailto:alan.ezust@gmail.com]
Sent: Tuesday, August 05, 2008 9:04 PM
To: apps docbook
Subject: [docbook-apps] <xsl:apply-templates select="." mode="class.attribute" />


Could someone explain to me what this does:
 <xsl:apply-templates select="." mode="class.attribute"/>
 I'm confused about how it transforms <programlisting> elements from docbook to html.
 I wanted to add a role attribute to my programlisting, so I have an element like this:
 <programlisting role="solution">
   something that has a solution
 But it seems that when it is processed by the rule in html/verbatim.xsl, the element gets replaced by
  <pre class="programlisting">
And the "solution" attribute is lost.

I would like to modify the template for programlisting to check the role, and if it exists, set the class= attrib of the resultant <pre> element to be the same thing. But i'm not sure where the best place is to put it in my customization layer. Any suggestions?

Here is the template for programlisting from verbatim.xsl:
<xsl:template match="programlisting|screen|synopsis">
  <xsl:param name="suppress-numbers" select="'0'"/>
  <xsl:variable name="id">
    <xsl:call-template name="object.id"/>

  <xsl:call-template name="anchor"/>

  <xsl:if test="$shade.verbatim != 0">
      <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
      <xsl:text>Use CSS instead,</xsl:text>
      <xsl:text>for example: pre.</xsl:text>
      <xsl:value-of select="local-name(.)"/>
      <xsl:text> { background-color: #E0E0E0; }</xsl:text>

    <xsl:when test="$suppress-numbers = '0'
            and @linenumbering = 'numbered'
            and $use.extensions != '0'
            and $linenumbering.extension != '0'">
      <xsl:variable name="rtf">
    <xsl:call-template name="apply-highlighting"/>
        <xsl:apply-templates select="." mode="class.attribute"/>
    <xsl:call-template name="number.rtf.lines">
      <xsl:with-param name="rtf" select="$rtf"/>
        <xsl:apply-templates select="." mode="class.attribute"/>
    <xsl:call-template name="apply-highlighting"/>

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