xsl-list
[Top] [All Lists]

RE: RE: [xsl] Calender support

2006-07-31 08:59:17
Your problem seems to lay with Saxon. Try posting the question to their mailing 
list: 
saxon-help(_at_)lists(_dot_)sourceforge(_dot_)net(_dot_)
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     tom tom <tomxsllist(_at_)hotmail(_dot_)com>
Sent:     Mon, 31 Jul 2006 16:49:06 +0100
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  RE: [xsl] Calender support

Both these produce the same output as does the example I provided. They are 
in arabic but it is still using the Christian calender - ie the current year 
in the islamic calender is not 2006.


From: cknell(_at_)onebox(_dot_)com
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Calender support
Date: Mon, 31 Jul 2006 11:33:28 -0400

When I look at the signature of the format-date() function I see this 
format:

format-date(date, picture, language, calendar, country)

with the latter three arguments being optional.

Looking at your use:
format-date(current-date(), '[Y&#1633;] [Mn] [D&#1633;]', 'Islamic', 'SH', 
'SH'),

The "date" part is OK.

I can't tell anything about the picture parts. It seems I don't have the 
correct code page to display the Arabic script. Do you have the correct 
code page on your computer and is the "encoding" attribute set correctly on 
the xsl:output element?

According to my (very little) research, what's needed in the "language" 
argument is a two-letter ISO code for the language. "Islamic" is definitely 
not that. The "SH" in the calendar and country positions gives me a clue 
that you may want Farsi as the language, in which case the language code 
should be "fa". If you want the Arabic alphabet, set the language code to 
"ar"

Try this:

format-date(current-date(), '[Y&#1633;] [Mn] [D&#1633;]', 'fa', 'SH', 'SH')
or
format-date(current-date(), '[Y&#1633;] [Mn] [D&#1633;]', 'ar', 'SH', 
'SH'),

Please remember that I'm not offering any advice regarding the "picture", 
as I don't have the code page on my system that would display the 
characters correctly.

--
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     tom tom <tomxsllist(_at_)hotmail(_dot_)com>
Sent:     Mon, 31 Jul 2006 14:25:04 +0100
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  [xsl] Calender support

I wish to convert a date from the Christian calender to the Hijri (Islamic)
calender. I am using XSLT 2.0 with Saxon 8. I have tried various
permutations and differences of the following:

<xsl:sequence select="format-date(current-date(), '[Y&#1633;] [Mn]
[D&#1633;]', 'Islamic', 'SH', 'SH')"/>

This prints the year and day in arabic but remains in the Christian
calender. The character &#1633; doesn't seem to work with [Mn] either. Can
anyone advise what I should be doing here? Does Saxon support the arabic
calender and does it support other calenders?

Thanks

Tom

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>