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

Xref to the screenshot element

From
Divine Dandelion℠ <>
Date
2012-06-30T08:11:44+00:00
ID
CADv=
Thread
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 →