Re: (dsssl) About define-language.

Subject: Re: (dsssl) About define-language.
From: Ian Castle <ian.castle@xxxxxxxxxxxxxxxxxxx>
Date: 07 Mar 2002 17:21:17 +0000
I was wondering if any one used the POSIX locale support...

A couple of observations:

- It isn't supported on BSD + Mac OS.

- It causes some problems on Win32 and the most recent build of 1.3.1
has it disabled as a result.

The locale implementation on Win32 doesn't respect the POSIX specified
environment variables. So the initial call to setlocale sets all aspects
of the locale to whatever locale is defined in your control panel
settings. This has the result that for most european locales the comma
"," becomes the "decimal point". This causes problems when parsing the
DSSSL stylesheets that use fixed/floating point numbers.

I played around with two solutions

1) Adding code for Win32 to check the POSIX style environment variables

2) Trying to control the behaviour with  (define language ....) But I
never managed to get this to work in the way that I wondered.

I opted for simply building the binaries without the POSIX Locale
support as this required no code changes.... I also decided that I
really didn't know enough about what the locale stuff was doing.. In
particular I didn't know answers to these sorts of questions: Is it
changing the locale that the DSSSL statements are parsed in? Is it
changing the locale of the stuff that DSSSL constructs operate on (e.g.
just literal strings)? Should numbers in the DSSSL statements be subject
to the locale? Should I be able to take an "English" locale stylesheet /
DSSSL program and be able to apply it to a non-English locale SGML file
(at the moment it seems that both the stylesheet and the SGML that it
operates on must be in the same locale)?

On Wed, 2002-03-06 at 14:34, Brandon Ibach wrote:
>    Fortunately, at the same time the string comparison functions were
> added to OpenJade, an extension function was also added which allows
> you to get a language object for any POSIX locale supported by the
> operating system.
>    The following is untested, so let me know if this doesn't work:
> (define language
>   (external-procedure "UNREGISTERED::OpenJade//Procedure::language"))
> (declare-default-language (language 'en 'us))
>    Put all that near the top of your stylesheet, and you should be
> able to use the comparison functions.

 DSSSList info and archive:

Current Thread