On 03/07/2011 03:57 PM, Julio Vazquez wrote:
>  
> 
> I was using your XSL Utility last night to transform some content with
> the DITA <q> element in it to PDF. When I viewed the PDF, no quotes
> surrounded the content, as I had expected. I took a look through the
> transforms and it appears that there’s a localize template missing that
> is used, not only by the <q> processing but a few others as well.
> 
> 
> In this case, the template gets invoked twice, once passing a param
> OpenQuote and then a second time passing a param CloseQuote. Am I
> missing something in my configuration? Can you point me to the location
> of the template?
> 

The q element is transformed as follows:

Excerpts from XSL_Utility_install_dir/addon/config/dita/xsl/fo/body.xsl:
---
  <xsl:attribute-set name="q">
  </xsl:attribute-set>

  <xsl:template match="*[contains(@class,' topic/q ')]">
    <fo:inline xsl:use-attribute-sets="q">
      <xsl:call-template name="commonAttributes"/>

      <xsl:call-template name="localize">
        <xsl:with-param name="message" select="openQuote"/>
      </xsl:call-template>
      <xsl:apply-templates/>
      <xsl:call-template name="localize">
        <xsl:with-param name="message" select="closeQuote"/>
      </xsl:call-template>
    </fo:inline>
  </xsl:template>
---

The named template localize, which is called by all XSLT stylesheets,
uses localized .xml files found in
XSL_Utility_install_dir/addon/config/dita/xsl/common/messages/.

Excerpts from
XSL_Utility_install_dir/addon/config/dita/xsl/common/messages/en.xml:
---
  <!-- Punctuation -->
  <message name="openQuote">&#x201C;</message>
  <message name="closeQuote">&#x201D;</message>
  <message name="colonSeparator">: </message>
  <message name="semiColonSeparator">; </message>
  <message name="commaSeparator">, </message>
  <message name="periodSeparator">. </message>
---

Here I assuming that you are writing in English.

There is no missing template. The problem you report is a quite stupid
bug in the above template matching topic/q.

---
select="openQuote"
---

should read:

---
select="'openQuote'"
---

and

---
select="closeQuote"
---

should read:

---
select="'closeQuote'"
---

Please find attached to this email a replacement for your existing
XSL_Utility_install_dir/addon/config/dita/xsl/fo/body.xsl




Attachment: body.xsl
Description: XML document

 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to