This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] 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="&#8216;"/>
    <l:template name="endquote" text="&#8217;"/>
    <l:template name="nestedstartquote" text="&#8220;"/>
    <l:template name="nestedendquote" text="&#8221;"/>
  </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/


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]