[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Replace straight apostrophe with curly apostrophe
Hi, The difference with xref is that the content is processed in a different mode. Try adding this template to your customization layer: <xsl:template match="d:para/text()|d:title/text()" mode="no.anchor.mode"> <xsl:value-of select="translate(.,$singlequote,$curlyquote)"/> </xsl:template> The 'no.anchor.mode' is used only for hot text, so that no nested links are created. Let me know if this does not work. Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "Jacques Foucry" <jacques@foucry.net> To: "docbook-apps" <docbook-apps@lists.oasis-open.org> Sent: Thursday, February 18, 2010 8:36 AM Subject: [docbook-apps] 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 --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]