On 06 Feb 2009, at 08:19, Apache Wiki wrote:

Hi Jost, Jeremias

'''(R3)''' Decide how the language should be defined. Other implementations specify the @xml:lang on fo:root level. The same attribute is set for descendant's to override the default language. There is also the common FO property {{{country}}} and {{{language}}} to consider.

+ * [JM] XSL defines {{{xml:lang}}} as a shorthand for {{{country}}}/{{{language}}}/{{{script}}}. So both are equivalent from a user's perspective. It should be verified that {{{xml:lang}}} is properly mapped to the other three properties. Internally, the code should work off the basic XSL properties, not the shorthand.

FWIW: I think I have made sure at one point that the mapping of xml:lang to country/language should work (see a.o. org.apache.fop.fo.properties.XMLLangShorthandParser). The mapping to 'script' is not yet implemented. Very basically, however, since there is no validation whatsoever at parse-time of whether the specified value conforms to the ISO specification. I see the possibility of adding this, and it doesn't even seem too complicated.

Note that none of those properties apply to fo:root, so we'll probably have to assume that the natural language of the document is the one of the first fo:page-sequence. In theory, we always have access to the specified value on fo:root, but accessing that from the renderer context may get a bit messy (it exists only in the 'currentPropertyList' that is available in FOTreeBuilder)


Regards

Andreas

Reply via email to