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
[EMAIL PROTECTED]


  ----- Original Message ----- 
  From: N.Ganesh Babu, DS Chennai 
  To: 'apps docbook' 
  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.

   

  Regards,

  N. Ganesh Babu

   

  From: Alan Ezust [mailto:[EMAIL PROTECTED] 
  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
   </programlisting>
   
   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:variable>

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

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

    <xsl:choose>
      <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:variable>
        <pre>
          <xsl:apply-templates select="." mode="class.attribute"/>
      <xsl:call-template name="number.rtf.lines">
        <xsl:with-param name="rtf" select="$rtf"/>
      </xsl:call-template>
        </pre>
      </xsl:when>
      <xsl:otherwise>
        <pre>
          <xsl:apply-templates select="." mode="class.attribute"/>
      <xsl:call-template name="apply-highlighting"/>
        </pre>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
      

Reply via email to