cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Éric BURGHARD (JIRA) <j...@apache.org>
Subject [jira] Commented: (COCOON-1192) calendar (generator) is malfunctioning
Date Sat, 29 Oct 2005 23:40:55 GMT
    [ http://issues.apache.org/jira/browse/COCOON-1192?page=comments#action_12356300 ] 

Éric BURGHARD commented on COCOON-1192:
---------------------------------------

I forgot to mention that you need to add a i18n tranformer with the same locale  than the
one used in the generator, and remove the dateFormat parameter from the generator for the
provided stylesheet to work.
<map:generate type="calendar" label="content">
    <!-- Uncomment and set a value for the desired month and year
    <map:parameter name="month" value="6"/>
    <map:parameter name="year" value="1998"/>
     -->
    <map:parameter name="lang" value="fr"/>
    <map:parameter name="country" value="FR"/>
</map:generate>
<map:transform src="context://stylesheets/system/calendar2html.xslt"/>
<map:transform type="i18n">
   <map:parameter name="locale" value="fr"/>
</map:transform>
<map:serialize/>

I think that the locale and the date format should be included in the root element for handling
to drive the view, without boring to pass the same parameters between generator and transformer.
I think this is a stylesheet (view) issue because the output of generator is (independant
of any view) and correct whatever the locale, whereas the html view failed to handle theses
datas correctly.

for french for example the output of the generator is
<calendar:week number="0">
    <calendar:day number="1" date="samedi"/>
    <calendar:day number="2" date="dimanche"/>
</calendar:week>

for english it's
<calendar:week number="1">
    <calendar:day number="1" date="Saturday"/>
</calendar:week>

It looks strange that the first week of the same month have not the same number of day for
differents locale value, but it's perfectly correct.

> calendar (generator) is malfunctioning
> --------------------------------------
>
>          Key: COCOON-1192
>          URL: http://issues.apache.org/jira/browse/COCOON-1192
>      Project: Cocoon
>         Type: Bug
>   Components: * Cocoon Core
>     Versions: 2.1.5
>  Environment: Operating System: Windows XP
> Platform: PC
>     Reporter: Ian F. Hood
>     Assignee: Ugo Cei
>  Attachments: calendar2html.xslt
>
> a quick peek at /samples/cal will make it clear:
> the top left day 'num' is right, but the full (date) is off by one day.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message