You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <ug...@apache.org> on 2004/05/01 17:24:07 UTC
Re: Some CalendarGenerator code
Il giorno 30/apr/04, alle 04:53, roy huang ha scritto:
> Hi ugo:
> The attachment is a calendargenerator extend the original
> one,provide year,month,two week,week,work day,two days,day
> calendar.The basic code is from your original class.See if this helps.
Sorry but your source contains characters with an unknown encoding in
the comments and the original Javadoc comments are missing. I don't
have time at the moment to fix this. Also, it would be nice if you
could expand the original sample with the cases you added.
> Another suggestion,I saw you mail in
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108253763309517&w=2
> .My suggestion is why not write a CalendarTransformer?It read from
> generator about date,content by parameter configed by parameter and
> then generate its own sax pipeline just like CalendarGenerator?This
> Transformer will much easier to use.
Much easier to use compared to what? Sorry, but I don't see your point.
Can you provide an example?
Ugo
Re: Some CalendarGenerator code
Posted by roy huang <li...@hotmail.com>.
Hi ,Ugo:
I never thought the pipeline can do things this way .I will study 1) and find out would this solve my problem.
Thanks a lot.
Roy Huang
----- Original Message -----
From: "Ugo Cei" <ug...@apache.org>
To: <de...@cocoon.apache.org>
Sent: Sunday, May 09, 2004 3:03 PM
Subject: Re: Some CalendarGenerator code
> Il giorno 09/mag/04, alle 05:04, roy huang ha scritto:
>
> > 2.Use current generator user must extend it and using java .I believe
> > many cocoon users don't know java much but just now xml.Using
> > transformer user can just use xml to define data.
>
> OK, I'll try to say it again, please read carefully and try to reply.
>
> 1) With the current generator, NOTHING stops you from putting a
> transformer after it in the pipeline and add whatever data to any <day>
> element. If, for instance, you want to add some elements whose content
> is fetched from an SQL database, you can:
>
> - do an XSL-T transformation to insert SQL queries inside <day> elements
> - do an SQL transformation to execute those queries
>
> You don't need to write a single line of Java code to do that.
>
> 2) If we were to make the CalendarGenerator a transformer, will you
> please tell me what kind of input is this transformer meant to
> transform? Is asking for a simple example too much?
>
> Ugo
>
>
> --
> Ugo Cei - http://beblogging.com/
>
>
Re: Some CalendarGenerator code
Posted by Ugo Cei <ug...@apache.org>.
Il giorno 09/mag/04, alle 05:04, roy huang ha scritto:
> 2.Use current generator user must extend it and using java .I believe
> many cocoon users don't know java much but just now xml.Using
> transformer user can just use xml to define data.
OK, I'll try to say it again, please read carefully and try to reply.
1) With the current generator, NOTHING stops you from putting a
transformer after it in the pipeline and add whatever data to any <day>
element. If, for instance, you want to add some elements whose content
is fetched from an SQL database, you can:
- do an XSL-T transformation to insert SQL queries inside <day> elements
- do an SQL transformation to execute those queries
You don't need to write a single line of Java code to do that.
2) If we were to make the CalendarGenerator a transformer, will you
please tell me what kind of input is this transformer meant to
transform? Is asking for a simple example too much?
Ugo
--
Ugo Cei - http://beblogging.com/
Re: Some CalendarGenerator code
Posted by roy huang <li...@hotmail.com>.
1.I just extend the original class,so didn't think of about license
2.Use current generator user must extend it and using java .I believe many cocoon users don't know java much but just now xml.Using transformer user can just use xml to define data.
----- Original Message -----
From: "Ugo Cei" <ug...@apache.org>
To: <de...@cocoon.apache.org>
Sent: Saturday, May 08, 2004 9:58 PM
Subject: Re: Some CalendarGenerator code
> Il giorno 08/mag/04, alle 10:14, roy huang ha scritto:
>
> > After a long Labor Day holiday,I checked this message today.The
> > source
> > code contains Chinese characters so you may not recognize.I don't know
> > the
> > coding standard in cocoon,so this source code is sent to you for
> > reference.
> > What should I do is better now?
>
> Simple ASCII encoding is fine. I would appreciate if you at least kept
> the original javadoc comments and license statement.
>
> > The second point is generator is still not easy to show data in
> > <day><>
> > element,you must write java code to extend the original Calendar.
> > I think many users won't like this idea.My suggestion is why not
> > create a CalendarTransformer
> > to transform a predefine of configurable format xml stream to calendar
> > format,then users can using
> > xml file or SQLTransformer to get the information and set it in <day>
> > element.
> > WDYT?
>
> You can do the same with the existing generator. What would the input
> of your transformer be?
>
> Ugo
>
> --
> Ugo Cei - http://beblogging.com/
>
>
Re: Some CalendarGenerator code
Posted by Ugo Cei <ug...@apache.org>.
Il giorno 08/mag/04, alle 10:14, roy huang ha scritto:
> After a long Labor Day holiday,I checked this message today.The
> source
> code contains Chinese characters so you may not recognize.I don't know
> the
> coding standard in cocoon,so this source code is sent to you for
> reference.
> What should I do is better now?
Simple ASCII encoding is fine. I would appreciate if you at least kept
the original javadoc comments and license statement.
> The second point is generator is still not easy to show data in
> <day><>
> element,you must write java code to extend the original Calendar.
> I think many users won't like this idea.My suggestion is why not
> create a CalendarTransformer
> to transform a predefine of configurable format xml stream to calendar
> format,then users can using
> xml file or SQLTransformer to get the information and set it in <day>
> element.
> WDYT?
You can do the same with the existing generator. What would the input
of your transformer be?
Ugo
--
Ugo Cei - http://beblogging.com/
Re: Some CalendarGenerator code
Posted by roy huang <li...@hotmail.com>.
Hi,Ugo:
After a long Labor Day holiday,I checked this message today.The source
code contains Chinese characters so you may not recognize.I don't know the
coding standard in cocoon,so this source code is sent to you for reference.
What should I do is better now?
The second point is generator is still not easy to show data in <day><>
element,you must write java code to extend the original Calendar.
I think many users won't like this idea.My suggestion is why not create a CalendarTransformer
to transform a predefine of configurable format xml stream to calendar format,then users can using
xml file or SQLTransformer to get the information and set it in <day> element.
WDYT?
Roy Huang
----- Original Message -----
From: "Ugo Cei" <ug...@apache.org>
To: <de...@cocoon.apache.org>
Sent: Saturday, May 01, 2004 11:24 PM
Subject: Re: Some CalendarGenerator code
> Il giorno 30/apr/04, alle 04:53, roy huang ha scritto:
>
> > Hi ugo:
> > The attachment is a calendargenerator extend the original
> > one,provide year,month,two week,week,work day,two days,day
> > calendar.The basic code is from your original class.See if this helps.
>
> Sorry but your source contains characters with an unknown encoding in
> the comments and the original Javadoc comments are missing. I don't
> have time at the moment to fix this. Also, it would be nice if you
> could expand the original sample with the cases you added.
>
> > Another suggestion,I saw you mail in
> > http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108253763309517&w=2
> > .My suggestion is why not write a CalendarTransformer?It read from
> > generator about date,content by parameter configed by parameter and
> > then generate its own sax pipeline just like CalendarGenerator?This
> > Transformer will much easier to use.
>
> Much easier to use compared to what? Sorry, but I don't see your point.
> Can you provide an example?
>
> Ugo
>
>