Re: (dsssl) About define-language.

Subject: Re: (dsssl) About define-language.
From: "Paul Tyson" <paul@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Mar 2002 21:48:53 -0800
The last time I had this problem, I just defined a language in my stylesheet, as the spec says (8.5.8.2.1):

(define-language en
    (collate
        (order
            (forward)
            #\space #\A #\a #\B #\b . . .))
    (toupper (#\a #\A) (#\a #\B) . . .)
    (tolower (#\A #\a) (#\B #\b) . . .))

Then include:
(declare-default-language en)

Or whatever language you want to use.

If you don't want to use

This would give you dictionary ordering; if you want something different just put the characters in a different order in the (order . . .) specification.  I don't understand all the collation-specification details yet, but my example seems to work.

I wasn't able to make Brandon's suggestion work.  I tested it using the latest Windows binaries of openjade, and my latest build on a Linux platform.  It always complained because the (language) procedure returned #f, which is invalid for a default-language-declaration.

On Linux, openjade aborted when trying to do string-ci<? or string-ci<=?, but it did all the other string comparisons.  On Windows, it did all the string comparisons, including string-ci<? and string-ci<=?.  On both platforms, the string-ci=?, string-ci>?, and string-ci>=? worked.

I think there are at least a couple of bugs in openjade relating to this, but we can discuss them on the openjade-devel list.

--Paul

----- Original Message ----- 
From: "Raul Chirea" <raul_chirea@xxxxxxxxx>
To: <dssslist@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, March 06, 2002 6:59 PM
Subject: Re: (dsssl) About define-language.


> 
> Many thanks to everybody who answered !
> 
> But only Brandon was near.
> 
> Brandon Ibach wrote:
> 
> >    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.
> >
> > -Brandon :)
> 
> I did this and for "string=?", "string>?",  etc. (case insensitive variants)
> worked very well but for "string-ci=?", "string-ci>?", etc. (case insensitive
> varians) openjade dumped core.
> 
> My setup is: Linux 2.4.2, glibc-2.2.2, openjade-1.3
> 
> Although this is a step forward, I steel need to use case insensitive
> comparison functions, so what shoud I do ? Does anybody have an ideea ?
> 
> Raul.
> 
> 
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread