cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brian moseley>
Subject Re: XSL/xalan and Localization
Date Sun, 06 Feb 2000 20:14:13 GMT
On Sat, 5 Feb 2000, Mike Engelhart wrote:

> The language "strings" being used are in my mind really
> part of the style of the page.  I'm sure there are

in my organization, style (fonts, colors, etc) and content
(localized strings) are owned by 2 separate groups - the
branding dept and the localization dept. almost all the way
to response building time, we have an explicit separation
between the two. to me, the four dimensions of a response
are structure, style, content, and data.

> instances where the language is more integral to the
> data but in this case, clearly it is not. I was thinking
> it would make more sense (to me at least) to allow XSL
> to have either a way of getting at localized resources
> during the transformation - something like
> <?language-resource
> type=""?>
> <xsl:i18n>
>     <xsl:value-of select="SUBMIT_BUTTON"/>
>  <xsl:i18n>
> and by wrapping the <xsl:value-of> tag inside an i18n it
> would look up the approriate resource from the previous
> PI or something.  I apologize if the semantics of this
> suck but I'm pretty new to all this.

can't you just use includes, and/or inheritance, and/or
other methods of combining stylesheets? my idea is to
specify localized strings inside message catalogs which are
stylesheets full of <xsl:variable>, and combine those with
the 'templates' which are stylesheets full of

for me, the problem is selecting which combined stylesheet
to use. the selection is based on the requesting user agent,
virtual host serving the request, the locale of the request,
user preferences, and other criteria. we've thrown around
ideas on the list before but nothing real has come of it.

> Is this not the job of XSL?  I'm OK with what I'm doing
> but it just doesn't "feel" like the separation is
> completely there.

i think it is very much the job of xsl. application
programmers shouldn't be futzing with ui widgetry, and
interface designers shouldn't have to write code to extract
strings from resource bundles.

View raw message