← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: [docbook-apps] Xref to the screenshot element

From
Bob Stayton <>
Date
2012-07-02T05:19:41+00:00
ID
005801cd5812$45ec1d90$6600a8c0@pazu
Thread
Re: [docbook-apps] Xref to the screenshot element


Hi Ivan,

Thanks for pointing out that the stylesheets did 
not support the title element on screenshot.  The title was added in 
DocBook 5, but the stylesheet had not been updated.  I just checked in the 
updates to support screenshot titles, including xrefs to screenshot, for both 
HTML and FO.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Divine Dandelion℠ 

  
To:  
  

  
Sent: Saturday, June 30, 2012 1:11 
  AM

  
Subject: [docbook-apps] Xref to the 
  screenshot element

  

Hi,
  

  
I have just found this thread in the maillist archive:

  

  
[docbook-apps] 
  xml:id on certain DocBook elements doesn't produce id's in HTML 
  output

  

  
At the end of the discussion, Kirill Churin wrote:

  Could you suggest any workarounds I can use now, 
  please?
  

  
Here is my rought solution for FO (added in my customization layer; 
  the screenshot.title.properties attribute set is also there). For 
  (X)HTML, just delete two italized lines (<fo:block>).

  

  

    <xsl:template 
    match="d:screenshot/d:title">
    <fo:block 
    xsl:use-attribute-sets="screenshot.title.properties 
    formal.title.properties">
      
    <xsl:apply-templates/>
    
    </fo:block>
  </xsl:template>

  
 

    <xsl:template match="d:screenshot" 
    mode="xref-to">
    <xsl:param 
    name="referrer"/>
    <xsl:param 
    name="xrefstyle"/>
    <xsl:param 
  name="verbose"/>

  
 

      <xsl:apply-templates select="." 
    mode="object.xref.markup">
      <xsl:with-param 
    name="purpose" select="'xref'"/>
      
    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
  
        <xsl:with-param name="referrer" 
    select="$referrer"/>
      <xsl:with-param 
    name="verbose" select="$verbose"/>
    
    </xsl:apply-templates>
  
</xsl:template>

  

  
In addition, the next string must be added to the common/en.xml file, under the 
  <l:context name="xref"> section (please let me know if there 
  is a better solution):

  

  <l:template name="screenshot" text="%t"/>
  

  
I use XSL Stylesheets 1.77.1, namespaced.

  

-- 
Regards,
  
Ivan Zaporozhets

  
Divine Dandelion℠ Online Publishing Service

  
http://divinedandelion.blogspot.com/
← Prev in month ← Prev in thread
Next in thread → Next in month →