Re: Samples styling

2007-05-18 Thread hepabolu

Felix Knecht said the following on 17/5/07 17:46:


IMO the documentation in general for the servlet services should be done 
somewhere else than in the sitemap itself. So I
think it should be enough to have a note in the sitemap when servlet services 
are used. Is this ok?


Sure, you DO need proper documentation in Daisy on this topic, but 
adding some extra documentation to the sitemap to clarify samples is 
helpful too.


Thanks.

Bye, Helma


Re: Samples styling

2007-05-17 Thread Felix Knecht
hepabolu schrieb:
 
 Samples are as much a source of documentation and tutorials so you
 should provide either way. I have plenty of cases where I've searched
 high and low for finding info on how to do something, only to find it in
 a casual reference in a post on the list.
 
 What you should do is provide the 'common' way of doing it in a general
 sample and the 'specialist' way in a sample that is created exactly for
 that purpose. And please do add plenty of comments to the sitemap
 pipelines to explain what's going on.

I add a comment where servlet services are used in the sitemap. To make the big 
efforts done on the servlet service fw
more popular I think this should become the common way (aha, I changed mind ;-) 
).

IMO the documentation in general for the servlet services should be done 
somewhere else than in the sitemap itself. So I
think it should be enough to have a note in the sitemap when servlet services 
are used. Is this ok?

Felix

 
 Thanks for all the effort.
 
 Bye, Helma
 



Re: Samples styling

2007-05-16 Thread Grzegorz Kossakowski

Felix Knecht pisze:

Grzegorz Kossakowski schrieb:

Hello,

I see that some work on utilizing servlet-service-fw functionality to
style samples has been started. I wonder if constructing servlet
service and calling it wouldn't be better than just referencing xsl
stylesheet?


I thought thats just what I'm doing when converting the samples - add
the block bean definition and use the servlet-service-fw to use the xsl
stylesheets from the samples-style-default block?


Yes, but I was wondering if we couldn't put following pipeline in 
samples-style-default's sitemap:
map:match pattern=service/simple-samples2html
  map:generate src=servlet-consumer:/
  map:transform src=stylesheets/system/xml2html.xslt/
  map:transform type=servletLinkRewriter /
  map:serialize type=html/
/map:match

and for example, in imageop's sitemap instead of:
map:match pattern=
  map:generate src=samples.xml/
  map:transform 
src=servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl /
  map:transform type=servletLinkRewriter /
  map:serialize/
/map:match

we could have:
map:match pattern=
  map:generate src=samples.xml/
  map:serialize type=servletService
map:parameter name=service 
value=servlet:style-default:/service/simple-samples2html/
  /map:serialize
/map:match

This way, we could use _service_ to style samples and the same way get more flexibility because we could change the service in one place in 
any way we like (e.g. add more transformers if needed).

I wonder if we really need this, and if it's a Flexibility Syndrome.

WDYT?



Shall I stop converting?


No, no! The way you currently do this is correct, also.

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/


Re: Samples styling

2007-05-16 Thread Felix Knecht
Grzegorz Kossakowski schrieb:
 Yes, but I was wondering if we couldn't put following pipeline in
 samples-style-default's sitemap:
 map:match pattern=service/simple-samples2html
   map:generate src=servlet-consumer:/
   map:transform src=stylesheets/system/xml2html.xslt/
   map:transform type=servletLinkRewriter /
   map:serialize type=html/
 /map:match

 and for example, in imageop's sitemap instead of:
 map:match pattern=
   map:generate src=samples.xml/
   map:transform
 src=servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl
 /
   map:transform type=servletLinkRewriter /
   map:serialize/
 /map:match

 we could have:
 map:match pattern=
   map:generate src=samples.xml/
   map:serialize type=servletService
 map:parameter name=service
 value=servlet:style-default:/service/simple-samples2html/
   /map:serialize
 /map:match


I haven't knew this construct of serializer and parameter.

 This way, we could use _service_ to style samples and the same way get
 more flexibility because we could change the service in one place in
 any way we like (e.g. add more transformers if needed).
 I wonder if we really need this, and if it's a Flexibility Syndrome.

It's true, we would have more flexibility, but is it still
understandable for common users? The more flexibility we get the more
complex a part of the pipeline will be to read. Do we really want to
'misuse' the serializer as a kind of merged thing of transformer and
serializer in one?

Even if we'd get more flexibility I prefer the current way.


 WDYT?



Re: Samples styling

2007-05-16 Thread Grzegorz Kossakowski

Felix Knecht pisze:

Grzegorz Kossakowski schrieb:

Yes, but I was wondering if we couldn't put following pipeline in
samples-style-default's sitemap:
map:match pattern=service/simple-samples2html
  map:generate src=servlet-consumer:/
  map:transform src=stylesheets/system/xml2html.xslt/
  map:transform type=servletLinkRewriter /
  map:serialize type=html/
/map:match

and for example, in imageop's sitemap instead of:
map:match pattern=
  map:generate src=samples.xml/
  map:transform
src=servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl
/
  map:transform type=servletLinkRewriter /
  map:serialize/
/map:match

we could have:
map:match pattern=
  map:generate src=samples.xml/
  map:serialize type=servletService
map:parameter name=service
value=servlet:style-default:/service/simple-samples2html/
  /map:serialize
/map:match



I haven't knew this construct of serializer and parameter.


In COCOON-2046 issue[1] you will find references to the threads discussing 
whole concept. Here you will find basic samples:
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/src/main/resources/COB-INF/test1/sitemap.xmap


This way, we could use _service_ to style samples and the same way get
more flexibility because we could change the service in one place in
any way we like (e.g. add more transformers if needed).
I wonder if we really need this, and if it's a Flexibility Syndrome.


It's true, we would have more flexibility, but is it still
understandable for common users? The more flexibility we get the more
complex a part of the pipeline will be to read. Do we really want to
'misuse' the serializer as a kind of merged thing of transformer and
serializer in one?


Whole concept of postable source and servlet service is exactly about this: I call the service that styles samples and returns html but I 
don't care how it's done.

I don't think that this is much harder to understand than what you do now.


Even if we'd get more flexibility I prefer the current way.


As I previously said, I'm not sure if we need this either, so I won't push you 
to use services.

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/


Re: Samples styling

2007-05-16 Thread Felix Knecht
Grzegorz Kossakowski schrieb:
 As I previously said, I'm not sure if we need this either, so I won't
 push you to use services.

I'm not feeling pushed ;-) But I think we should show in the samples
what's the common way of doing it - otherwise only some specialists will
use this (powerfull) feature and a common developer won't get notice of
it. Therefore I'm going to use it in the next samples I move to
servler-service.



Re: Samples styling

2007-05-16 Thread Reinhard Poetz

Felix Knecht wrote:

Grzegorz Kossakowski schrieb:

As I previously said, I'm not sure if we need this either, so I won't
push you to use services.


I'm not feeling pushed ;-) But I think we should show in the samples
what's the common way of doing it - otherwise only some specialists will
use this (powerfull) feature and a common developer won't get notice of
it. Therefore I'm going to use it in the next samples I move to
servler-service.


+1

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc



Re: Samples styling

2007-05-16 Thread hepabolu

Felix Knecht said the following on 16/5/07 15:01:

Grzegorz Kossakowski schrieb:

As I previously said, I'm not sure if we need this either, so I won't
push you to use services.


I'm not feeling pushed ;-) But I think we should show in the samples
what's the common way of doing it - otherwise only some specialists will
use this (powerfull) feature and a common developer won't get notice of
it. Therefore I'm going to use it in the next samples I move to
servler-service.


Samples are as much a source of documentation and tutorials so you 
should provide either way. I have plenty of cases where I've searched 
high and low for finding info on how to do something, only to find it in 
a casual reference in a post on the list.


What you should do is provide the 'common' way of doing it in a general 
sample and the 'specialist' way in a sample that is created exactly for 
that purpose. And please do add plenty of comments to the sitemap 
pipelines to explain what's going on.


Thanks for all the effort.

Bye, Helma



RE: Samples styling

2007-05-16 Thread marcus
Can anyone help 

I have tried unsubscribing from this list about 20 times and I still
receiving emails 
I have also sent an emails to [EMAIL PROTECTED] but nothing
seems to work 

Regards 


Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED]
mailing list.

To confirm that you would like

   [EMAIL PROTECTED]

removed from the users mailing list, please send a short reply to this
address:

 
[EMAIL PROTECTED]
ache.org

Marcus Clemens
Senior Consultant
Mercator IT Solutions
Ph: 01892 78 5580
Fx. 01892 783119
email: [EMAIL PROTECTED]
web: www.mercatorit.com
 

-Original Message-
From: hepabolu [mailto:[EMAIL PROTECTED] 
Sent: 16 May 2007 14:26
To: dev@cocoon.apache.org
Subject: Re: Samples styling

Felix Knecht said the following on 16/5/07 15:01:
 Grzegorz Kossakowski schrieb:
 As I previously said, I'm not sure if we need this either, so I won't
 push you to use services.
 
 I'm not feeling pushed ;-) But I think we should show in the samples
 what's the common way of doing it - otherwise only some specialists
will
 use this (powerfull) feature and a common developer won't get notice
of
 it. Therefore I'm going to use it in the next samples I move to
 servler-service.

Samples are as much a source of documentation and tutorials so you 
should provide either way. I have plenty of cases where I've searched 
high and low for finding info on how to do something, only to find it in

a casual reference in a post on the list.

What you should do is provide the 'common' way of doing it in a general 
sample and the 'specialist' way in a sample that is created exactly for 
that purpose. And please do add plenty of comments to the sitemap 
pipelines to explain what's going on.

Thanks for all the effort.

Bye, Helma



Re: Samples styling

2007-05-16 Thread Felix Knecht
Grzegorz Kossakowski schrieb:

Just to be sure, it's
service-consumer and not servlet-consumer (throws a NPE)?

  map:generate src=service-consumer:/

 map:match pattern=service/simple-samples2html
   map:generate src=servlet-consumer:/
   map:transform src=stylesheets/system/xml2html.xslt/
   map:transform type=servletLinkRewriter /
   map:serialize type=html/
 /map:match

 and for example, in imageop's sitemap instead of:
 map:match pattern=
   map:generate src=samples.xml/
   map:transform
 src=servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl

 /
   map:transform type=servletLinkRewriter /
   map:serialize/
 /map:match

 we could have:
 map:match pattern=
   map:generate src=samples.xml/
   map:serialize type=servletService
 map:parameter name=service
 value=servlet:style-default:/service/simple-samples2html/
   /map:serialize
 /map:match




Re: Samples styling

2007-05-16 Thread Grzegorz Kossakowski

Felix Knecht pisze:

Grzegorz Kossakowski schrieb:

Just to be sure, it's
service-consumer and not servlet-consumer (throws a NPE)?

  map:generate src=service-consumer:/


You are right, it's my mistake, for sample of service pipeline see:
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/src/main/resources/COB-INF/test2/sitemap.xmap

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/


Samples styling

2007-05-15 Thread Grzegorz Kossakowski

Hello,

I see that some work on utilizing servlet-service-fw functionality to style samples has been started. I wonder if constructing servlet 
service and calling it wouldn't be better than just referencing xsl stylesheet?


I'm not sure if we really need that flexibility, just I would like to hear your 
opinions.

Thanks for your effort of converting samples.

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/


Re: Samples styling

2007-05-15 Thread Giacomo Pati
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Grzegorz Kossakowski wrote:
 Hello,
 
 I see that some work on utilizing servlet-service-fw functionality to
 style samples has been started. I wonder if constructing servlet service
 and calling it wouldn't be better than just referencing xsl stylesheet?

Can you elaborate a bit what you mean?

 I'm not sure if we really need that flexibility, just I would like to
 hear your opinions.
 
 Thanks for your effort of converting samples.
 

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.3 (GNU/Linux)

iD8DBQFGSgfHLNdJvZjjVZARApTBAJ4txE75mo+DO7Iwjd/gEQRu7xRDCACgx1XG
AvxmcrduFKXxMP+RuIvRHjk=
=6z8a
-END PGP SIGNATURE-


Re: Samples styling

2007-05-15 Thread Felix Knecht
Grzegorz Kossakowski schrieb:
 Hello,

 I see that some work on utilizing servlet-service-fw functionality to
 style samples has been started. I wonder if constructing servlet
 service and calling it wouldn't be better than just referencing xsl
 stylesheet?

I thought thats just what I'm doing when converting the samples - add
the block bean definition and use the servlet-service-fw to use the xsl
stylesheets from the samples-style-default block?

Shall I stop converting?

 I'm not sure if we really need that flexibility, just I would like to
 hear your opinions.

I think we should use this flexibility in the samples because they are
samples and show the way it can be done.


 Thanks for your effort of converting samples.