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: Re: [docbook-apps] zh_CN or zh-CN for HTML

Michael Smith wrote:

>Bernd Groh <bgroh@redhat.com> writes:
>>after generating some HTML from XML DocBook for locales consisting of a 
>>language and a country code, such as zh_CN, I've realized that there's a 
>>problem with the resulting html document. This is caused by the lang 
>>attribute of the tags using zh_CN, instead of zh-CN, which is the HTML 
>>recommendation/standard (see 
>>http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1.1). Currently, 
>>I post-process the HTML-files with a string-replace, but I wondered 
>>whether there's another way of doing this automatically within the XML 
>>DocBook -> HTML conversion?
>There is now.
>I just added a new config parameter named "l10n.lang.value.rfc.compliant".
>It is set to 1 by default. Unless it is set to 0, underscores in
>two-part language codes are replaced with hyphens. You can try it
>out using the latest snapshot:
>  http://docbook.sourceforge.net/snapshot/

Thanks for that, Mike.

>There is a possibility that it could end up being set to 0 by
>default before the next official release -- to make it backward
>compatible. But I would argue that since this is an issue of
>standards compliance, we should be making the default compliant
>with the standards, with users given the option to make it not
>compliant if for some reason they need to do that. Or to put it
>another way, users should not need to explicitly set a parameter
>in order to ensure that their output it compliant.

I'd agree with that, though I'm already happy with the option to set a 
parameter to automatically replace the underscore with a hyphen. Again, 
thanks a lot!


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