On 31/01/2012 20:10, Marzilli Dave wrote:
I am trying to resolve an issue around language specific “format-date()” behavior, one that seems environment specific. We are seeing different results in one environment than another where we are expecting the same. Both environs use saxon ee 188.8.131.52j (same jar files), same xsl and input xml, both pipe to Apache FOP. Neither environment uses a configuration file. In the XSL writing environment we are running from the command line (through XML Spy), where the output works as expected. In the test environment Saxon is invoked from Java code, where we receive the default language substitution ([Language: en]23 July 2010) noted in other posts here . Is there an environment or machine dependency on format-date()?
Sorry for the delay in responding.
Yes, there is an environment dependency. If no language is specified in the language argument of format-date(), the default is assumed to be the language of the default Java locale, which is generally taken from the user profile defined in the operating system.
The [Language: en] prefix in the output means that the requested language is one which is not recognized/supported in the Saxon configuration, so Saxon is outputting in English instead of the requested language.
I think your "184.108.40.206" is probably a typo for "220.127.116.11". What puzzles me is that at some time, well before 9.3, I made a change such that the [Language: en] prefix is added only if an unsupported language is requested explicitly, rather than if it is requested by virtue of defaults in the user profile.
So three follow-up questions come to mind:
(a) can you confirm which version you are using?
(b) what arguments are you supplying in the call to format-date()?
(c) what is the default language in the current user's profile?
Hi, Thanks for getting back to me.
Answering your questions:
(a) The version is 18.104.22.168 in both environments.
(b) Replacing for substituted variables, <xsl:value-of select="format-date($dateToFormat, ‘[D1] [MNn] [Y1]’, ‘de’, (), ())"/>
(c) In both XSL development (where it works) and server (doesn’t work) environments the default language is English
Note that the language is represented as hardcoded in (b) above but in fact is a variable which resolves to one of four values (en/fr/de/es).
CONFIDENTIALITY: This communication, including attachments, is for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, or distribution or the taking of any action in reliance upon this information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete this communication and destroy all copies.
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ firstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/saxon-help