Re: [xep-support] Replace straight apostrophe with curly apostrophe (again)

From: Jacques Foucry <>
Date: Tue Sep 28 2010 - 02:15:05 PDT

On 27 sept. 2010, at 01:27, G. Ken Holman wrote:

Hello Ken,

> I suggest you create a very small example, the smallest you can make, that has a paragraph in it with the character that needs to be replaced. Run this through the XSLT processor only and not through the XSL-FO processor and you will be able to inspect the XSL-FO stream for any problems. You should see the character translated in the XSL-FO stream.

As you suggest I created a very small sample and a very small stylesheet file which do the job. Using xsltproc to see the XSLT processor flow.

In the result the only translated characters are those who are in <figure><title></title></figure>. The other are not translated.

In fact it seems it work for figure/title because I customize "formal.object.heading" template. If I remove this customization in my styleshhet
the quote are not translated.

Here is my stylesheet :

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0"
        exclude-result-prefixes="exsl d">
        <xsl:import href="file:/Volumes/Travaux/docbook-xsl/fo/profile-docbook.xsl"/>
        <xsl:param name="singlequote">
        <xsl:param name="curlyquote">
        <xsl:template name="formal.object.heading">
                <xsl:param name="object" select="."/>
                <fo:block xmlns:fo="" text-align="center">
                        <xsl:apply-templates select="$object" mode="title.markup"/>
        <xsl:template match="d:title//text()|d:para//text()" mode="no.anchor.mode">
                <xsl:value-of select="translate(.,$singlequote,$curlyquote)"/>

And my little sample :

<?xml version="1.0" encoding="utf-8"?>
<chapter xmlns="" version="5.0" xml:lang="en">
        <title>Test 'as is'</title>
                This software is provided 'as is'.
                <figure xml:id="test">
                        <title>This software is provided 'as is'</title>
                                <imageobject conformance="fo-xep">
                                        <imagedata fileref="images/warning.svg" align="center" format="svg" scalefit="1" width="75%"/>

Thanks in advance for your help

Best regards,

(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Tue Sep 28 02:46:02 2010

This archive was generated by hypermail 2.1.8 : Tue Sep 28 2010 - 02:46:11 PDT