[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Quotation marks
Hi, > Using the docbook element `quote', and next transforming the article > into HTML using XSLT, the piece of text in the HTML document is enclosed > in the HTML entities “ and ”. These are codes for the left > and right double quotes, and the text is rendered accordingly. > > Because quotation format is language dependent, I believed to have met > an issue regarding language dependency. Therefore, I tagged the docbook > article (i.e. the article element, which is the uppermost element in the > hierarchy) with the "Lang" attribute, setting it to "en". > This, however, did not make any difference; the text remained enclosed > in double quotes instead of single quotes. Yes, those quotes are language dependant (Japanese uses completely different characters, for example). And the lang 'en', or English uses double start/end quotes for the first depth of quotes and single quotes for nested quotes (technically, 3rd depth uses double, 4th uses single, and so on). Therefore you need to modify the gentext file for English. However, you shouldn't modify en.xml directly, so add the following code to your customisation file: <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en" english-language-name="English"> <l:template name="startquote" text="‘"/> <l:template name="endquote" text="’"/> <l:template name="nestedstartquote" text="“"/> <l:template name="nestedendquote" text="”"/> </l:l10n> </l:i18n> It is possible to use the same signs for quotes and nestedquotes (but I think it rather confusing). Another approach is to redifine 'quote' template, but using gentext is smarter way. -- Yoshihiro Toda <mailto:ystoda@yahoo.co.jp> __________________________________________________ Do You Yahoo!? http://bb.yahoo.co.jp/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]