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]

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!


Bernd

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


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