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
[email protected]


  ----- Original Message ----- 
  From: Divine Dandelionâ„  
  To: [email protected] 
  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/



Reply via email to