OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Replace straight apostrophe with curly apostrophe


Hello list,

After a long discussion in XEP-support mailing list I still have a problem for replacing straight apostrophe with curly apostrophe.

I my custom stylesheet I've put:

	<xsl:param name="singlequote">
		<xsl:text>'</xsl:text>
	</xsl:param>
	<xsl:param name="curlyquote">
		<xsl:text>’</xsl:text>
	</xsl:param>

	<xsl:template match="d:para//text()|d:title//text()">
		<xsl:value-of select="translate(.,$singlequote,$curlyquote)"/>
	</xsl:template>

With this configuration all the straight apostrophe are changed into curly apostrophe. But it's ok for me. I would like to keep straight apostrophe for <litteral>, <computeroutput> or <screen> tags.

During my tests I've change the stylesheet by (no more double slash):

	<xsl:template match="d:para/text()|d:title/text()">
		<xsl:value-of select="translate(.,$singlequote,$curlyquote)"/>
	</xsl:template>

And it works well for text, title and screen (litteral and computer output too) but it failed on <xref>.

In fact I could have in my text something like that:

See <xref linkend="alice_home_dir">.

<figure xml:id="alice_home_dir">
	<title>Alice's home directory</title>
....
</figure>

I suppose that because the <xref linkend> reside before the title. But in fact the replacement is not made in the figure's title too.

So for resuming how can I change the straight apostrophe into curly apostrophe every where except inside <computeroutput>, <litteral> and <screen> tags ?

Thanks in advance,
Jacques

 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]