Re: accessing a spring bean methods from sitemap

2012-11-11 Thread Javier Puerto
2012/11/10 Thorsten Scherler scher...@gmail.com

 Hi Mansour,

 Javier is on a flight to Zürich ATM but I know what code he is talking
 about.


Yeah, for an input module. If you want to access from a flowscript as
Francesco suggested you can use this:

var yourComponentInstance = cocoon.getComponent(BEAN-ID);



 I read between the lines that you are on 2.2. If you happen to be on 3
 then the whole thing is much straight forward.

 I am not sure whether the following is the best approach for your problem
 since it depends on where you want to come the hashMap from. Next outlines
 how to access one from spring.

 in your spring file you have to add the ns declaration and something like
 the following:
 !--ns--
 xmlns:util=http://www.**springframework.org/schema/**utilhttp://www.springframework.org/schema/util
 
   xsi:schemaLocation=...
 http://www.springframework.**org/schema/utilhttp://www.springframework.org/schema/util
 http://www.springframework.**org/schema/util/spring-util-2.**5.xsdhttp://www.springframework.org/schema/util/spring-util-2.5.xsd
 

 bean id=collection
 name=org.apache.cocoon.**components.modules.input.**
 InputModule/collection
 class=es.sadesi.module.input.**Collection
 property name=map ref=sections/
 /bean

 util:map id=sections map-class=java.util.HashMap
   entry key=0 value=0. Disposiciones estatales /
   entry key=1 value=1. Disposiciones generales /
   entry key=2 value=2. Autoridades y personal /
   entry key=2.1 value=2.1. Nombramientos, situaciones e incidencias /
   entry key=2.2 value=2.2. Oposiciones, concursos y otras
 convocatorias /
   entry key=3 value=3. Otras disposiciones /
   entry key=4 value=4. Administración de justicia /
   entry key=5 value=5. Anuncios /
   entry key=5.1 value=5.1. Licitaciones públicas y adjudicaciones /
   entry key=5.2 value=5.2. Otros anuncios oficiales /
 /util:map

 Then create a es.sadesi.module.input.**Collection class with something
 like
 package es.sadesi.module.input;

 import java.util.Map;

 import org.apache.avalon.framework.**configuration.Configuration;
 import org.apache.avalon.framework.**configuration.**
 ConfigurationException;
 import org.apache.cocoon.components.**modules.input.**AbstractInputModule;
 import org.apache.cocoon.components.**modules.input.InputModule;
 import org.springframework.beans.**factory.annotation.Required;

 public class Collection extends AbstractInputModule {
 private InputModule map;

 public Object getAttribute(String name, Configuration modeConf,
 Map objectModel) throws ConfigurationException {

 final Object result =  map.getAttribute(name, null, null);
 return result;

 }

 public Object getAttribute(String name) throws ConfigurationException {
   return getAttribute(name, null, null);
 }

 @Required
 public void setMap(InputModule map) {
 this.map = map;
 }
 }

 then use it in your sitemap with
 {collection:2.2} which should return 2.2. Oposiciones, concursos y otras
 convocatorias

 That should work in 2.2 (I have no time to test it so it may miss
 something in the extraction of the customer use case but it should get you
 started).

 HTH

 salu2


 On 11/10/2012 08:07 PM, Mansour Al Akeel wrote:

 Javier,
 thank you.
 The module I am going to implement is to be used by one block only,
 and would love to be able to declare it in the sitemap.xmap.
 I haven't implemented input modules before, but reading this:

 http://cocoon.apache.org/2.1/**userdocs/concepts/modules.htmlhttp://cocoon.apache.org/2.1/userdocs/concepts/modules.html


 Step 1: Making a new module known to Apache Cocoon

 Like other core components of Apache Cocoon, modules are declared in
 cocoon.xconf. There are already too many to list here.

 input-modules
component-instance name=request
class=org.apache.cocoon.**components.modules.input.**
 RequestParameterModule/
 .
 

 since I am developing with maven and jetty, and doing it in on block,
 I like to declare this new input module in the sitemap.xmap or in the
 same block (jar).

 Is there a way to do this ??




 On Sat, Nov 10, 2012 at 1:09 PM, Javier Puerto jpue...@gmail.com wrote:

 I did something similar for a client. We did it with a custom input
 module
 so you can define a protocol on when the input is the key an the output
 the
 value.

 Also I can't access to my laptop now but I have an example about
 accessing
 to spring beans from flow script, probably the input module it's enough.

 Salu2

 El 10/11/2012 18:41, Francesco Chicchiriccò ilgro...@apache.org
 escribió:

  On 10/11/2012 18:38, Mansour Al Akeel wrote:

 I need to link documents through some identification. For example,
 assuming that I have:

 articles/my-first-article.xml
 articles/second-one.xml
 articles/hello-world-article.**xml

 books/book1.xml  which has  references to  artice-1 and article-3
 identified by an id of the form: A001

 I need to create a hashtable linking both so that I pass query 

Re: Unable to transform to docbook

2012-11-11 Thread Mansour Al Akeel
After googling for sometime, I found this related issue:

https://lists.oasis-open.org/archives/docbook-apps/201006/msg00162.html

The suggested solution was to disable compiling xslt or use saxon:


Well, XSLTC is known to have problems with really complex
transformations like DocBook XSL stylesheets. If you are in Java
environment it is recommended to use Saxon, you can also use Xalan
(normal version, not compiled).


AFAIK, C3.0 doesn't have saxon as an option, so I will have to disable
xslt compilation.
Is there a way to do so ??





On Sun, Nov 11, 2012 at 1:28 AM, Mansour Al Akeel
mansour.alak...@gmail.com wrote:
 Robby, here's the code I am using for my test case. Nothing fancy,
 just to be able to debug loading the xslt:


 @Test
 public void docbookTest() throws Exception {
 Cache cache = new SimpleCache();

 CachingPipelineSAXPipelineComponent pipeline = new
 CachingPipelineSAXPipelineComponent();
 pipeline.setCache(cache);

 pipeline.addComponent(new XMLGenerator(getClass().getResource(
 /article.xml)));

 URL xsltURL = new
 URL(file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/docbook.xsl);

 XSLTTransformer xslt = new XSLTTransformer(xsltURL);

 pipeline.addComponent(xslt);

 pipeline.addComponent(XMLSerializer.createXMLSerializer());

 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 pipeline.setup(baos);
 pipeline.execute();

 }


 here's the error I am getting:


   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 939: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1063: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1193: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1193: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1294: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1332: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 283: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 283: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 353: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 353: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/annotations.xsl:
 line 117: Attribute 'onClick' outside of element.
 ERROR:  'Cannot find external method
 'org.apache.xalan.lib.NodeInfo.systemId' (must be public).'
 FATAL ERROR:  'Could not compile stylesheet'
 javax.xml.transform.TransformerConfigurationException: Could not
 compile stylesheet
 at 
 org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
 at 
 org.apache.cocoon.sax.component.XSLTTransformer.loadXSLT(XSLTTransformer.java:164)
 at 
 org.apache.cocoon.sax.component.XSLTTransformer.init(XSLTTransformer.java:112)
 at 
 org.apache.cocoon.sax.component.XSLTTransformer.init(XSLTTransformer.java:98)
 at 
 org.apache.cocoon.sax.component.XSLTTransformerTest.docbookTest(XSLTTransformerTest.java:86)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


 I downgraded to xalan-2.7.0 in the parent/pom.xml to give it a try,
 but now I am getting this error:


 06:18:30.599 [main] DEBUG o.a.cocoon.pipeline.AbstractPipeline -
 Adding component XMLGenerator(hashCode=1538386262
 internalGenerator=URLGenerator(hashCode=782702191
 source=file:/home/mansour/workspace/sources/cocoon/cocoon-sax/target/test-classes/article.xml))
 to pipeline [CachingPipeline(hashCode=341284117 components=[])].
 06:18:31.597 [main] DEBUG o.a.c.sax.component.XSLTTransformer -
 

Re: Unable to transform to docbook

2012-11-11 Thread Mansour Al Akeel
Ok Finally issue resolved.
It looks like I am able to use docbook. Here's the steps to do so.

There's a file 
cocoon_source/cocoon/cocoon-sax/src/test/resources/META-INF/services/javax.xml.transform.TransformerFactory

This file contains the value: org.apache.xalan.xsltc.trax.TransformerFactoryImpl

If you need to use the default xalan factory, then you need to change it to.

org.apache.xalan.processor.TransformerFactoryImpl


Now your unit tests should create Transformer Factory using the new
value org.apache.xalan.processor.TransformerFactoryImpl

If you need to do this in your block, then copy this file to
META-INF/services in your block.

This is a good an easy way to switch factories. I hope it helps
someone else stuck with complex XSLTs like docbook-xsl.

Thank you all.




On Sun, Nov 11, 2012 at 10:43 AM, Mansour Al Akeel
mansour.alak...@gmail.com wrote:
 After googling for sometime, I found this related issue:

 https://lists.oasis-open.org/archives/docbook-apps/201006/msg00162.html

 The suggested solution was to disable compiling xslt or use saxon:

 
 Well, XSLTC is known to have problems with really complex
 transformations like DocBook XSL stylesheets. If you are in Java
 environment it is recommended to use Saxon, you can also use Xalan
 (normal version, not compiled).
 

 AFAIK, C3.0 doesn't have saxon as an option, so I will have to disable
 xslt compilation.
 Is there a way to do so ??





 On Sun, Nov 11, 2012 at 1:28 AM, Mansour Al Akeel
 mansour.alak...@gmail.com wrote:
 Robby, here's the code I am using for my test case. Nothing fancy,
 just to be able to debug loading the xslt:


 @Test
 public void docbookTest() throws Exception {
 Cache cache = new SimpleCache();

 CachingPipelineSAXPipelineComponent pipeline = new
 CachingPipelineSAXPipelineComponent();
 pipeline.setCache(cache);

 pipeline.addComponent(new 
 XMLGenerator(getClass().getResource(
 /article.xml)));

 URL xsltURL = new
 URL(file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/docbook.xsl);

 XSLTTransformer xslt = new XSLTTransformer(xsltURL);

 pipeline.addComponent(xslt);

 pipeline.addComponent(XMLSerializer.createXMLSerializer());

 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 pipeline.setup(baos);
 pipeline.execute();

 }


 here's the error I am getting:


   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 939: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1063: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1193: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1193: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1294: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/inline.xsl:
 line 1332: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 283: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 283: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 353: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/glossary.xsl:
 line 353: Attribute 'href' outside of element.
   
 file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resources/docbook-xsl/html/annotations.xsl:
 line 117: Attribute 'onClick' outside of element.
 ERROR:  'Cannot find external method
 'org.apache.xalan.lib.NodeInfo.systemId' (must be public).'
 FATAL ERROR:  'Could not compile stylesheet'
 javax.xml.transform.TransformerConfigurationException: Could not
 compile stylesheet
 at 
 org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
 at 
 org.apache.cocoon.sax.component.XSLTTransformer.loadXSLT(XSLTTransformer.java:164)
 at 
 org.apache.cocoon.sax.component.XSLTTransformer.init(XSLTTransformer.java:112)
 at 
 

Re: Is cocoon dead ?

2012-11-11 Thread Michael Müller

Francesco,

I observe this list for years now (since I started using Cocon 2.1). And 
I recongnized some activities, especially from you. But since a couple 
of years I'm using a) a different technology (JSF) for my web pages and 
b) I'm waiting for Cocoon 3.0 to become ready. Even there are some 
acitivies, it seems to be a never ending story.


I guess it would be helpfull to schedule some dates for beta and 
release. If it is so much to do right now, maybe this version might be 
feature-reduced and some of the planned features will be postponed to a 
version 3.1? Otherwise I'm afraid this project is dead - even though 
there are some activities.


If your horse is dead, don't try to ride it anymore. Change the horse. 
(similar to Dakota saying)


Herzliche Grüße - Best Regards,
Michael Müller

Am 10.11.2012 14:00, schrieb Francesco Chicchiriccò:

Hi all,
I think e-mails like the one below are not helpful at all.

First of all, even though most of critical aspects of our current
situation are reported, some things are barely wrong:


down the same page you find the next most recent news is a year and a
half old

Open your favorite browser at http://cocoon.apache.org/ and read that
latest two news are dated July 2nd and March 3rd 2012


When people ask about C2.x (and the latest released version is 2.2) nobody 
wants to talk about it (except others desperate for information about some 
aspect of C2);

Just browse http://cocoon.markmail.org and judge by yourself whether
this is true or not.


There are no books on anything later than 2.1, which is about a decade old.

Just point again your favorite browser to
http://www.apache.org/dist/cocoon/ and you will see that Cocoon 2.1.11
was released on Jan 14th 2008.


Perhaps 80% of the official documentation is either TBW or skeletal, and the 
only people who know the inside of Cocoon well enough to complete it keep 
asking others to do that.

This is absolutely false for C2.X and only partially true for C3.

Beware, I am not stating that the Cocoon status is healthy, new releases
with bugfixes and new features are regularly made available and
documentation is accurate and complete.
I am only trying to look at the Cocoon project for what it is *today*: a
project with:
  * very few active committers
  * almost no occasional contributors
  * still a lot of interested people: most because they are running an
ancient Cocoon version, few because they've heard of Cocoon only recently

In my opinion, a dead project is a project in which no one is
interested, and Cocoon is not (yet?) that far.

Remembering that Cocoon - like as any other project at ASF - is
exclusively made up by volunteer contribution, I'd rather start a
[DISCUSS] thread to see what needs to be done and who is available to
help instead of such acid and unproductive e-mails.

WDYT?

Regards.

On 08/11/2012 15:10, Mark H. Wood wrote:

I'm not surprised at all.  Looking 3cm. down the same page you find
the next most recent news is a year and a half old.  When people ask
about C2.x (and the latest released version is 2.2) nobody wants to
talk about it (except others desperate for information about some
aspect of C2); one is told to use C3.  C3 has been alpha for perhaps
two years -- there is as yet no beta, let alone a release.  There are
no books on anything later than 2.1, which is about a decade old.
Perhaps 80% of the official documentation is either TBW or skeletal,
and the only people who know the inside of Cocoon well enough to
complete it keep asking others to do that.  Bugs with patches attached
languish for years.  Seemingly everyone using Cocoon is running a
unique local version with scads of patches that are passed around like
ancient lore.

Why would anyone think Cocoon is dead?



-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Is cocoon dead ?

2012-11-11 Thread Bart Remmerie
Just being critical  analytical: where die we observe the big drop in 
community activity ?  Switch to Maven  move from 2.1.11 to next version ? 
(just a guess) = What can we learn from this ?

Bart Remmerie

Op 11-nov.-2012 om 18:13 heeft Michael Müller 
michael.muel...@mueller-bruehl.de het volgende geschreven:

 Francesco,
 
 I observe this list for years now (since I started using Cocon 2.1). And I 
 recongnized some activities, especially from you. But since a couple of years 
 I'm using a) a different technology (JSF) for my web pages and b) I'm waiting 
 for Cocoon 3.0 to become ready. Even there are some acitivies, it seems to be 
 a never ending story.
 
 I guess it would be helpfull to schedule some dates for beta and release. If 
 it is so much to do right now, maybe this version might be feature-reduced 
 and some of the planned features will be postponed to a version 3.1? 
 Otherwise I'm afraid this project is dead - even though there are some 
 activities.
 
 If your horse is dead, don't try to ride it anymore. Change the horse. 
 (similar to Dakota saying)
 
 Herzliche Grüße - Best Regards,
 Michael Müller
 
 Am 10.11.2012 14:00, schrieb Francesco Chicchiriccò:
 Hi all,
 I think e-mails like the one below are not helpful at all.
 
 First of all, even though most of critical aspects of our current
 situation are reported, some things are barely wrong:
 
 down the same page you find the next most recent news is a year and a
 half old
 Open your favorite browser at http://cocoon.apache.org/ and read that
 latest two news are dated July 2nd and March 3rd 2012
 
 When people ask about C2.x (and the latest released version is 2.2) nobody 
 wants to talk about it (except others desperate for information about some 
 aspect of C2);
 Just browse http://cocoon.markmail.org and judge by yourself whether
 this is true or not.
 
 There are no books on anything later than 2.1, which is about a decade old.
 Just point again your favorite browser to
 http://www.apache.org/dist/cocoon/ and you will see that Cocoon 2.1.11
 was released on Jan 14th 2008.
 
 Perhaps 80% of the official documentation is either TBW or skeletal, and 
 the only people who know the inside of Cocoon well enough to complete it 
 keep asking others to do that.
 This is absolutely false for C2.X and only partially true for C3.
 
 Beware, I am not stating that the Cocoon status is healthy, new releases
 with bugfixes and new features are regularly made available and
 documentation is accurate and complete.
 I am only trying to look at the Cocoon project for what it is *today*: a
 project with:
  * very few active committers
  * almost no occasional contributors
  * still a lot of interested people: most because they are running an
 ancient Cocoon version, few because they've heard of Cocoon only recently
 
 In my opinion, a dead project is a project in which no one is
 interested, and Cocoon is not (yet?) that far.
 
 Remembering that Cocoon - like as any other project at ASF - is
 exclusively made up by volunteer contribution, I'd rather start a
 [DISCUSS] thread to see what needs to be done and who is available to
 help instead of such acid and unproductive e-mails.
 
 WDYT?
 
 Regards.
 
 On 08/11/2012 15:10, Mark H. Wood wrote:
 I'm not surprised at all.  Looking 3cm. down the same page you find
 the next most recent news is a year and a half old.  When people ask
 about C2.x (and the latest released version is 2.2) nobody wants to
 talk about it (except others desperate for information about some
 aspect of C2); one is told to use C3.  C3 has been alpha for perhaps
 two years -- there is as yet no beta, let alone a release.  There are
 no books on anything later than 2.1, which is about a decade old.
 Perhaps 80% of the official documentation is either TBW or skeletal,
 and the only people who know the inside of Cocoon well enough to
 complete it keep asking others to do that.  Bugs with patches attached
 languish for years.  Seemingly everyone using Cocoon is running a
 unique local version with scads of patches that are passed around like
 ancient lore.
 
 Why would anyone think Cocoon is dead?
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org
 

-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



RE: accessing a spring bean methods from sitemap

2012-11-11 Thread Robby Pelssers
Hi Mansour,

I do know how to access spring beans from C2.2 flowscript if that is of any 
help.

Some sample code:

function getTicket() {
var authenticator = cocoon.getComponent(name_of_spring_bean); //this is 
how you can get hold of a spring bean
}

But the main question is .. what are you trying to accomplish. It's not very 
clear to me yet.  What is the end goal you are trying to accomplish? Maybe you 
can do it purely in xslt.. just saying.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Saturday, November 10, 2012 6:38 PM
To: users
Subject: accessing a spring bean methods from sitemap

I need to link documents through some identification. For example, assuming 
that I have:

articles/my-first-article.xml
articles/second-one.xml
articles/hello-world-article.xml

books/book1.xml  which has  references to  artice-1 and article-3 identified by 
an id of the form: A001

I need to create a hashtable linking both so that I pass query param by ID or 
by name. The idea I have is to initialize spring bean that will extract the 
data from these files, and construct a MapString,String.

My question is how can I access this HashTable from sitemap ??

I am using C2.2.

-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



RE: Is cocoon dead ?

2012-11-11 Thread Robby Pelssers
Hi Bart,

I'd say we've learned people are reluctant to change.. even developers. But to 
be honest.. it was C2.2 forcing me to learn maven and I've been using it ever 
since for all new projects. Same holds true for Spring actually.  And where I 
could understand the drop back then, maven or Spring can hardly be considered 
to be valid reasons not to use newer versions of Cocoon.  

I think I can agree on two things:
C2.1 and C2.2 are pretty complete in what they have to offer.  They are also 
pretty well documented. But most advanced users have moved to C2.2 or C3 and 
can't offer good support for the older versions.  I guess it's the developers 
own responsibility to (NOT?) upgrade on a regular basis and dealing with 
corresponding consequences of his choice.

C3 is already used in production and in my opinion easier to use.  The biggest 
problem is it's still coined alpha.  We should really focus on getting c3 1.0 
out which will give users a more confident feeling API's won't break that 
easily.

Robby

-Original Message-
From: Bart Remmerie [mailto:remme...@gmail.com] 
Sent: Sunday, November 11, 2012 9:21 PM
To: users@cocoon.apache.org
Cc: users@cocoon.apache.org
Subject: Re: Is cocoon dead ?

Just being critical  analytical: where die we observe the big drop in 
community activity ?  Switch to Maven  move from 2.1.11 to next version ? 
(just a guess) = What can we learn from this ?

Bart Remmerie

Op 11-nov.-2012 om 18:13 heeft Michael Müller 
michael.muel...@mueller-bruehl.de het volgende geschreven:

 Francesco,
 
 I observe this list for years now (since I started using Cocon 2.1). And I 
 recongnized some activities, especially from you. But since a couple of years 
 I'm using a) a different technology (JSF) for my web pages and b) I'm waiting 
 for Cocoon 3.0 to become ready. Even there are some acitivies, it seems to be 
 a never ending story.
 
 I guess it would be helpfull to schedule some dates for beta and release. If 
 it is so much to do right now, maybe this version might be feature-reduced 
 and some of the planned features will be postponed to a version 3.1? 
 Otherwise I'm afraid this project is dead - even though there are some 
 activities.
 
 If your horse is dead, don't try to ride it anymore. Change the horse. 
 (similar to Dakota saying)
 
 Herzliche Grüße - Best Regards,
 Michael Müller
 
 Am 10.11.2012 14:00, schrieb Francesco Chicchiriccò:
 Hi all,
 I think e-mails like the one below are not helpful at all.
 
 First of all, even though most of critical aspects of our current 
 situation are reported, some things are barely wrong:
 
 down the same page you find the next most recent news is a year and 
 a half old
 Open your favorite browser at http://cocoon.apache.org/ and read that 
 latest two news are dated July 2nd and March 3rd 2012
 
 When people ask about C2.x (and the latest released version is 2.2) 
 nobody wants to talk about it (except others desperate for 
 information about some aspect of C2);
 Just browse http://cocoon.markmail.org and judge by yourself whether 
 this is true or not.
 
 There are no books on anything later than 2.1, which is about a decade old.
 Just point again your favorite browser to 
 http://www.apache.org/dist/cocoon/ and you will see that Cocoon 
 2.1.11 was released on Jan 14th 2008.
 
 Perhaps 80% of the official documentation is either TBW or skeletal, and 
 the only people who know the inside of Cocoon well enough to complete it 
 keep asking others to do that.
 This is absolutely false for C2.X and only partially true for C3.
 
 Beware, I am not stating that the Cocoon status is healthy, new 
 releases with bugfixes and new features are regularly made available 
 and documentation is accurate and complete.
 I am only trying to look at the Cocoon project for what it is 
 *today*: a project with:
  * very few active committers
  * almost no occasional contributors
  * still a lot of interested people: most because they are running an 
 ancient Cocoon version, few because they've heard of Cocoon only 
 recently
 
 In my opinion, a dead project is a project in which no one is 
 interested, and Cocoon is not (yet?) that far.
 
 Remembering that Cocoon - like as any other project at ASF - is 
 exclusively made up by volunteer contribution, I'd rather start a 
 [DISCUSS] thread to see what needs to be done and who is available to 
 help instead of such acid and unproductive e-mails.
 
 WDYT?
 
 Regards.
 
 On 08/11/2012 15:10, Mark H. Wood wrote:
 I'm not surprised at all.  Looking 3cm. down the same page you find 
 the next most recent news is a year and a half old.  When people ask 
 about C2.x (and the latest released version is 2.2) nobody wants to 
 talk about it (except others desperate for information about some 
 aspect of C2); one is told to use C3.  C3 has been alpha for perhaps 
 two years -- there is as yet no beta, let alone a release.  There 
 are no books on anything later than 2.1, which is about a decade old.
 

Re: Is cocoon dead ?

2012-11-11 Thread Michael Müller

Bart,

If you guess, Maven is a problem, I second you. Maven might be great 
from the developer's view. But a poor (cocoon) user perfers just a 
simple setup. Thus Maven might scare users - and it did, when I tried 
the new version apx. 5 or 6 years ago.


But from my point of view, tinker on a new realease for such a long 
time, is the really problem. Cocoon 2 is mainly in maintenance state. 
Some users still run it, thus there are some activities. Activities for 
Cocoon are much to little. Neither beta version nor a release is on the 
horizon. If this can't be changed soon, I'll predict Cocoon (3) to die.


Just my 2 cents...

Herzliche Grüße - Best Regards,
Michael Müller

Am 11.11.2012 21:20, schrieb Bart Remmerie:

Just being critical  analytical: where die we observe the big drop in community 
activity ?  Switch to Maven  move from 2.1.11 to next version ? (just a guess) = 
What can we learn from this ?

Bart Remmerie

Op 11-nov.-2012 om 18:13 heeft Michael Müller 
michael.muel...@mueller-bruehl.de het volgende geschreven:


Francesco,

I observe this list for years now (since I started using Cocon 2.1). And I 
recongnized some activities, especially from you. But since a couple of years 
I'm using a) a different technology (JSF) for my web pages and b) I'm waiting 
for Cocoon 3.0 to become ready. Even there are some acitivies, it seems to be a 
never ending story.

I guess it would be helpfull to schedule some dates for beta and release. If it 
is so much to do right now, maybe this version might be feature-reduced and 
some of the planned features will be postponed to a version 3.1? Otherwise I'm 
afraid this project is dead - even though there are some activities.

If your horse is dead, don't try to ride it anymore. Change the horse. (similar 
to Dakota saying)

Herzliche Grüße - Best Regards,
Michael Müller

Am 10.11.2012 14:00, schrieb Francesco Chicchiriccò:

Hi all,
I think e-mails like the one below are not helpful at all.

First of all, even though most of critical aspects of our current
situation are reported, some things are barely wrong:


down the same page you find the next most recent news is a year and a
half old

Open your favorite browser at http://cocoon.apache.org/ and read that
latest two news are dated July 2nd and March 3rd 2012


When people ask about C2.x (and the latest released version is 2.2) nobody 
wants to talk about it (except others desperate for information about some 
aspect of C2);

Just browse http://cocoon.markmail.org and judge by yourself whether
this is true or not.


There are no books on anything later than 2.1, which is about a decade old.

Just point again your favorite browser to
http://www.apache.org/dist/cocoon/ and you will see that Cocoon 2.1.11
was released on Jan 14th 2008.


Perhaps 80% of the official documentation is either TBW or skeletal, and the 
only people who know the inside of Cocoon well enough to complete it keep 
asking others to do that.

This is absolutely false for C2.X and only partially true for C3.

Beware, I am not stating that the Cocoon status is healthy, new releases
with bugfixes and new features are regularly made available and
documentation is accurate and complete.
I am only trying to look at the Cocoon project for what it is *today*: a
project with:
  * very few active committers
  * almost no occasional contributors
  * still a lot of interested people: most because they are running an
ancient Cocoon version, few because they've heard of Cocoon only recently

In my opinion, a dead project is a project in which no one is
interested, and Cocoon is not (yet?) that far.

Remembering that Cocoon - like as any other project at ASF - is
exclusively made up by volunteer contribution, I'd rather start a
[DISCUSS] thread to see what needs to be done and who is available to
help instead of such acid and unproductive e-mails.

WDYT?

Regards.

On 08/11/2012 15:10, Mark H. Wood wrote:

I'm not surprised at all.  Looking 3cm. down the same page you find
the next most recent news is a year and a half old.  When people ask
about C2.x (and the latest released version is 2.2) nobody wants to
talk about it (except others desperate for information about some
aspect of C2); one is told to use C3.  C3 has been alpha for perhaps
two years -- there is as yet no beta, let alone a release.  There are
no books on anything later than 2.1, which is about a decade old.
Perhaps 80% of the official documentation is either TBW or skeletal,
and the only people who know the inside of Cocoon well enough to
complete it keep asking others to do that.  Bugs with patches attached
languish for years.  Seemingly everyone using Cocoon is running a
unique local version with scads of patches that are passed around like
ancient lore.

Why would anyone think Cocoon is dead?


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Re: Is cocoon dead ?

2012-11-11 Thread Michael Müller

...Activities for Cocoon 3 are much to little...

Missing 3 in my contribution. Just for clarification.

Herzliche Grüße - Best Regards,
Michael Müller

Am 11.11.2012 21:42, schrieb Michael Müller:

Bart,

If you guess, Maven is a problem, I second you. Maven might be great 
from the developer's view. But a poor (cocoon) user perfers just a 
simple setup. Thus Maven might scare users - and it did, when I tried 
the new version apx. 5 or 6 years ago.


But from my point of view, tinker on a new realease for such a long 
time, is the really problem. Cocoon 2 is mainly in maintenance state. 
Some users still run it, thus there are some activities. Activities 
for Cocoon are much to little. Neither beta version nor a release is 
on the horizon. If this can't be changed soon, I'll predict Cocoon (3) 
to die.


Just my 2 cents...

Herzliche Grüße - Best Regards,
Michael Müller

Am 11.11.2012 21:20, schrieb Bart Remmerie:
Just being critical  analytical: where die we observe the big drop 
in community activity ? Switch to Maven  move from 2.1.11 to next 
version ? (just a guess) = What can we learn from this ?


Bart Remmerie

Op 11-nov.-2012 om 18:13 heeft Michael Müller 
michael.muel...@mueller-bruehl.de het volgende geschreven:



Francesco,

I observe this list for years now (since I started using Cocon 2.1). 
And I recongnized some activities, especially from you. But since a 
couple of years I'm using a) a different technology (JSF) for my web 
pages and b) I'm waiting for Cocoon 3.0 to become ready. Even there 
are some acitivies, it seems to be a never ending story.


I guess it would be helpfull to schedule some dates for beta and 
release. If it is so much to do right now, maybe this version might 
be feature-reduced and some of the planned features will be 
postponed to a version 3.1? Otherwise I'm afraid this project is 
dead - even though there are some activities.


If your horse is dead, don't try to ride it anymore. Change the 
horse. (similar to Dakota saying)


Herzliche Grüße - Best Regards,
Michael Müller

Am 10.11.2012 14:00, schrieb Francesco Chicchiriccò:

Hi all,
I think e-mails like the one below are not helpful at all.

First of all, even though most of critical aspects of our current
situation are reported, some things are barely wrong:


down the same page you find the next most recent news is a year and a
half old

Open your favorite browser at http://cocoon.apache.org/ and read that
latest two news are dated July 2nd and March 3rd 2012

When people ask about C2.x (and the latest released version is 
2.2) nobody wants to talk about it (except others desperate for 
information about some aspect of C2);

Just browse http://cocoon.markmail.org and judge by yourself whether
this is true or not.

There are no books on anything later than 2.1, which is about a 
decade old.

Just point again your favorite browser to
http://www.apache.org/dist/cocoon/ and you will see that Cocoon 2.1.11
was released on Jan 14th 2008.

Perhaps 80% of the official documentation is either TBW or 
skeletal, and the only people who know the inside of Cocoon well 
enough to complete it keep asking others to do that.

This is absolutely false for C2.X and only partially true for C3.

Beware, I am not stating that the Cocoon status is healthy, new 
releases

with bugfixes and new features are regularly made available and
documentation is accurate and complete.
I am only trying to look at the Cocoon project for what it is 
*today*: a

project with:
  * very few active committers
  * almost no occasional contributors
  * still a lot of interested people: most because they are running an
ancient Cocoon version, few because they've heard of Cocoon only 
recently


In my opinion, a dead project is a project in which no one is
interested, and Cocoon is not (yet?) that far.

Remembering that Cocoon - like as any other project at ASF - is
exclusively made up by volunteer contribution, I'd rather start a
[DISCUSS] thread to see what needs to be done and who is available to
help instead of such acid and unproductive e-mails.

WDYT?

Regards.

On 08/11/2012 15:10, Mark H. Wood wrote:

I'm not surprised at all.  Looking 3cm. down the same page you find
the next most recent news is a year and a half old.  When people ask
about C2.x (and the latest released version is 2.2) nobody wants to
talk about it (except others desperate for information about some
aspect of C2); one is told to use C3.  C3 has been alpha for perhaps
two years -- there is as yet no beta, let alone a release.  There are
no books on anything later than 2.1, which is about a decade old.
Perhaps 80% of the official documentation is either TBW or skeletal,
and the only people who know the inside of Cocoon well enough to
complete it keep asking others to do that.  Bugs with patches 
attached

languish for years.  Seemingly everyone using Cocoon is running a
unique local version with scads of patches that are passed around 
like

ancient lore.

Why would anyone 

Re: XInclude in sitemap.xmap

2012-11-11 Thread Mansour Al Akeel
Here's what I am doing:

 map:match pattern=article/{id}
map:generate 
src={global:base.repo.path}/articles/{map:id}/index.xml /
map:transform type=xinclude /
map:serialize type=xhtml  /

and this is error:

06:49:07.958 [btpool0-1] DEBUG o.a.c.jci.stores.MemoryResourceStore -
reading resource org/apache/cocoon/sitemap/InvocationImpl.class
06:49:07.959 [btpool0-1] ERROR o.a.cocoon.servlet.XMLSitemapServlet -
Cocoon can't process the request.
org.apache.cocoon.sitemap.InvocationException:
java.lang.NullPointerException
at 
org.apache.cocoon.sitemap.util.ExceptionHandler.getInvocationException(ExceptionHandler.java:39)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sitemap.node.PipelineNode.handleException(PipelineNode.java:103)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:73)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:100)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:100)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:245)
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:313)
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:92)
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:49)
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
[servlet-api-2.5-6.1.7.jar:6.1.7]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.7.0]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
~[na:1.7.0]



Caused by: java.lang.NullPointerException: null
at 
org.apache.cocoon.pipeline.caching.ObjectCacheKey.hashCode(ObjectCacheKey.java:53)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at java.util.WeakHashMap.get(WeakHashMap.java:374) ~[na:1.7.0]
at 
org.apache.cocoon.pipeline.caching.SimpleCache.retrieve(SimpleCache.java:57)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.pipeline.caching.AbstractCache.get(AbstractCache.java:46)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.pipeline.caching.CachedCacheKey.setKey(CachedCacheKey.java:73)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sax.component.XIncludeTransformer.constructCacheKey(XIncludeTransformer.java:664)
~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.pipeline.CachingPipeline.constructCacheKey(CachingPipeline.java:79)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.pipeline.CachingPipeline.setup(CachingPipeline.java:203)
~[cocoon-pipeline-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.7.0]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
~[na:1.7.0]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:601)
~[na:1.7.0]
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
[spring-aop-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183


The samples has:

359  map:match equals=aggregation/xinclude-transformer
360 map:generate src=aggregation/xinclude.xml /
361 map:transform type=xinclude /
362 map:serialize type=xml /
363   /map:match

The file aggregation/xinclude.xml doesn't even exist, so I can not
test if this is working and compare it to mine.

Am I missing something ??


On Sun, Nov 11, 2012 at 10:21 PM, Mansour Al Akeel
mansour.alak...@gmail.com wrote:
 Is there a 

Re: XInclude in sitemap.xmap

2012-11-11 Thread Francesco Chicchiriccò
On 12/11/2012 07:59, Mansour Al Akeel wrote:
 Here's what I am doing:

  map:match pattern=article/{id}
   map:generate 
 src={global:base.repo.path}/articles/{map:id}/index.xml /
   map:transform type=xinclude /
   map:serialize type=xhtml  /

 and this is error:
 [...]

Hi,
did you take a look at sample sitemap.xmap [1] (around line 387) and
specifically xinclude.xml [2]?

BTW: which version are you running? From the reported stacktrace I
understand C3, but some of your earlier questions were referring to C2.2

Regards.

[1]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap
[2]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/aggregation/xinclude.xml

-- 
Francesco Chicchiriccò

ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org