RE: Using replace in Flowscript

2014-02-18 Thread Robby Pelssers
Peter,

are you refering to the html document object?  In that case you're barking up 
the wrong tree... flowscript is server side javascript.  But if you e.g. want 
to import java classes you can use the following syntax:


On 25/01/11 08:17, Robby Pelssers wrote:
> importClass(Packages.java.util.ArrayList);
>
> function search() {
>  var list = new ArrayList();
>  ...
> }
>
> Kind regards,
> Robby Pelssers


Van: Peter Sparkes [pe...@didm.co.uk]
Verzonden: zondag 16 februari 2014 10:22
Aan: Cocoon users
Onderwerp: Using replace in Flowscript

Hi,

I am having difficulties using:

  *   document=document.replace('hhh','ggg')

in my flowscript

Help please, how do I import the correct package/class

Thanks

Peter

The Future Group, dé maat in ondernemen


[The Future Group][The Future Group kantoor]  
Röntgenlaan 27 | 2719 DX Zoetermeer [Mobiel nummer] 
06 15879926
[Web-site]  http://www.the-future-group.com [E-mail adres]  
robby.pelss...@the-future-group.com
[Telefoonnummer]+31 (0)79 - 363 2905[LinkedIn account]
[Twitteraccount]http://twitter.com/futuregroup




RE: how to obtain selected values in a multi-value dropdown

2013-10-15 Thread Robby Pelssers
Hi Joseph,

good that you solved the issue.  I still think however that when using a 
valuechanged event it's better not to ask the source for it's value but just 
call the getNewValue() on the event itself.

What you are running into is probably the issue of converting a Java object to 
a javascript object.

You could write some utility functions in a common JS file and include them in 
your page. That will
(a) keep you from writing the same nasty code multiple times
(b) remove the need to escape e.g. < into <

**
formhelper.js
***
function arrayToList(array) = {
   var list = new java.util.ArrayList();
   for(var i=0; 
   
   var values= arrayToList(event.getNewValue())
 
  

Didn't test this but it should work in my opinion.

Cheers,
Robby

R?ntgenlaan 27 | 2719 DX Zoetermeer
www.the-future-group.com
+31 (0)79 - 363 2905
http://twitter.com/futuregroup

06 15879926
robby.pelss...@the-future-group.com


Van: Paul G. Joseph [pjos...@gmail.com]
Verzonden: maandag 14 oktober 2013 15:45
To: users@cocoon.apache.org
Onderwerp: Re: how to obtain selected values in a multi-value dropdown

Hi Robby,

Thanks for your email.  I wasn't able to get this to work...but was able
to work around this problem as shown below.

   
   
   var value = event.source.getValue();
   var collection = new java.util.ArrayList();
  for(var i=0; i<value.length; i++) {
collection.add(value[i]);
  }
 
   

Thanks again for your help.
Paul

On 10/14/2013 3:53 AM, Robby Pelssers wrote:
> >From the looks of it a org.apache.cocoon.forms.event.ValueChangedEvent has 
> >this interface
>
>
> Method Summary
>   Object getNewValue()
>
>   Object getOldValue()
>
>
> why don't you just try
>
> var newvalues = event.getNewValue();
>
> I'm assuming now that this is an array in the multiselect case.
>
> If that doesn't work... let me know.
>
> Robby
> Schrijf je nu alvast in voor het TFG Innovation Event 2013 op 30 oktober
>
> R?ntgenlaan 27 | 2719 DX Zoetermeer
> www.the-future-group.com
> +31 (0)79 - 363 2905
> http://twitter.com/futuregroup
>
> 06 15879926
> robby.pelss...@the-future-group.com
>
> 
> Van: Paul G. Joseph [pjos...@gmail.com]
> Verzonden: woensdag 9 oktober 2013 22:24
> To: users@cocoon.apache.org
> Onderwerp: how to obtain selected values in a multi-value dropdown
>
> Hi there,
>
> I am using Cocoon 2.1.11 and CForms/Javascript/Java in Tomcat.
>
> In a form (say myform.xml) I have two fields--both dropdowns.  One is
> multi-select, the other not.
>
> The multiselect field is as below:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> debug("Came here 1");
> var value = event.source.value;
> debug("value is: " + value);
> 
> 
> 
>
> The other (no multi-select) is as follows:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> debug("Came here 2");
> var value = event.source.value;
> debug("value is: " + value);
> 
> 
> 
>
> Then in my log, when I select multiple values (say Cat and Mouse) in the
> first and a single value (say Tiger) in the second I get:
> 10/09/2013 16:16:00 PM: DEBUG: Came here 1
> 10/09/2013 16:16:00 PM: DEBUG: value is: [Ljava.lang.Object;@8c3fe4
> 10/09/2013 16:16:00 PM: DEBUG: Came here 2
> 10/09/2013 16:16:00 PM: DEBUG: value is: Tiger
>
> Question: how do I get the actual values that the user chose (say Cat
> and Mouse) in the multi-value field?  Should I use a different method
> than the one I used for the single select field and which seems to work?
>
> Paul
>
>
>
> -
> 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
>
>


-
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: how to obtain selected values in a multi-value dropdown

2013-10-14 Thread Robby Pelssers
>From the looks of it a org.apache.cocoon.forms.event.ValueChangedEvent has 
>this interface


Method Summary
 Object getNewValue()

 Object getOldValue()


why don't you just try

var newvalues = event.getNewValue();

I'm assuming now that this is an array in the multiselect case.

If that doesn't work... let me know.

Robby
Schrijf je nu alvast in voor het TFG Innovation Event 2013 op 30 oktober

R?ntgenlaan 27 | 2719 DX Zoetermeer
www.the-future-group.com
+31 (0)79 - 363 2905
http://twitter.com/futuregroup

06 15879926
robby.pelss...@the-future-group.com


Van: Paul G. Joseph [pjos...@gmail.com]
Verzonden: woensdag 9 oktober 2013 22:24
To: users@cocoon.apache.org
Onderwerp: how to obtain selected values in a multi-value dropdown

Hi there,

I am using Cocoon 2.1.11 and CForms/Javascript/Java in Tomcat.

In a form (say myform.xml) I have two fields--both dropdowns.  One is
multi-select, the other not.

The multiselect field is as below:








   
   
   debug("Came here 1");
   var value = event.source.value;
   debug("value is: " + value);
   
   


The other (no multi-select) is as follows:








   
   
   debug("Came here 2");
   var value = event.source.value;
   debug("value is: " + value);
   
   


Then in my log, when I select multiple values (say Cat and Mouse) in the
first and a single value (say Tiger) in the second I get:
10/09/2013 16:16:00 PM: DEBUG: Came here 1
10/09/2013 16:16:00 PM: DEBUG: value is: [Ljava.lang.Object;@8c3fe4
10/09/2013 16:16:00 PM: DEBUG: Came here 2
10/09/2013 16:16:00 PM: DEBUG: value is: Tiger

Question: how do I get the actual values that the user chose (say Cat
and Mouse) in the multi-value field?  Should I use a different method
than the one I used for the single select field and which seems to work?

Paul



-
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: Remove XML declaration and html DOCTYPE

2013-08-22 Thread Robby Pelssers
I vaguely remember a similar issue and using

  inside sitemap did 
not seem to work.

However, If i would declare the serializer in my spring application context 
instead of in my sitemap, and there set the property "omit-xml-declaration to 
yes it would work.

Please give that a try.

Cheers,
Robby
The Future Group, de maat in ondernemen

Röntgenlaan 27 | 2719 DX Zoetermeer
www.the-future-group.com
+31 (0)79 - 363 2905
http://twitter.com/futuregroup

06 15879926
robby.pelss...@the-future-group.com


Van: Bardo Nelgen [mailing.list.in...@bnnperformances.de]
Verzonden: donderdag 22 augustus 2013 14:39
To: users@cocoon.apache.org
Onderwerp: Re: Remove XML declaration and html DOCTYPE

Thanks nonetheless for the response, Thorsten.

The problem is: It won't work for me.

While the XML-declaration, indeed, disappears completely with the
approach, the doctype remains there.

http://www.cityapi.eu/semaworx/MyCompressed.js

The mime-type is not additionally declared in the serialize element,
since (as earlier posts suggested…) I went with defining a separate
serializer:

>  mime-type="application/ecmascript" name="js"
> src="org.apache.cocoon.serialization.TextSerializer">
> UTF-8
> true
> 
and inside the pipeline
> 
> 
> 

And despite the charset-entry, the resulting file is also still being
shipped as ISO-8859-15 rather than utf-8.

I'm sure, I'm missing something here – just don't know, what it is…



On 22.08.13 12:01, Thorsten Scherler wrote:

> On this eMail the reason why top posting is not such a good idea for ml.
> I have no clue about the context.
>
> However
>
> 
>
> will return mime-type="text/plain"
>
> You want mime-type="application/json"
>
> 
>
> 
>
> HTH

> On 08/21/2013 11:18 PM, Bardo Nelgen wrote:
>> Hi all,
>>
>> sorry to pick this up again so late, but is there a solution for
>> Cocoon 2.2 as well?
>>
>> Tried both approaches without the desired result, for a piece of
>> generated JavaScript…
>>
>> As the XML serialization did not work as advertised in this thread so
>> far, I'm currently going with
>>
>>> 
>> and keep getting
>>
>> http://www.cityapi.eu/semaworx/MyCompressed.js
>>
>> Looking for ideas on how to make the Doctype disappear *without*
>> running an extra XSLT cycle?
>>
>> Any hint is appreciated!!
>>
>> Best,
>>
>> Bardo
>>
>>
>> On 19.06.13 18:55, Mansour Al Akeel wrote:
>>> 
>



-
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: XSLT import/include errors

2013-06-21 Thread Robby Pelssers
That is possible but the how-to part depends on the Saxon version you are 
using.  You will need to dive into how to write extension functions for that 
particular implementation.

I used it a number of times with Saxon 8.7

http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html

http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html

But i never tried with the latest version of Saxon which works differently.

Robby

Van: gelo1234 [gelo1...@gmail.com]
Verzonden: vrijdag 21 juni 2013 15:23
To: Cocoon Users
Onderwerp: Re: XSLT import/include errors

OK, one more question. Is it possible with Saxon/Xalan in C3 to invoke external 
Java function ?
I can't get it working:

http://www.w3.org/1999/XSL/Transform"; version="1.0"
xmlns:utils="java:org.example.Utils"
exclude-result-prefixes="utils">



 

 
   
 




Tried Xalan, tried Saxon. Both generates some strange errors with XML Document.

Greetings,
Greg


2013/6/20 gelo1234 mailto:gelo1...@gmail.com>>
The latest Saxon got the same _global_ variable context scope and doesn't allow 
overriding xsl:variables.
OK, I will fix that :)

Greetings,
Greg


2013/6/20 gelo1234 mailto:gelo1...@gmail.com>>

Thank you! I will try to bring back Saxon :)

Greetings,
Greg


This was discused before in the mailing list [1], it's a two step process

* Add saxon dependency to pom file. [2]

I think it's better to try Saxon directly if you used to work with it. Xalan is 
usually faster but as you have to migrate already made templates from Saxon IMO 
it's better to switch the engine.

[1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
[2] 
http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results






The Future Group, dé maat in ondernemen



[The Future Group][The Future Group kantoor]  
Röntgenlaan 27 | 2719 DX Zoetermeer [Mobiel nummer] 
06 15879926
[Web-site]  http://www.the-future-group.com [E-mail adres]  
robby.pelss...@the-future-group.com
[Telefoonnummer]+31 (0)79 - 363 2905[LinkedIn account]
[Twitteraccount]http://twitter.com/futuregroup




RE: Dom Transformer

2013-03-15 Thread Robby Pelssers
So we all agree on a SAX transformer :)

From: gelo1234 [mailto:gelo1...@gmail.com]
Sent: Friday, March 15, 2013 8:19 PM
To: users@cocoon.apache.org
Subject: Re: Dom Transformer

Seems reasonable. Although its a bit awkward idea.

Simplicity is the key ;)
Greetings,
-Greg

2013/3/15 Jos Snellings 
mailto:jos.snelli...@upperware.biz>>
Not sure what your usage is, Mansour.
If your program has to generate references to things that 'yet have to come' in 
the input stream, of course
you get quickly into thinking 'DOM'-wise.

- I believe Stax can bring outcome, but no experience with this.
- I once wrote a 'SAX-recorder', so somefilter that records SAX-elements, but 
do not remember exactly what problem that solved, just that it worked.
- it is possible to trap SAX-events and feed them into a JDom object.
  (I mean, if nothing else works).

Cheers,
Jos








On Fri, Mar 15, 2013 at 8:01 PM, Mansour Al Akeel 
mailto:mansour.alak...@gmail.com>> wrote:
Jos, thank you. I though about this.
The problem is, the documents I am processing had to go through a
pipeline processing before I need to use DOM transformation on them.
So a generator is not an option, and I am using C3.


On Fri, Mar 15, 2013 at 2:58 PM, Jos Snellings
mailto:jos.snelli...@upperware.biz>> wrote:
> You can, within a generator class, (C3),
> or within an xsp (C 2).
> Sometimes such things come in handy.
>
> If you mean, configure one from the sitemap, I see no uses.
>
> Cheers,
> Jos
>
>
> On Fri, Mar 15, 2013 at 7:05 PM, Mansour Al Akeel
> mailto:mansour.alak...@gmail.com>> wrote:
>>
>> I know this may sound strange, but I like to create a transformation with
>> DOM.
>> I was able to see Stax and Sax transformation. I was not able to see
>> one for DOM.
>>
>> Any advice ?? Examples ??
>>
>> -
>> To unsubscribe, e-mail: 
>> users-unsubscr...@cocoon.apache.org
>> For additional commands, e-mail: 
>> users-h...@cocoon.apache.org
>>
>
>
>
> --
> All generous minds have a horror of what are commonly called "Facts". They
> are the brute beasts of the intellectual domain.
> -- Thomas Hobbes

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



--
All generous minds have a horror of what are commonly called "Facts". They are 
the brute beasts of the intellectual domain.
-- Thomas Hobbes



RE: Dom Transformer

2013-03-15 Thread Robby Pelssers
Exactly…  I don’t have the full picture here but if you provide a small input 
file and expected output file we might come up with an easier solution.  I 
still am not seeing why XSLT can’t get the job done but I hope your input will 
make this obvious.

Robby

From: gelo1234 [mailto:gelo1...@gmail.com]
Sent: Friday, March 15, 2013 8:02 PM
To: users@cocoon.apache.org
Subject: Re: Dom Transformer

The question is WHY you want to use DOM is still valid.
C (2 or 3) uses SAX or StaX per default and you can use it in a clean way. I 
see no reason to use DOM.
Greetings,
-Greg

2013/3/15 Mansour Al Akeel 
mailto:mansour.alak...@gmail.com>>
I have tags with id's like:



I think this can be done is Stax, xslt or Sax, however, I am trying to
do it in a clean way without any hacks.

Do you have any suggestion ??



On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 
mailto:gelo1...@gmail.com>> wrote:
> The question is WHY? you want DOM transformation in Cocoon environment ?
>
> Greetings,
> -Greg
>
>
> 2013/3/15 Mansour Al Akeel 
> mailto:mansour.alak...@gmail.com>>
>>
>> I know this may sound strange, but I like to create a transformation with
>> DOM.
>> I was able to see Stax and Sax transformation. I was not able to see
>> one for DOM.
>>
>> Any advice ?? Examples ??
>>
>> -
>> 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: sitemap parameter in C3 (was Re: A generator with sitemap parameter in C3)

2013-02-19 Thread Robby Pelssers
I agree on the fact that it's confusing to say the least when programming 
against the Java API. And any simplifications on this aspect are welcome.

Robby

-Original Message-
From: Thorsten Scherler [mailto:scher...@gmail.com] 
Sent: Tuesday, February 19, 2013 11:45 AM
To: users@cocoon.apache.org
Subject: Re: sitemap parameter in C3 (was Re: A generator with sitemap 
parameter in C3)

On 02/18/2013 02:50 PM, Thorsten Scherler wrote:
> On 02/11/2013 01:55 PM, gelo1234 wrote:
>> ...
>> So the setup(...) has access to sitemap parameters :) Why not
>> setConfiguration(..) ?
>>
>> Does call:
>> this.setup((Map) configuration) strips off?/adds? 
>> some unwanted/additional data for sitemap-servlet framework ?
>>
>> As i recall setConfiguration is for Java only (without
>> sitemap-servlet) Cocoon use and setup is for standard sitemap-servlet 
>> ? Is that correct ?
>>
> No actually setConfiguration is for passing parameters from the 
> sitemap to the component e.g. http://svn.apache.org/r1447255
>
> The setup() will be called when the pipeline setup is called, I think 
> we should drop one since it is highly confusing.

PipelineComponent:

/**
 * Pass component specific configuration parameters to the pipeline
 * component in a generic way. This is useful in environments that
 * automatically assemble pipelines with their components and can't use the
 * components constructors or setters.
 *
 * @param configuration The {@link Map} of configuration parameters.
 */
void setConfiguration(Map configuration);

/**
 * The shared object map for this pipeline run.
 *
 * @param parameters A {@link Map} of parameters that are available to all
 *{@link PipelineComponent}s. This is a modifiable map
that can
 *be changed by this pipeline component.
 */
void setup(Map parameters);

The main div is global vs. local map. Meaning the configure is intended to only 
configure the specific component and not all. That makes sense in terms of the 
sitemap but in a pure java pipeline hardly, well I can imagine a use case where 
it would be indeed very handy, but first let us look on some java pipes.

I use something like the following to process some droidsTask in java with the 
help of c3:

/**
 * LinkExtractorPipeline.
 * @param  T extends PipelineComponent  */ public class 
LinkExtractorPipeline extends
NonCachingPipeline {

private static final Logger logger =
LoggerFactory.getLogger(LinkExtractorPipeline.class);

private LinkExtractorTransformer linkExtractorTransformer;
/**
 * LinkExtractorPipeline.
 */
public LinkExtractorPipeline() {
linkExtractorTransformer = new LinkExtractorTransformer();
}
@Override
public void setup(OutputStream outputStream, Map
parameters) {
if (outputStream == null) {
throw new SetupException("An output stream must be passed.");
}
try {
this.addComponent(new XMLGenerator((InputStream) 
parameters.get("src")));
this.addComponent(linkExtractorTransformer);
this.addComponent(new XMLSerializer());
super.setup(outputStream, parameters);
} catch (Exception e) {
String message = "There were a problem setting up the pipeline.";
logger.error(message, e);
throw new SetupException(message, e);
}
}

/**
 * @return outLinks
 */
public List getOutLinks() {
return linkExtractorTransformer.getOutLinks();
}


Then I call it from my java code like

LinkExtractorPipeline pipeline =
new LinkExtractorPipeline();
OutputStream output = new BufferedOutputStream(new 
ByteArrayOutputStream());
// pass parameter to the pipeline
Map parameters = new HashMap();
parameters.put("src", task.getContentEntity().getContent());
pipeline.setup(output, parameters);
try {
pipeline.execute();
} catch (Exception e) {
logger.error("Could not excecute pipeline.", e);
throw new DroidsException(e);
}

Now the main difference to the usage from within the sitemap is that you cannot 
create your own components like in java and configure them as you please.

However imagine the above LinkExtractorPipeline as pseudo sitemap config:


   -> we do not have the concept of matcher in the 
java pipeline



  


Now since we have the config done in the same class we could do something like 
 and then simply use spring to link 
back to LinkExtractorPipeline.class

However the other way around should as well be possible. Imagine we see the 
sitemap as simple pipe config store, then I could simplify the above code to 
something like:
LinkExtractorPipeline pipeline = 
sitemap.getPipeline("linkExtractorPipeline");
and use the pseudo sitemap config instead of the java code 
LinkExtractorPipel

RE: from Cforms to Wicket

2013-02-18 Thread Robby Pelssers
The only thing I wonder about is...

Cocoon and neither XSLT2.0 support html5 serialization for all I know.  So does 
someone using Cocoon already generate HTML5 content with Cocoon and how did you 
accomplish this.

Cheers,
Robby

-Original Message-
From: Mika M Lehtonen [mailto:m...@digikartta.net] 
Sent: Monday, February 18, 2013 1:42 PM
To: users@cocoon.apache.org
Subject: Re: from Cforms to Wicket

Ok,
thanks for your efforts. HTML5 it is, with or without C3.

- mika -


18.2.2013 14:25, Francesco Chicchiriccò kirjoitti:
> On 18/02/2013 13:09, Mika M Lehtonen wrote:
>> Yeah,
>> I know what you mean. Most of the Xforms sites are dated back to 2002 
>> or 2003.. Sounds like a standard having glorious future behind..
>>
>> This betterForm still sounded proper for my purposes because it 
>> actually implements server-side approache of Xforms. So I could use 
>> Xforms definition for producing HTML-forms, if I understood right. It 
>> actually resembles a lot of Cforms with a difference that it seems to 
>> be under development taking contemporary challenges into account.
>
> "under development" with latest release 4.1 dating 1 year back [1]
>
>> But would I still need C3 (or C2.11 / C2.2)?
>
> It depends on you, and on how much effort do you want to put on this 
> task.
> Anyway, not necessarily, even though Cocoon will help in you in the 
> XML side if the job.
>
>> I would like to get familiar with C3 if I only could figure out how 
>> to start.
>>
>> The biggest problem with C2.11, IMHO, was not having proper 
>> development tools to use. I ended up writing files with Notepad++.
>> And I never realized how to do debugging..
>
> [1] http://sourceforge.net/projects/betterform/files/
>
>> 18.2.2013 10:48, Francesco Chicchiriccò kirjoitti:
>>> On 17/02/2013 21:57, Mika M Lehtonen wrote:
 How about some XForms implementation like this 
 http://www.betterform.de?
 Sounds promising..
>>>
>>> I personally wouldn't bet much on XForms...
>>>
>>> Regards.
>


-
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: Error pattern in block

2013-02-17 Thread Robby Pelssers
Oh… I know where that error comes from.

That means it can’t find a certificate needed to access that URL.

You will need to install a certificate for the particular JDK running your app.

Keystore default password: changeit

Example of how to install a certificate on windows:

keytool -import -alias "PELSSERS-ROOT-CA" -keystore 
C:/development/Java/jdk1.6.0_32/jre/lib/security/cacerts -file 
PELSSERSROOTCA.crt


Kind regards,
Robby

From: "Antonio M. Mérida" [mailto:antonio.mor...@codebusters.es]
Sent: Saturday, February 16, 2013 9:24 PM
To: users@cocoon.apache.org
Subject: Error pattern in block

hi,

I'm trying to do "pattern" to a URL with a simple block of cocoon and I have 
this error:



unable to find valid certification path to requested target


sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target at 
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
 at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238) at 
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318) at 
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217) at 
sun.security.validator.Validator.validate(Validator.java:218) at 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
 at .

The block is this:

  

  https://projectwebproduct/file-form.html";
 />
  

  

Can the problem by URL "https://";?,
Thanks.

--

Antonio M. Mérida -- codeBusters.es


RE: [C2.2] Provide or consume Webservices with Cocoon 2.2

2013-01-22 Thread Robby Pelssers
So our setup is like this:

We have a separate project which represents the webservice client…

http://robbypelssers.blogspot.nl/2010/10/building-webservices-with-spring-ws_3532.html

So basically we only needed to declare a maven dependency on this project.  So 
far easy to understand I hope.

com.nxp.spider2
jobmonitorClient
1.1.11


So in the spring application context of our Cocoon [2.2] app  we configured the 
client like below:

  
  

  



  

  

  



Now it becomes interesting ;-)   But I’m just going to redirect again to my 
blog.  We consumed the webservice from transforming custom tags which were 
transformed using XSLT extensions … Just read this page and it will become 
clear…

http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html

Let me know if it’s too vague… willing to answer questions.

Robby



From: Matthias Müller [mailto:pym...@yahoo.de]
Sent: Tuesday, January 22, 2013 11:32 AM
To: users@cocoon.apache.org
Subject: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

Thanks for the provided link, Robby. Now it would be interesting to see how you 
consume your movie webservice within a cocoon 2.2 pipeline. Do you call the 
webservice within a sitemap using a custom generator? Or via flow script?

Matthias


Von: Robby Pelssers mailto:robby.pelss...@nxp.com>>
An: "users@cocoon.apache.org<mailto:users@cocoon.apache.org>" 
mailto:users@cocoon.apache.org>>
Gesendet: 20:40 Montag, 21.Januar 2013
Betreff: RE: [C2.2] Provide or consume Webservices with Cocoon 2.2

Not sure if that was addressed to me.  I did blog about how to use Spring-ws in 
the past.  It’s not really cocoon related but you might as well consume or 
provide a webservice with Cocoon. It might be a bit outdated already but I 
guess it won’t hurt you to go over it quickly:

http://robbypelssers.blogspot.nl/2010/10/building-webservices-with-spring-ws-and.html



From: gelo1234 [mailto:gelo1...@gmail.com]
Sent: Monday, January 21, 2013 2:14 PM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

Can you provide some examples of such configuration and Web Services logic here 
? Spring Web Services + cocoon 3.0 ?
Greetings,
Greg



RE: [C2.2] Provide or consume Webservices with Cocoon 2.2

2013-01-21 Thread Robby Pelssers
Not sure if that was addressed to me.  I did blog about how to use Spring-ws in 
the past.  It’s not really cocoon related but you might as well consume or 
provide a webservice with Cocoon. It might be a bit outdated already but I 
guess it won’t hurt you to go over it quickly:

http://robbypelssers.blogspot.nl/2010/10/building-webservices-with-spring-ws-and.html



From: gelo1234 [mailto:gelo1...@gmail.com]
Sent: Monday, January 21, 2013 2:14 PM
To: users@cocoon.apache.org
Subject: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

Can you provide some examples of such configuration and Web Services logic here 
? Spring Web Services + cocoon 3.0 ?
Greetings,
Greg


RE: [C2.2] Provide or consume Webservices with Cocoon 2.2

2013-01-21 Thread Robby Pelssers
You can add dependencies on the necessary spring modules.  We actually consume 
webservices from within our Cocoon2.2 application.

I’m not sure exactly which of the below dependencies are needed anymore but I 
will just list the ones we are using:



UTF-8
2.5.1
1.5.10




org.springframework.ws
spring-ws-core
${spring.ws.version}


org.springframework.ws
spring-oxm-tiger
${spring.ws.version}


org.springframework.ws
spring-oxm
${spring.ws.version}


org.springframework
spring-context-support
${spring.version}


org.springframework
spring-tx
${spring.version}


org.springframework
spring-web
${spring.version}


org.springframework
spring-aspects
${spring.version}


Robby

From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Monday, January 21, 2013 1:26 PM
To: users@cocoon.apache.org
Subject: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

On 21/01/2013 09:45, Matthias Müller wrote:
I thought that the spring integration is also part of Cocoon 2.2 !?

If Jos is referring to the cocoon-spring-configurator, I confirm that it is 
included in C2.2 (and C3, of course).

Unfortunately, I don't know if there is any sample of this kind available.
If you succeed with this approach, please report.

Regards.



Von: Jos Snellings 

An: users@cocoon.apache.org; Matthias Müller 

Gesendet: 9:28 Montag, 21.Januar 2013
Betreff: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

Hi Matthias,
As a matter of fact, cocoon can host spring modules. You can plug in most every 
module using the well-known IoC mechanism.
In a typical block you will be able to configure things in the 
META-INF/cocoon/spring folder.
This is in my opinion one of the strong points of C3 over C2.2.
Cheers,
Jos

On Mon, Jan 21, 2013 at 8:59 AM, Matthias Müller 
mailto:pym...@yahoo.de>> wrote:
I guess upgrading to Cocoon 3 means a lot of work. Please correct me, if I'm 
wrong here.

I'm not to deep in cocoon development, so maybe I'm totally wrong with the 
following idea:
There is a Cocoon spring integration. Does that mean that coccon can host 
spring modules? Could I maybe use the a spring webservice here?

Regards,
Matthias

Von: Francesco Chicchiriccò mailto:ilgro...@apache.org>>
An: users@cocoon.apache.org
Gesendet: 12:32 Samstag, 19.Januar 2013
Betreff: Re: [C2.2] Provide or consume Webservices with Cocoon 2.2

On 17/01/2013 14:26, Matthias Müller wrote:
Hi there,

are there any tutorials / samples about implementing webservice support in 
cocoon 2.2.

All the sources I found are based on Cocoon 2.1x, e.g.
http://wiki.apache.org/cocoon/WebServiceServer

Hi Matthias,
I don't think there is any different sample for C2.2; possibly, the wiki page 
content mentioned above shouldn't be hard to upgrade to C2.2, but I cannot help 
you in this field, unfortunately.

If you are interested in webservice with Cocoon, I would suggest Cocoon 3 (not 
yet fully released but already proven stable) with a dedicated support for REST 
[1].

Regards.

[1] 
http://cocoon.apache.org//3.0/reference/html/webapps.html#webapps.rest

--

Francesco Chicchiriccò



ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member

http://people.apache.org/~ilgrosso/


RE: Multipage CForm using Ajax - Non ascii Characters

2013-01-14 Thread Robby Pelssers
Hi Peter,

No…encodeURIComponent should go in the client javascript.
And in flowscript you have to decode the parameter value again.

importClass(Packages.java.net.URLDecoder);

var decodedvalue = URLDecoder.decode(cocoon.request.getParameter(“someparam”);


Kind regards,
Robby



From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Monday, January 14, 2013 4:45 PM
To: users@cocoon.apache.org
Subject: Re: Multipage CForm using Ajax - Non ascii Characters

Thanks Greg and Robby for your replies.

Unfortunately I can't get it to work. I assume encodeURIComponent goes into the 
flowscript:
function multipage() {
   var lodgeId = cocoon.parameters.lodgeId;
   cocoon.request.setAttribute("lodgeId", lodgeId);

   var documentURI = cocoon.parameters["documentURI"];
   // parse the document to a DOM-tree
   var document = loadDocument(documentURI);

   //document = decodeURIComponent (document);

   // get the documentURI parameter from the sitemap which contains the 
location of the form definition (model)
   var definitionURI = cocoon.parameters["definitionURI"];

   //create new form
   var form = new Form(definitionURI);

   // get the documentURI parameter from the sitemap which contains the 
location of the binding file
var bindingURI = cocoon.parameters["bindingURI"];
form.createBinding(bindingURI);

// bind the document data to the form
form.load(document);

// show the form to the user until it is validated successfully
form.showForm("lodgemul-display-pipeline.jx");

// bind the form's data back to the document

form.save(document);

// save the DOM-tree back to an XML file,
document = encodeURIComponent(document);
saveDocument(document, documentURI);

// show the xml generated from the form
var success ='/B&B/England/Devon/Bideford/'+ lodgeId+'.html';
//cocoon.redirectTo('/office/' + lodgeno+'.htm');
cocoon.sendPage(success);
}
document = encodeURIComponent(document);  produces the following error when I 
submit the completed form

Can't find method org.apache.cocoon.xml.dom.DOMStreamer.stream(string).

What am I doing wrong

Peter

On 14/01/2013 14:27, gelo1234 wrote:
Ajax calls use default character encoding defined by HTTP 1.1 spec (which 
iso-8859-1, not UTF-8). You have to encode BEFORE sending and decode AFTER 
retrieving those strings.
Encode with encodeURIComponent, decode with decodeURIComponent (if Javascript).
Greetings,
Greg


On 14/01/2013 14:22, Robby Pelssers wrote:
You will probably need to encode the characters if you make an ajax call…

var  somevalue = encodeURIComponent(“this is a value to be encoded”);

Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Monday, January 14, 2013 3:18 PM
To: Cocoon users
Subject: Multipage CForm using Ajax - Non ascii Characters

Hi

Cocoon 2.11

I have implemented a multipage CForm which uses Ajax. The form is based on the 
example at


http://cocoon.zones.apache.org/cocoon21/samples/blocks/forms/do-multipage.flow

The  form works fine except that it does not save non ascii characters 
correctly eg.
É €  ç  £


If I use one very long form without Ajax the above characters are correctly 
saved

Help please, How can I fix this problem


Peter



RE: Multipage CForm using Ajax - Non ascii Characters

2013-01-14 Thread Robby Pelssers
You will probably need to encode the characters if you make an ajax call…

var  somevalue = encodeURIComponent(“this is a value to be encoded”);

Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Monday, January 14, 2013 3:18 PM
To: Cocoon users
Subject: Multipage CForm using Ajax - Non ascii Characters

Hi

Cocoon 2.11

I have implemented a multipage CForm which uses Ajax. The form is based on the 
example at


http://cocoon.zones.apache.org/cocoon21/samples/blocks/forms/do-multipage.flow

The  form works fine except that it does not save non ascii characters 
correctly eg.
É €  ç  £


If I use one very long form without Ajax the above characters are correctly 
saved

Help please, How can I fix this problem


Peter


RE: Sitemap: Error calling continuation

2013-01-11 Thread Robby Pelssers
Well… did you also try to wrap everything in a try catch?  Maybe you will get a 
meaningful stacktrace?  Now the only info you get is that there is a problem 
with the continuation.

As a quick hack:

function editingForm() {
   try {
 //do your stuff here
   } catch (e) {
   print(e)
   }
}

At least it should show a stacktrace on your console.

Robby


From: Dimitra Nefeli [mailto:dimnefel...@gmail.com]
Sent: Friday, January 11, 2013 2:21 PM
To: users@cocoon.apache.org
Subject: Re: Sitemap: Error calling continuation

I just tried it but the problem persists

The problem is with the continuation. The right points in both sitemaps (cocoon 
and dcEditor(my folder)) are:
 (dcEditor)

   
 

(cocoon)
 
  
 .

Maybe this information can help
Dimitra.



On 01/11/2013 02:54 PM, Robby Pelssers wrote:
I think you’re not using Cocoon2.2 so there might be some differences of course…

And so far I have a hunch which you should try out.

var viewData = { "title" : form.getChild("title").getValue() }

should probably become

var viewData = { "title" : form.form.getChild("title").getValue() }


Can you give that a try first?

Oh yes..

And for debugging purposes you can also wrap it in a try catch block:

function editingForm() {
   try {
 //do your stuff here
   } catch (e) {
   cocoon.sendPage(“someErrorTemplate”, {“exception”: e})
   }
}

From: Dimitra Nefeli [mailto:dimnefel...@gmail.com]
Sent: Friday, January 11, 2013 1:42 PM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: Re: Sitemap: Error calling continuation

On 01/11/2013 02:06 PM, Robby Pelssers wrote:

Can you perhaps show the flowscript involved and the relevant sitemap snippets?



Robby



-Original Message-

From: Dimitra Nefeli [mailto:dimnefel...@gmail.com]

Sent: Friday, January 11, 2013 11:43 AM

To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>

Subject: Sitemap: Error calling continuation



Hi,

I am trying to make a form and submitting it, a new xml file will be created.

The problem is with the sitemaps and the pipelines.

In the sitemap.xmap of my folder (dcEditor), I have defined a 
"dc-success-pipeline", which simply "calls" a .jx file.

The problem is in the continuation of sitemaps, appearing the error:

org.apache.cocoon.ProcessingExcetion: Sitemap: error calling continuation at 
 - 
file:///usr/local/fedora/tomcat/webapps/cocoon/dcEditor/sitemap.xmap

at  - 
file:///usr/local/fedora/tomcat/webapps/cocoon/sitemap.xmap



I don't know if this information is adequate.

Please if anyone has some idea, let's help.



Thanks in advance,

Dimitra.



-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.org<mailto:users-unsubscr...@cocoon.apache.org>

For additional commands, e-mail: 
users-h...@cocoon.apache.org<mailto:users-h...@cocoon.apache.org>









-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.org<mailto:users-unsubscr...@cocoon.apache.org>

For additional commands, e-mail: 
users-h...@cocoon.apache.org<mailto:users-h...@cocoon.apache.org>


The sitemap.xmap is:

http://apache.org/cocoon/sitemap/1.0";<http://apache.org/cocoon/sitemap/1.0>>

  

  

  />

true
  

  


  

  

   
   
 
   
 

 
   
 

 
   
   
 
   
   
   
 

 
   
 

 
   />
 

   

 



editing.js
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

function editingForm() {
var form = new Form("dc_definition.xml");

form.showForm("dc-display-pipeline");

var viewData = { "title" : form.getChild("title").getValue() }
cocoon.sendPage("dc-success-pipeline", viewData);
}

and dc_success.jx


  
Editing successful
  
  
pipeline works for ${title}!
  
.

Thanks in advance,
Dimitra



RE: Sitemap: Error calling continuation

2013-01-11 Thread Robby Pelssers
I think you’re not using Cocoon2.2 so there might be some differences of course…

And so far I have a hunch which you should try out.

var viewData = { "title" : form.getChild("title").getValue() }

should probably become

var viewData = { "title" : form.form.getChild("title").getValue() }


Can you give that a try first?

Oh yes..

And for debugging purposes you can also wrap it in a try catch block:

function editingForm() {
   try {
 //do your stuff here
   } catch (e) {
   cocoon.sendPage(“someErrorTemplate”, {“exception”: e})
   }
}

From: Dimitra Nefeli [mailto:dimnefel...@gmail.com]
Sent: Friday, January 11, 2013 1:42 PM
To: users@cocoon.apache.org
Subject: Re: Sitemap: Error calling continuation

On 01/11/2013 02:06 PM, Robby Pelssers wrote:

Can you perhaps show the flowscript involved and the relevant sitemap snippets?



Robby



-Original Message-

From: Dimitra Nefeli [mailto:dimnefel...@gmail.com]

Sent: Friday, January 11, 2013 11:43 AM

To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>

Subject: Sitemap: Error calling continuation



Hi,

I am trying to make a form and submitting it, a new xml file will be created.

The problem is with the sitemaps and the pipelines.

In the sitemap.xmap of my folder (dcEditor), I have defined a 
"dc-success-pipeline", which simply "calls" a .jx file.

The problem is in the continuation of sitemaps, appearing the error:

org.apache.cocoon.ProcessingExcetion: Sitemap: error calling continuation at 
 - 
file:///usr/local/fedora/tomcat/webapps/cocoon/dcEditor/sitemap.xmap

at  - 
file:///usr/local/fedora/tomcat/webapps/cocoon/sitemap.xmap



I don't know if this information is adequate.

Please if anyone has some idea, let's help.



Thanks in advance,

Dimitra.



-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.org<mailto:users-unsubscr...@cocoon.apache.org>

For additional commands, e-mail: 
users-h...@cocoon.apache.org<mailto:users-h...@cocoon.apache.org>









-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.org<mailto:users-unsubscr...@cocoon.apache.org>

For additional commands, e-mail: 
users-h...@cocoon.apache.org<mailto:users-h...@cocoon.apache.org>


The sitemap.xmap is:

http://apache.org/cocoon/sitemap/1.0";<http://apache.org/cocoon/sitemap/1.0>>

  

  

  />

true
  

  


  

  

   
   
 
   
 

 
   
 

 
   
   
 
   
   
   
 

 
   
 

 
   />
 

   

 



editing.js
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

function editingForm() {
var form = new Form("dc_definition.xml");

form.showForm("dc-display-pipeline");

var viewData = { "title" : form.getChild("title").getValue() }
cocoon.sendPage("dc-success-pipeline", viewData);
}

and dc_success.jx


  
Editing successful
  
  
pipeline works for ${title}!
  
.

Thanks in advance,
Dimitra


RE: Sitemap: Error calling continuation

2013-01-11 Thread Robby Pelssers
Can you perhaps show the flowscript involved and the relevant sitemap snippets?

Robby

-Original Message-
From: Dimitra Nefeli [mailto:dimnefel...@gmail.com] 
Sent: Friday, January 11, 2013 11:43 AM
To: users@cocoon.apache.org
Subject: Sitemap: Error calling continuation

Hi,
I am trying to make a form and submitting it, a new xml file will be created.
The problem is with the sitemaps and the pipelines.
In the sitemap.xmap of my folder (dcEditor), I have defined a 
"dc-success-pipeline", which simply "calls" a .jx file.
The problem is in the continuation of sitemaps, appearing the error:
org.apache.cocoon.ProcessingExcetion: Sitemap: error calling continuation at 
 - 
file:///usr/local/fedora/tomcat/webapps/cocoon/dcEditor/sitemap.xmap
at  - file:///usr/local/fedora/tomcat/webapps/cocoon/sitemap.xmap

I don't know if this information is adequate.
Please if anyone has some idea, let's help.

Thanks in advance,
Dimitra.

-
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: Flowscript - Move file to another directory

2013-01-01 Thread Robby Pelssers
http://stackoverflow.com/questions/4645242/how-to-move-file-from-one-location-to-another-location-in-java

The easiest is to use apache commons IO.  But you can also use the rename 
strategy but you will need to take care of a few things in that case.

Robby

-Original Message-
From: Peter Sparkes [mailto:pe...@didm.co.uk] 
Sent: Tuesday, January 01, 2013 6:08 PM
To: users@cocoon.apache.org
Subject: Flowscript - Move file to another directory

Hi,

I am trying to copy image files from one directory to another, using 
flowscript, without any success.

Please has anyone got an example

java version "1.6.0_22"

Thanks

Peter

-
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: Flowscript - delete file

2012-12-29 Thread Robby Pelssers
Hi Peter,

I did not test the script I wrote actually and I can tell you why the script 
runs into an error.

.delete() is also a javascript method on an object.  It will delete a property 
by the name you specify.  As you clearly want to call the delete method on the 
file you need to use the workaround you used.

Kind regards,
Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Saturday, December 29, 2012 8:58 AM
To: users@cocoon.apache.org
Subject: Re: Flowscript - delete file

Hi Martin and Robby,

Thank you both for your help, what I have ended up with is:

importClass(Packages.java.io.File);
importClass(Packages.java.io.FileNotFoundException);

function deletefile() {

//var filePath = cocoon.parameters["file"];

var filePath = "D:/cocoon-2.1.11-wl/build/webapp/B&B/xml/.xml";  //for 
testing
var file = new File(filePath);
 try {
if (!file.exists()) {
   throw new FileNotFoundException(filePath);
}
file.delete();

cocoon.sendPage('deletefilesuccess',{file:filePath});
} catch (e) {
cocoon.sendPage('deletefileerror',{file:e});
}
}

However, file.delete(); produces a syntax error.

If I comment out file.delete(), the rest of the script works correctly:

  *   If .xml exists, deletefilesuccess is accessed
  *   If .xml does not exist, deletefileerror is accessed and I get:

Error File java.io.FileNotFoundException: 
D:/cocoon-2.1.11-wl/build/webapp/B&B/xml/.xml Not Found
What's wrong with file.delete(); ?

Regards

Peter



On 27/12/2012 18:35, Martin Heiden wrote:

Hi Peter,



Ok, I missed something:



 var xml_file = 
Packages.java.io.File("D:\cocoon-2.1.11-wl\build\webapp\B&B\xml" + file + 
".xml");



should be:



 var xml_file = new 
Packages.java.io.File("D:\cocoon-2.1.11-wl\build\webapp\B&B\xml" + file + 
".xml");



But you should try the function Robby sent to the list. It's much

cleaner.



Regards,



  Martin.





Thursday, December 27, 2012, 6:12:08 PM, you wrote:



PS> Hi Martin



PS> Thanks for your suggestion, unfortunately I get the same  error. The error 
log gives:



PS> ERROR (2012-12-27) 15:30.46:723 [flow] (/office/deletefile_) 
PoolThread-4/JSErrorReporter:

PS> 
"file:///D:/cocoon-2.1.11-wl/build/webapp/office/flow/deletefile.js",
 line 13: missing name after .

PS> operator

PS> ERROR (2012-12-27) 15:30.46:723 [sitemap.handled-errors] 
(/office/deletefile_)

PS> PoolThread-4/ErrorHandlerHelper: Sitemap: error calling function 
'deletefile'

PS>  at  -

PS> 
file:///D:/cocoon-2.1.11-wl/build/webapp/office/sitemap.xmap:230:37

PS>  at  -

PS> 
file:///D:/cocoon-2.1.11-wl/build/webapp/sitemap.xmap:783:90

PS> org.mozilla.javascript.EvaluatorException:

PS> 
"file:///D:/cocoon-2.1.11-wl/build/webapp/office/flow/deletefile.js",
 line 1: Compilation produced 1

PS> syntax errors.

PS>  at

PS> 
org.apache.cocoon.components.flow.javascript.JSErrorReporter.runtimeError(JSErrorReporter.java:67)



PS> regards



PS> Peter





PS> On 27/12/2012 11:42, Martin Heiden wrote:

Hi Peter,



PS>  //Delete file

PS>  Packages.java.io.File.xml_file.delete();



Try



xml_file.delete();



You just have to add the full "path" to the class when you

construct it. After this, the variable contains a reference and you

can just use it.



Regards,



   Martin.





Thursday, December 27, 2012, 10:28:31 AM, you wrote:



PS> Hi,



PS> I am trying to delete xml files using the following flowscript:



PS> function deletefile() {



PS>  //file to be deleted

PS>  var file =

PS> Packages.java.lang.String(cocoon.parameters["file"]);



PS>  try {

PS>  // creating a link to the file to be deleted

PS>  var xml_file =

PS> Packages.java.io.File("D:\cocoon-2.1.11-wl\build\webapp\B&B\xml" + file

PS> + ".xml");



PS>  //Delete file

PS>  Packages.java.io.File.xml_file.delete();



PS>  //  .txt file with OK message

PS>  cocoon.sendPage("success.txt", null);

PS>  }

PS>  catch(ex){

PS>  cocoon.log.error(ex);

PS>  // Smth. went wrong. Sending a error.txt file to the browser

PS>cocoon.sendPage("error.txt", null);

PS>  }



PS> }



PS> and get "Compilation produced 1 syntax errors"



PS> The error log contains:



PS> ERROR deletefile.js", line 13: missing name after . 
operator



PS> line 13 is:



PS> Packages.java.io.File.xml_file.delete();



PS> What I am doing wrong?



PS> Peter















-

To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.org

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













Ciao,

 Martin





--

RE: Flowscript - delete file

2012-12-27 Thread Robby Pelssers
importClass(Packages.java.io.File);
importClass(Packages.java.io.FileNotFoundException);

function deleteFile() {
var filePath = cocoon.parameters["file"];
var file = new File(filePath);
try { 
if (!file.exists()) {
   throw new FileNotFoundException(filePath);
}
file.delete();
cocoon.sendPage("success.txt", {});
} catch (e) {
cocoon.sendPage("error.txt", e);
}
}

That's more closely to how I would write it.

Robby

-Original Message-
From: Martin Heiden [mailto:martin.hei...@netcologne.de] 
Sent: Thursday, December 27, 2012 12:42 PM
To: Peter Sparkes
Subject: Re: Flowscript - delete file

Hi Peter,

PS>  //Delete file
PS>  Packages.java.io.File.xml_file.delete();

Try

xml_file.delete();

You just have to add the full "path" to the class when you construct it. After 
this, the variable contains a reference and you can just use it.

Regards,

  Martin.


Thursday, December 27, 2012, 10:28:31 AM, you wrote:

PS> Hi,

PS> I am trying to delete xml files using the following flowscript:

PS> function deletefile() {

PS>  //file to be deleted
PS>  var file =
PS> Packages.java.lang.String(cocoon.parameters["file"]);

PS>  try {
PS>  // creating a link to the file to be deleted
PS>  var xml_file =
PS> Packages.java.io.File("D:\cocoon-2.1.11-wl\build\webapp\B&B\xml" + file
PS> + ".xml");

PS>  //Delete file
PS>  Packages.java.io.File.xml_file.delete();

PS>  //  .txt file with OK message
PS>  cocoon.sendPage("success.txt", null);
PS>  }
PS>  catch(ex){
PS>  cocoon.log.error(ex);
PS>  // Smth. went wrong. Sending a error.txt file to the browser
PS>cocoon.sendPage("error.txt", null);
PS>  }

PS> }

PS> and get "Compilation produced 1 syntax errors"

PS> The error log contains:

PS> ERROR deletefile.js", line 13: missing name after . 
operator

PS> line 13 is:

PS> Packages.java.io.File.xml_file.delete();

PS> What I am doing wrong?

PS> Peter







-
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: Delete, move or rename files

2012-12-23 Thread Robby Pelssers
Hi Peter,

I don’t have any hands-on experience with 2.1.x anymore.   But did you already 
check this page? http://cocoon.apache.org/2.1/userdocs/concepts/actions.html

And the best way to learn usage would really be to download the Cocoon sources 
and check how other actions work.

Kind regards,
Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Sunday, December 23, 2012 9:42 AM
To: users@cocoon.apache.org
Subject: Re: Delete, move or rename files

Thanks Robby,

On your suggestion I have tried to write an action to delete a file with out 
success.

Please has anyone got an example.

Peter

On 22/12/2012 15:47, Robby Pelssers wrote:
Not sure how you envisualize that?  Of course that is possible.  Any 
application can access the filesystem it is installed on.  So you easily write 
code that will do any of the below operations. But I guess your question is if 
Cocoon does this magically for you?  No.  It might have components like a 
directory generator to easily get information about any folder. But you will 
still need to write actions that can handle delete / move / rename events.

Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Saturday, December 22, 2012 4:44 PM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: Delete, move or rename files

Hi,

Is there anyway of

  1.  deleting,
  2.  moving
  3.  renaming

xml files on the server.

Thanks

Peter



RE: Delete, move or rename files

2012-12-22 Thread Robby Pelssers
Not sure how you envisualize that?  Of course that is possible.  Any 
application can access the filesystem it is installed on.  So you easily write 
code that will do any of the below operations. But I guess your question is if 
Cocoon does this magically for you?  No.  It might have components like a 
directory generator to easily get information about any folder. But you will 
still need to write actions that can handle delete / move / rename events.

Robby

From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Saturday, December 22, 2012 4:44 PM
To: users@cocoon.apache.org
Subject: Delete, move or rename files

Hi,

Is there anyway of

  1.  deleting,
  2.  moving
  3.  renaming

xml files on the server.

Thanks

Peter


RE: Error message for xslt

2012-12-13 Thread Robby Pelssers
Well.

You can easily check if that XSLT uses parameters... right?

And at some point you invoke that transform from the sitemap:

  


  
  


Just check whether you set the parameters correct in your sitemap... and you 
should be able to tell if the values which you set don't have a null value.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, December 13, 2012 5:27 PM
To: users@cocoon.apache.org
Subject: Re: Error message for xslt

I will check again, however for the future, how can I tell if a parameter is 
missing or not set in the XSLT ??


On Thu, Dec 13, 2012 at 10:59 AM, Robby Pelssers  wrote:
> Caused by: java.lang.NullPointerException
>
> Are you setting all parameters used by the XSLT?  Can you verify you do?
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Thursday, December 13, 2012 4:57 PM
> To: users
> Subject: Error message for xslt
>
> I am doing transformation with XSLT and C2.2. When there's something wrong 
> with the XSL, I get the following message:
>
> javax.servlet.ServletException: org.apache.cocoon.ProcessingException:
> Failed to process pipeline
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:37:33
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:31:72
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:29:89
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:27:68
> at 
> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:230)
> at 
> org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at 
> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.
> forward(ServletServiceContext.java:468)
> .
> at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.
> java:450) Caused by: org.apache.cocoon.ProcessingException: Failed to 
> process pipeline
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:37:33
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:31:72
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:29:89
> at  -
> file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:27:68
> at 
> org.apache.cocoon.ProcessingException.throwLocated(ProcessingException
> .java:143)
>
> 
>
> at 
> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
> ... 38 more
> Caused by: java.lang.NullPointerException
> at 
> org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:566)
> at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown 
> Source)
> at org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(Unknown 
> Source)
> at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown 
> Source)
> at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
> at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
> at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
> at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.d
> ispatch(Unknown
> Source)
> at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unk
> nown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
> Source)
> at 
> org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:196)
> at 
> org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:204)
> at 
> org.a

RE: Error message for xslt

2012-12-13 Thread Robby Pelssers
Caused by: java.lang.NullPointerException

Are you setting all parameters used by the XSLT?  Can you verify you do?

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, December 13, 2012 4:57 PM
To: users
Subject: Error message for xslt

I am doing transformation with XSLT and C2.2. When there's something wrong with 
the XSL, I get the following message:

javax.servlet.ServletException: org.apache.cocoon.ProcessingException:
Failed to process pipeline
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:37:33
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:31:72
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:29:89
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:27:68
at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:230)
at 
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
.
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: org.apache.cocoon.ProcessingException: Failed to process pipeline
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:37:33
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:31:72
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:29:89
at  -
file:///C:/workspace/transformation-pipes/pipelines/contents-filesystem/./src/main/resources/COB-INF/sitemap.xmap:27:68
at 
org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)



at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
... 38 more
Caused by: java.lang.NullPointerException
at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:566)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown 
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(Unknown 
Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown 
Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
at 
org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:196)
at 
org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:204)
at 
org.apache.cocoon.components.source.util.SourceUtil.parse(SourceUtil.java:297)
at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:136)
at 
ca.cpha.repo.pipelines.sax.MonographGenerator.generate(MonographGenerator.java:27)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
at $Proxy25.generate(Unknown Source)
at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:360)
... 56 more


Nothing tells me anything about the error message from the XSLT. Is there a way 
to know what is going on ??

Thank you.

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




--

RE: Path selector - Cocoon 2.2.

2012-12-13 Thread Robby Pelssers
All you need is a correct matcher:




   
   


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Wednesday, December 12, 2012 9:42 PM
To: users
Subject: Path selector - Cocoon 2.2.

Hello all,

I am looking to select a path for a directory depending on language prefix. For 
example, let's say I have

C:\repo\english\dir_1

C:\repo\english\dir_2

C:\repo\english\dir_3

C:\repo\english\dir_4


C:\repo\french\dir_1

C:\repo\french\dir_2

C:\repo\french\dir_3

C:\repo\french\dir_4


I have multiple matchers, for different type of documents. For example:


 ..


I would like to turn this into a matcher for both languages with two characters 
representation of the language. For example:

en/doc1/*.xml AND fr/doc1/*.xml

How can I do selection the correct path with this ? In other words, use if else 
? Is there a current selector that helps in this ??

Thank you

-
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



zip-archive generator (reverse of zip-archive serializer)

2012-12-07 Thread Robby Pelssers
Hi guys,

Not sure if we have a zip-archive generator already 
http://cocoon.apache.org/2.1/userdocs/ziparchive-serializer.html

but it would be very cool to have one.  Let me explain the use case:



  
  
   Now a lot of options
- write results to disk 
- just serialize result
- zip transformed files again
 ...


So what should this ziparchive generator do?  It should let us peak into the 
ziparchive and return URI's for all entries

http://apache.org/cocoon/zip-archive/1.0";>
  
  ...
  
   ...


Or

http://apache.org/cocoon/zip-archive/1.0";>
  http://www.mydomain.com/data/productinformation.zip!/products/PH3330L.xml"/>
  ...
  http://www.mydomain.com/data/productinformation.zip!/packages/SOT669.xml
 "/>
   ...



So if you add a transformer in that pipeline you can use the XSLT document 
function to fetch the documents and process them individually.

I'm only not sure about how to implement this efficiently. I  don't want to 
make requests in case of a HTTP URI:
- 1 used by the ziparchive-generator to produce the XML above
- 1 request per invocation of the document function

So maybe caching can resolve this or are there better options?

Robby


RE: using both Xalan and Saxon with C3

2012-12-07 Thread Robby Pelssers
Hi Mansour,

I figured you were going to ask that question. In fact I'd reason the same way. 
Normally I stick with 1 and only one XSLT processor (Saxon) as it implements 
XSLT2.0 while Xalan does not.  But I have a use case where indentation of the 
output is important. Saxon can do this of course but it's only supported in the 
professional edition. 

http://robbypelssers.blogspot.nl/2012/10/indenting-your-xslt-output.html

I tested using @indent with Xalan and it works like a charm.   So if I could 
construct a pipeline (in my case it would be in Java) and add another 
transformer using Xalan to do the indentation, my problem would be solved. 

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Friday, December 07, 2012 1:45 AM
To: users@cocoon.apache.org
Cc: d...@cocoon.apache.org
Subject: Re: using both Xalan and Saxon with C3

Ok, I see what you mean now.

Just out of curiosity, why would anyone need to use more than one xslt 
processor in one application ??

Thank you.

On Thu, Dec 6, 2012 at 2:50 AM, Robby Pelssers  wrote:
> You missed the point Mansour... I meant simultaneously in 1 pipeline.
>
> But thx for thinking along.
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Thursday, December 06, 2012 5:00 AM
> To: users@cocoon.apache.org
> Cc: d...@cocoon.apache.org
> Subject: Re: using both Xalan and Saxon with C3
>
> If I am not wrong, you can always change the implementation for the xslt 
> processor in the final WAR file by setting:
>
> META-INF/services/javax.xml.transform.TransformerFactory
>
> This is simple and clean.
>
>
>
> On Wed, Dec 5, 2012 at 5:21 AM, Robby Pelssers  wrote:
>> I did some investigation into this matter and the problem is in 
>> org.apache.cocoon.sax.component.XSLTTransformer
>>
>> It has two constructor methods:
>>
>> public XSLTTransformer(final URL source) {
>> this(source, null);
>> }
>>
>> And
>>
>> public XSLTTransformer(final URL source, final Map 
>> attributes) {
>> super();
>> this.loadXSLT(source, attributes);
>> }
>>
>> So we can set attributes for the transformerfactory but not choose the 
>> implementation. First of all I see something in the code that makes no sense 
>> to me:
>>
>> /**
>>  * A generic transformer factory to parse XSLTs.
>>  */
>> private static final SAXTransformerFactory TRAX_FACTORY = 
>> createNewSAXTransformerFactory();
>>
>> this always falls back to
>>
>> private static SAXTransformerFactory createNewSAXTransformerFactory() {
>> return (SAXTransformerFactory) TransformerFactory.newInstance();
>> }
>>
>>
>> But on lines 148 to 157 I see following code.  If the attributes are not 
>> null and not empty we STILL use createNewSAXTransformerFactory.  So the else 
>> block seems like a complete waste here?!
>>
>>
>> // XSLT has to be parsed
>> SAXTransformerFactory transformerFactory;
>> if (attributes != null && !attributes.isEmpty()) {
>> transformerFactory = createNewSAXTransformerFactory();
>> for (Entry attribute : 
>> attributes.entrySet()) {
>> transformerFactory.setAttribute(attribute.getKey(), 
>> attribute.getValue());
>> }
>> } else {
>> transformerFactory = TRAX_FACTORY;
>> }
>>
>> Ideally I would like to see a third constructor method which would 
>> allow us to set  the factoryClassName of the 
>> Javax.xml.transform.TransformerFactory
>>
>> And default use:
>>
>> public static TransformerFactory newInstance(String factoryClassName, 
>> ClassLoader classLoader)  throws TransformerFactoryConfigurationError
>>
>> We could from Cocoon side default set this to be 
>> "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl" if the 
>> factoryClassName is null or empty.
>>
>> Just thinking out loud here...
>>
>> Robby
>>
>>
>> -Original Message-
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Tuesday, December 04, 2012 2:21 PM
>> To: d...@cocoon.apache.org; users@cocoon.apache.org
>> Subject: using both Xalan and Saxon with C3
>>
>> Hi guys,
>>
>> Just wondering how I would configure a C3 project so I could use both 
>> Xalan and Saxon from my sitemap and java
>>
>> I currently took the approach to

RE: using both Xalan and Saxon with C3

2012-12-05 Thread Robby Pelssers
You missed the point Mansour... I meant simultaneously in 1 pipeline. 

But thx for thinking along.
Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, December 06, 2012 5:00 AM
To: users@cocoon.apache.org
Cc: d...@cocoon.apache.org
Subject: Re: using both Xalan and Saxon with C3

If I am not wrong, you can always change the implementation for the xslt 
processor in the final WAR file by setting:

META-INF/services/javax.xml.transform.TransformerFactory

This is simple and clean.



On Wed, Dec 5, 2012 at 5:21 AM, Robby Pelssers  wrote:
> I did some investigation into this matter and the problem is in 
> org.apache.cocoon.sax.component.XSLTTransformer
>
> It has two constructor methods:
>
> public XSLTTransformer(final URL source) {
> this(source, null);
> }
>
> And
>
> public XSLTTransformer(final URL source, final Map 
> attributes) {
> super();
> this.loadXSLT(source, attributes);
> }
>
> So we can set attributes for the transformerfactory but not choose the 
> implementation. First of all I see something in the code that makes no sense 
> to me:
>
> /**
>  * A generic transformer factory to parse XSLTs.
>  */
> private static final SAXTransformerFactory TRAX_FACTORY = 
> createNewSAXTransformerFactory();
>
> this always falls back to
>
> private static SAXTransformerFactory createNewSAXTransformerFactory() {
> return (SAXTransformerFactory) TransformerFactory.newInstance();
> }
>
>
> But on lines 148 to 157 I see following code.  If the attributes are not null 
> and not empty we STILL use createNewSAXTransformerFactory.  So the else block 
> seems like a complete waste here?!
>
>
> // XSLT has to be parsed
> SAXTransformerFactory transformerFactory;
> if (attributes != null && !attributes.isEmpty()) {
> transformerFactory = createNewSAXTransformerFactory();
> for (Entry attribute : attributes.entrySet()) 
> {
> transformerFactory.setAttribute(attribute.getKey(), 
> attribute.getValue());
> }
> } else {
> transformerFactory = TRAX_FACTORY;
> }
>
> Ideally I would like to see a third constructor method which would 
> allow us to set  the factoryClassName of the 
> Javax.xml.transform.TransformerFactory
>
> And default use:
>
> public static TransformerFactory newInstance(String factoryClassName, 
> ClassLoader classLoader)  throws TransformerFactoryConfigurationError
>
> We could from Cocoon side default set this to be 
> "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl" if the 
> factoryClassName is null or empty.
>
> Just thinking out loud here...
>
> Robby
>
>
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
> Sent: Tuesday, December 04, 2012 2:21 PM
> To: d...@cocoon.apache.org; users@cocoon.apache.org
> Subject: using both Xalan and Saxon with C3
>
> Hi guys,
>
> Just wondering how I would configure a C3 project so I could use both 
> Xalan and Saxon from my sitemap and java
>
> I currently took the approach to just create a file 
> META-INF/services/javax.xml.transform.TransformerFactory
> With following content:
> net.sf.saxon.TransformerFactoryImpl
>
> But I guess that restricts me to always use Saxon by default?
>
> Robby
>
> -
> 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




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



RE: using both Xalan and Saxon with C3

2012-12-05 Thread Robby Pelssers
I did some investigation into this matter and the problem is in
org.apache.cocoon.sax.component.XSLTTransformer

It has two constructor methods:

public XSLTTransformer(final URL source) {
this(source, null);
}

And

public XSLTTransformer(final URL source, final Map 
attributes) {
super();
this.loadXSLT(source, attributes);
}

So we can set attributes for the transformerfactory but not choose the 
implementation. First of all I see something in the code that makes no sense to 
me:

/**
 * A generic transformer factory to parse XSLTs.
 */
private static final SAXTransformerFactory TRAX_FACTORY = 
createNewSAXTransformerFactory();

this always falls back to  

private static SAXTransformerFactory createNewSAXTransformerFactory() {
return (SAXTransformerFactory) TransformerFactory.newInstance();
}


But on lines 148 to 157 I see following code.  If the attributes are not null 
and not empty we STILL use createNewSAXTransformerFactory.  So the else block 
seems like a complete waste here?!


// XSLT has to be parsed
SAXTransformerFactory transformerFactory;
if (attributes != null && !attributes.isEmpty()) {
transformerFactory = createNewSAXTransformerFactory();
for (Entry attribute : attributes.entrySet()) {
transformerFactory.setAttribute(attribute.getKey(), 
attribute.getValue());
}
} else {
transformerFactory = TRAX_FACTORY;
}

Ideally I would like to see a third constructor method which would allow us to 
set  the factoryClassName of the 
Javax.xml.transform.TransformerFactory

And default use:

public static TransformerFactory newInstance(String factoryClassName, 
ClassLoader classLoader)  throws TransformerFactoryConfigurationError

We could from Cocoon side default set this to be 
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl" if the 
factoryClassName is null or empty.

Just thinking out loud here... 

Robby


-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Tuesday, December 04, 2012 2:21 PM
To: d...@cocoon.apache.org; users@cocoon.apache.org
Subject: using both Xalan and Saxon with C3

Hi guys,

Just wondering how I would configure a C3 project so I could use both Xalan and 
Saxon from my sitemap and java

I currently took the approach to just create a file 
META-INF/services/javax.xml.transform.TransformerFactory
With following content:
net.sf.saxon.TransformerFactoryImpl

But I guess that restricts me to always use Saxon by default?

Robby

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



using both Xalan and Saxon with C3

2012-12-04 Thread Robby Pelssers
Hi guys,

Just wondering how I would configure a C3 project so I could use both Xalan and 
Saxon from my sitemap and java

I currently took the approach to just create a file 
META-INF/services/javax.xml.transform.TransformerFactory 
With following content:
net.sf.saxon.TransformerFactoryImpl

But I guess that restricts me to always use Saxon by default?

Robby

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



RE: Download Zip for processed contents

2012-11-30 Thread Robby Pelssers
Hi Mansour,

I am for simplicity assuming you want to process a batch of files in some 
directory.

http://cocoon.apache.org/2.1/userdocs/directory-generator.html

So the match pattern [listfiles/**] will generate sth like 
http://apache.org/cocoon/directory/2.0";
name="stylesheets" lastModified="1056668768203" date="27.06.03 01:06" 
size="0"
requested="true" sort="name" reverse="false">
  
  
  



So what the pattern [filelist2zip/**] has to produce is sth like below (this 
can be done using XSLT -> filelist2ZipArchive.xslt which you can write in a few 
minutes time)

http://apache.org/cocoon/zip-archive/1.0";>
  
  


So after the transformer has done its work you only need to use the zip 
serializer.

Hope this helps?

Robby


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Friday, November 30, 2012 1:23 PM
To: users@cocoon.apache.org
Subject: Re: Download Zip for processed contents

Robby,
thank you. Can you please explain or give me a hint of what would the output of 
:
look like ??


On Fri, Nov 30, 2012 at 4:01 AM, Robby Pelssers  wrote:
> Of course there is Mansour.
>
> You first need to define a pipeline that will dynamically generate the below 
> zip:archive document. If that is based on processing files from some 
> directory you could potentially first use the directory generator to list the 
> files in XML directory representation. But in fact you should think the other 
> way around:
>
> Next you transform that XML directory representation to the one below.
>
> From a sitemap point of view:
>
>   pattern="listfiles/**">
>Use directory generator
> 
>
>   pattern="filelist2zip/**">
>
>
>
> 
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Friday, November 30, 2012 4:49 AM
> To: users
> Subject: Download Zip for processed contents
>
> I have multiple matchers, that do transformation for many documents, I am 
> wondering if there's a way to download the whole processed contents.
> I know there's a directory generator, but this will generate listing 
> for the files, and will not be able to invoke the processing. For
> example:
>
> http://apache.org/cocoon/zip-archive/1.0";>
>   
>   
>   
>src="cocoon://documents-1/004.html"/>
> ...
>  src="cocoon://documents-1/999.html"/>
>
> 
>   
> .
> 
>
>
> Thank you.
>
> -
> 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
>

-
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: CForms

2012-11-30 Thread Robby Pelssers
Did you already debug what you received back on the server side?  I’m 
interesting what value the form posts to the server.

http://cocoon.apache.org/2.1/apidocs/index.html?overview-summary.html

I would put a breakpoint on 
setValue(Object
 newValue)

I think you can set it in 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/formmodel/AbstractWidget.html

Robby



From: Peter Sparkes [mailto:pe...@didm.co.uk]
Sent: Friday, November 30, 2012 7:33 AM
To: users
Subject: CForms 

CForms with 2.1.11 cocoon.

I have a field widget with datatype string:


   


which is bound to a para in the  source document. Some paras contain  
elements.

On loading a document in the CForm the   disappears, so on submitting the 
CForm the resulting saved xml does not contain the 

Please, how can I preserve the 

Thank you

Peter


RE: Download Zip for processed contents

2012-11-30 Thread Robby Pelssers
Of course there is Mansour.

You first need to define a pipeline that will dynamically generate the below 
zip:archive document. If that is based on processing files from some directory 
you could potentially first use the directory generator to list the files in 
XML directory representation. But in fact you should think the other way around:

Next you transform that XML directory representation to the one below.

>From a sitemap point of view:



   Use directory generator




   
   
   


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Friday, November 30, 2012 4:49 AM
To: users
Subject: Download Zip for processed contents

I have multiple matchers, that do transformation for many documents, I am 
wondering if there's a way to download the whole processed contents.
I know there's a directory generator, but this will generate listing for the 
files, and will not be able to invoke the processing. For
example:

http://apache.org/cocoon/zip-archive/1.0";>
  
  
  
  
...



  
.



Thank you.

-
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



keep running into issue while commiting [the specified baseline is not the latest baseline]

2012-11-28 Thread Robby Pelssers
http://www.apache.org/dev/version-control.html#latest-baseline

I tried several times to commit the patch for [COCOON3-114] but with no success 
so far.

Anyone experiencing similar issues?

Robby



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



RE: XInclude in sitemap.xmap

2012-11-20 Thread Robby Pelssers
If you paid careful attention to my mail... I mimicked exactly that use case. 
See below

>> Next I setup the exact same pipeline in the sample block:
>>
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> No issues here.
>>

Like I said..  you should isolate this problem to a minimalistic failing use 
case and show how I can reproduce it.  Now I have nothing concrete to go on. So 
I need a sitemap match pattern.. and preferably you can copy-paste the content 
of the input file and transformer.  

Robby 



-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Tuesday, November 20, 2012 2:41 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

Robby,
The serializer removes the extra xi:xmlns. However when you apply another 
transformation immediately after the xinclude you may get this error. Please 
try to do apply any transformation, and let me know if you are able to 
regenerate the issue.


On Tue, Nov 20, 2012 at 3:31 AM, Robby Pelssers  wrote:
> Hi Mansour,
>
> You again leave out the important bit that failed.  I still am not sure why 
> your test failed. If you look in the 
> cocoon-sample/COB-INF/aggregation/xinclude.xml you will see a file like this. 
> It could as well have declared the namespace on the root or any parent node.
>
>  
>   
> http://www.w3.org/2001/XInclude"; 
> href="servlet:/aggregation/sub-request"/>
>   
>   
> http://www.w3.org/2001/XInclude"; 
> href="aggregation/sub.xml"/>
>   
> 
>
>   xmlns:xi="http://www.w3.org/2001/XInclude";>
>   
> 
>   
>   
> 
>   
> 
>
> So please specify exactly what your input looks like. I want to understand if 
> you made a mistake or you spotted another potential bug.
>
> Robby
>
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Tuesday, November 20, 2012 6:47 AM
> To: users@cocoon.apache.org
> Subject: Re: XInclude in sitemap.xmap
>
> Thank you Robby. I think I found the issue. I have this in my document:
>
> 
>  xmlns:xi="http://www.w3.org/2001/XInclude"/>
> 
>
> Which is generating the issue.
> When I replace it with:
>
> 
> 
> 
>
> Everything works fine. This is strange because having an xmlns:xi shouldn't 
> cause this.
> Any way it's working now.
>
> Thank you.
>
>
> On Thu, Nov 15, 2012 at 3:40 AM, Robby Pelssers  
> wrote:
>> First I downloaded the result of invoking this unmodified pipeline.
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> No namespace garbage left so XIncludeTransformer seems to work fine:
>>  
>>   
>> sub
>>   
>>   
>> sub
>>   
>> 
>>
>> Next I setup the exact same pipeline in the sample block:
>>
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> No issues here.
>>
>> And just to make sure that identity.xslt was actually used I slightly 
>> modified it  > version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>> xmlns:xi="http://www.w3.org/2001/XInclude";>
>>
>>
>> 
>>   sub replaced
>> 
>>
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Now the result becomes:
>> 
>>   
>> http://www.w3.org/2001/XInclude";>sub replaced
>>   
>>   
>> sub
>>   
>> 
>>
>>
>> But one might wonder why you left in the xi namespace in the first place. So 
>> next I removed that namespace from the xslt.
>>
>>  
>>   
>> sub replaced
>>   
>>   
>> sub
>>   
>> 
>>
>> So  I think you might recheck if you're not doing some exotic stuff 
>> which you forgot to mention.
>>
>> Robby
>>
>> -Original Message-
>> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
>> Sent: Thursday, November 15, 2012 1:51 AM
>> To: users@cocoon.apache.org
>> Subject: Re: XInclude in sitemap.xmap
>>
>> One additional problem. This is not related to the property resolution, but 
>> to the XInclude. After I process xinclude, if I appl

RE: XInclude in sitemap.xmap

2012-11-20 Thread Robby Pelssers
Hi Mansour,

You again leave out the important bit that failed.  I still am not sure why 
your test failed. If you look in the 
cocoon-sample/COB-INF/aggregation/xinclude.xml you will see a file like this. 
It could as well have declared the namespace on the root or any parent node.



  
http://www.w3.org/2001/XInclude"; 
href="servlet:/aggregation/sub-request"/>
  
  
http://www.w3.org/2001/XInclude"; 
href="aggregation/sub.xml"/>
  



http://www.w3.org/2001/XInclude";>
  

  
  

  


So please specify exactly what your input looks like. I want to understand if 
you made a mistake or you spotted another potential bug.

Robby


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Tuesday, November 20, 2012 6:47 AM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

Thank you Robby. I think I found the issue. I have this in my document:


http://www.w3.org/2001/XInclude"/>


Which is generating the issue.
When I replace it with:





Everything works fine. This is strange because having an xmlns:xi shouldn't 
cause this.
Any way it's working now.

Thank you.


On Thu, Nov 15, 2012 at 3:40 AM, Robby Pelssers  wrote:
> First I downloaded the result of invoking this unmodified pipeline.
>   
> 
> 
> 
> 
> 
>   
>
> No namespace garbage left so XIncludeTransformer seems to work fine:
>  
>   
> sub
>   
>   
> sub
>   
> 
>
> Next I setup the exact same pipeline in the sample block:
>
>   
> 
> 
> 
> 
> 
> 
>   
>
> No issues here.
>
> And just to make sure that identity.xslt was actually used I slightly 
> modified it   version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:xi="http://www.w3.org/2001/XInclude";>
>
>
> 
>   sub replaced
> 
>
>
> 
> 
> 
> 
> 
> 
>
> Now the result becomes:
> 
>   
> http://www.w3.org/2001/XInclude";>sub replaced
>   
>   
> sub
>   
> 
>
>
> But one might wonder why you left in the xi namespace in the first place. So 
> next I removed that namespace from the xslt.
>
>  
>   
> sub replaced
>   
>   
> sub
>   
> 
>
> So  I think you might recheck if you're not doing some exotic stuff which 
> you forgot to mention.
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Thursday, November 15, 2012 1:51 AM
> To: users@cocoon.apache.org
> Subject: Re: XInclude in sitemap.xmap
>
> One additional problem. This is not related to the property resolution, but 
> to the XInclude. After I process xinclude, if I apply another transformation, 
> I get an error:
> Caused by: org.xml.sax.SAXException: Namespace for prefix 'xi' not found.
> at 
> org.apache.cocoon.sax.AbstractSAXTransformer.endPrefixMapping(Abstract
> SAXTransformer.java:79) 
> ~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
> at 
> org.apache.cocoon.sax.component.XIncludeTransformer.endPrefixMapping(X
> IncludeTransformer.java:515) 
> ~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
>
>
> The transformation can be any thing simple. Identity transformation will 
> cause this issue as well. Here's the transformation I am applying after the 
> xinclude:
>
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:xi="http://www.w3.org/2001/XInclude";>
>   
> 
>   
> 
>   
> 
>
>
> And here is the sitemap:
>
> 
>  src="{global:base.repo.path}/articles/{map:id}/index.xml" />
> 
> 
>  value="file:///home/mansour/workspace/pipelines/repo/articles/example/"
> />
> 
>     
> 
> 
>
>
> If I remove the identity.xsl step, then things works fine.
> I am not sure how to solve this issue, but I think I can use two  one 
> for each step. However, knowing that cocoon applies xslt in a pipeline 
> without additional tweaks, should allow me to directly process the stream 
> with identity.xsl.
>
> Thank you.
>
> On Wed, Nov 14, 2012 at 7:39 

RE: JXTemplate question

2012-11-16 Thread Robby Pelssers
What is the actual value of inneritem?  A tag? And yes... using XSLT this would 
have been a breeze ;-)

But maybe you use the wrong xpath expression?  I'm not sure what the binding 
returns. 

Suppose your current xpath looks like

/root/tagname

Give following a try
/root/tagname/text()
/root/tagname/node()

Robby




-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Friday, November 16, 2012 2:33 PM
To: users@cocoon.apache.org
Subject: JXTemplate question


 Can you help me out with this.

 This works:
 

 This doesn't
 #{$inneritem}

 Or it does actually work, but the result in a) is "xxx" and in b)  
xxx

 What I am doing this template is to create an html page out of xml  derived 
from CForms binding. Guess this would have been easier with  XSL..
 So the idea is to initialize form controls with values from XML  elements, not 
with the whole XML elements.

 - mika -

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




RE: XInclude in sitemap.xmap

2012-11-15 Thread Robby Pelssers
First I downloaded the result of invoking this unmodified pipeline.
  





  

No namespace garbage left so XIncludeTransformer seems to work fine:


  
sub
  
  
sub
  


Next I setup the exact same pipeline in the sample block:

  






  

No issues here.

And just to make sure that identity.xslt was actually used I slightly modified 
it

http://www.w3.org/1999/XSL/Transform";
xmlns:xi="http://www.w3.org/2001/XInclude";>



  sub replaced










Now the result becomes:

  
http://www.w3.org/2001/XInclude";>sub replaced
  
  
sub
  



But one might wonder why you left in the xi namespace in the first place. So 
next I removed that namespace from the xslt.



  
sub replaced
  
  
sub
  


So  I think you might recheck if you're not doing some exotic stuff which 
you forgot to mention.  

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, November 15, 2012 1:51 AM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

One additional problem. This is not related to the property resolution, but to 
the XInclude. After I process xinclude, if I apply another transformation, I 
get an error:
Caused by: org.xml.sax.SAXException: Namespace for prefix 'xi' not found.
at 
org.apache.cocoon.sax.AbstractSAXTransformer.endPrefixMapping(AbstractSAXTransformer.java:79)
~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sax.component.XIncludeTransformer.endPrefixMapping(XIncludeTransformer.java:515)
~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]


The transformation can be any thing simple. Identity transformation will cause 
this issue as well. Here's the transformation I am applying after the xinclude:


http://www.w3.org/1999/XSL/Transform";
xmlns:xi="http://www.w3.org/2001/XInclude";>
  

  

  



And here is the sitemap:












If I remove the identity.xsl step, then things works fine.
I am not sure how to solve this issue, but I think I can use two  one 
for each step. However, knowing that cocoon applies xslt in a pipeline without 
additional tweaks, should allow me to directly process the stream with 
identity.xsl.

Thank you.

On Wed, Nov 14, 2012 at 7:39 PM, Mansour Al Akeel  
wrote:
> Robby, thank you for taking care of this issue.
>
>
>
> On Wed, Nov 14, 2012 at 12:11 PM, Robby Pelssers  
> wrote:
>> I'm closing in on finding the issue but not sure if I can fix it this week.
>>
>> Test 1:  Use {global:propertyName} in @src of a generator works fine
>> -
>>
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> Test2: Use {global:propertyName} in the @value of a parameter does 
>> not seem to work
>> 
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>>
>> The real magic happens in org.apache.cocoon.sitemap.InvocationImpl
>>
>> public Object resolveParameter(final String parameter) {
>>    ....
>> }
>>
>> But I think that method is not called for evaluating @value of a 
>> .
>>
>> If anyone can fix this today.. be my guest.  Otherwise I will take another 
>> look this week (latest this weekend).
>>
>> Robby
>>
>> -Original Message-
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Wednesday, November 14, 2012 5:38 PM
>> To: users@cocoon.apache.org
>> Subject: RE: XInclude in sitemap.xmap
>>
>> The solution you're looking for resides in using a LanguageInterpreter.
>>
>> Cocoon already has a few implementations:
>> - org.apache.cocoon.sitemap.expression.SettingsInterpreter  (works 
>> together with cocoon-spring-configurator)
>> - org.apache.cocoon.sitemap.expression.JexlLanguageInterpreter
>> - org.apache.cocoon.sitemap.expression.SitemapLanguageInterpreter
>>
>> http://cocoon.apache.org/3.0/apidocs/index.html
>>
>> In cocoon-expression-language.xml these are configured as beans. You see 
>> that the last part after the colon is the prefix you can use in a sitemap.  
>> I think you should just

RE: XInclude in sitemap.xmap

2012-11-15 Thread Robby Pelssers
Ok... my first impression would be that the XIncludeTransformer leaves an 
unwanted default namespace xi after inclusion.  I will debug and see what's 
happening.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, November 15, 2012 1:51 AM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

One additional problem. This is not related to the property resolution, but to 
the XInclude. After I process xinclude, if I apply another transformation, I 
get an error:
Caused by: org.xml.sax.SAXException: Namespace for prefix 'xi' not found.
at 
org.apache.cocoon.sax.AbstractSAXTransformer.endPrefixMapping(AbstractSAXTransformer.java:79)
~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.sax.component.XIncludeTransformer.endPrefixMapping(XIncludeTransformer.java:515)
~[cocoon-sax-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]


The transformation can be any thing simple. Identity transformation will cause 
this issue as well. Here's the transformation I am applying after the xinclude:


http://www.w3.org/1999/XSL/Transform";
xmlns:xi="http://www.w3.org/2001/XInclude";>
  

  

  



And here is the sitemap:












If I remove the identity.xsl step, then things works fine.
I am not sure how to solve this issue, but I think I can use two  one 
for each step. However, knowing that cocoon applies xslt in a pipeline without 
additional tweaks, should allow me to directly process the stream with 
identity.xsl.

Thank you.

On Wed, Nov 14, 2012 at 7:39 PM, Mansour Al Akeel  
wrote:
> Robby, thank you for taking care of this issue.
>
>
>
> On Wed, Nov 14, 2012 at 12:11 PM, Robby Pelssers  
> wrote:
>> I'm closing in on finding the issue but not sure if I can fix it this week.
>>
>> Test 1:  Use {global:propertyName} in @src of a generator works fine
>> -
>>
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> Test2: Use {global:propertyName} in the @value of a parameter does 
>> not seem to work
>> 
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>>
>> The real magic happens in org.apache.cocoon.sitemap.InvocationImpl
>>
>> public Object resolveParameter(final String parameter) {
>>
>> }
>>
>> But I think that method is not called for evaluating @value of a 
>> .
>>
>> If anyone can fix this today.. be my guest.  Otherwise I will take another 
>> look this week (latest this weekend).
>>
>> Robby
>>
>> -Original Message-
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Wednesday, November 14, 2012 5:38 PM
>> To: users@cocoon.apache.org
>> Subject: RE: XInclude in sitemap.xmap
>>
>> The solution you're looking for resides in using a LanguageInterpreter.
>>
>> Cocoon already has a few implementations:
>> - org.apache.cocoon.sitemap.expression.SettingsInterpreter  (works 
>> together with cocoon-spring-configurator)
>> - org.apache.cocoon.sitemap.expression.JexlLanguageInterpreter
>> - org.apache.cocoon.sitemap.expression.SitemapLanguageInterpreter
>>
>> http://cocoon.apache.org/3.0/apidocs/index.html
>>
>> In cocoon-expression-language.xml these are configured as beans. You see 
>> that the last part after the colon is the prefix you can use in a sitemap.  
>> I think you should just use the SettingsInterpreter in your case.  It's the 
>> default way to access properties.
>>
>>
>>
>> http://www.springframework.org/schema/beans"; 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>   xsi:schemaLocation="http://www.springframework.org/schema/beans 
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>
>>
>>   > name="org.apache.cocoon.sitemap.expression.LanguageInterpreterFactory"
>> 
>> class="org.apache.cocoon.sitemap.expression.PrototypeLanguageInterpre
>> terFactory" />
>>
>>   > class="org.apache.cocoon.sitemap.expression.SitemapLanguageInterprete
>> r" />
>>
>>   > class="org.apache.cocoon.sitemap.expression.JexlLanguageInterpreter

RE: XInclude in sitemap.xmap

2012-11-14 Thread Robby Pelssers
I'm closing in on finding the issue but not sure if I can fix it this week.

Test 1:  Use {global:propertyName} in @src of a generator works fine
-

  





  

Test2: Use {global:propertyName} in the @value of a parameter does not seem to 
work

  






  


The real magic happens in org.apache.cocoon.sitemap.InvocationImpl 

public Object resolveParameter(final String parameter) {
   
}

But I think that method is not called for evaluating @value of a 
.

If anyone can fix this today.. be my guest.  Otherwise I will take another look 
this week (latest this weekend).

Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Wednesday, November 14, 2012 5:38 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

The solution you're looking for resides in using a LanguageInterpreter.

Cocoon already has a few implementations:
- org.apache.cocoon.sitemap.expression.SettingsInterpreter  (works together 
with cocoon-spring-configurator)
- org.apache.cocoon.sitemap.expression.JexlLanguageInterpreter
- org.apache.cocoon.sitemap.expression.SitemapLanguageInterpreter

http://cocoon.apache.org/3.0/apidocs/index.html

In cocoon-expression-language.xml these are configured as beans. You see that 
the last part after the colon is the prefix you can use in a sitemap.  I think 
you should just use the SettingsInterpreter in your case.  It's the default way 
to access properties.



http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>

  

  
  
  
  
  



Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Wednesday, November 14, 2012 5:18 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

I did a little test myself and by the looks of it it's not supported.  







I hacked a bit in the cocoon-sample project and invoked this url:

http://localhost:/aggregation/xinclude-transformer?subfolder=tmp



In that case I get a nice XML exception page with following message:
c:\{request-param:subfolder}\xinclude\testinclude.xml (The filename, 
directory name, or volume label syntax is incorrect)

This means... that input modules are not supported yet. Will be interesting to 
see if we plan to support this in C3.  But this would work in C2.2 as I've used 
inputmodules quite a lot.

Robby


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Wednesday, November 14, 2012 4:09 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I am using 3.0.0-beta-1-SNAPSHOT built from trunk. Here's my sitemap:

 
  









Here's part of the document:

Another Example using xinclude:
===

http://www.w3.org/2001/XInclude"/>


Here's the log:
15:04:37.529 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=516462290
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=834671663)
15:04:37.530 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=2115562712
key=[TimestampCacheKey(hashCode=2006330189
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352905028000 (2012-11-14 14:57:08.0)),
CachedCacheKey(hashCode=772251321
internalCacheKey=ObjectCacheKey(hashCode=686698957
obj=article/example.xml)
cachedCacheKey=org.apache.cocoon.pipeline.caching.InvalidCacheKey@b78a1f0d),
ParameterCacheKey(hashCode=516462290 parameters={encoding=UTF-8,
method=xml})]) for pipeline CachingPipeline(hashCode=1875503051
components=[XMLGenerator(hashCode=437776393
internalGenerator=URLGenerator(hashCode=333002925
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml)),
XIncludeTransformer(hashCode=1313024268
baseUrl=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/{global:base.repo.path}/articles/{map:id}/),
XMLSerializer(hashCode=834671663)])
15:04:37.530 [btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Going to 
send NOT MODIFIED response: statusCode=304, lastModified=-1 15:04:37.530 
[btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Sitemap execution for 
/article/example.xml took 195.35498 ms.

The variables are matching t

RE: XInclude in sitemap.xmap

2012-11-14 Thread Robby Pelssers
The solution you're looking for resides in using a LanguageInterpreter.

Cocoon already has a few implementations:
- org.apache.cocoon.sitemap.expression.SettingsInterpreter  (works together 
with cocoon-spring-configurator)
- org.apache.cocoon.sitemap.expression.JexlLanguageInterpreter
- org.apache.cocoon.sitemap.expression.SitemapLanguageInterpreter

http://cocoon.apache.org/3.0/apidocs/index.html

In cocoon-expression-language.xml these are configured as beans. You see that 
the last part after the colon is the prefix you can use in a sitemap.  I think 
you should just use the SettingsInterpreter in your case.  It's the default way 
to access properties.



http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>

  

  
  
  
  
  



Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Wednesday, November 14, 2012 5:18 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

I did a little test myself and by the looks of it it's not supported.  







I hacked a bit in the cocoon-sample project and invoked this url:

http://localhost:/aggregation/xinclude-transformer?subfolder=tmp



In that case I get a nice XML exception page with following message:
c:\{request-param:subfolder}\xinclude\testinclude.xml (The filename, 
directory name, or volume label syntax is incorrect)

This means... that input modules are not supported yet. Will be interesting to 
see if we plan to support this in C3.  But this would work in C2.2 as I've used 
inputmodules quite a lot.

Robby


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Wednesday, November 14, 2012 4:09 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I am using 3.0.0-beta-1-SNAPSHOT built from trunk. Here's my sitemap:

 
  









Here's part of the document:

Another Example using xinclude:
===

http://www.w3.org/2001/XInclude"/>


Here's the log:
15:04:37.529 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=516462290
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=834671663)
15:04:37.530 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=2115562712
key=[TimestampCacheKey(hashCode=2006330189
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352905028000 (2012-11-14 14:57:08.0)),
CachedCacheKey(hashCode=772251321
internalCacheKey=ObjectCacheKey(hashCode=686698957
obj=article/example.xml)
cachedCacheKey=org.apache.cocoon.pipeline.caching.InvalidCacheKey@b78a1f0d),
ParameterCacheKey(hashCode=516462290 parameters={encoding=UTF-8,
method=xml})]) for pipeline CachingPipeline(hashCode=1875503051
components=[XMLGenerator(hashCode=437776393
internalGenerator=URLGenerator(hashCode=333002925
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml)),
XIncludeTransformer(hashCode=1313024268
baseUrl=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/{global:base.repo.path}/articles/{map:id}/),
XMLSerializer(hashCode=834671663)])
15:04:37.530 [btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Going to 
send NOT MODIFIED response: statusCode=304, lastModified=-1 15:04:37.530 
[btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Sitemap execution for 
/article/example.xml took 195.35498 ms.

The variables are matching the correct document, and it's served correctly, but 
without xincludes being processed.



On Wed, Nov 14, 2012 at 6:54 AM, Robby Pelssers  wrote:
> I think you will need to paste the complete sitemap to get more insight into 
> your issue.  Can you please specify which version of Cocoon you're using per 
> question.. even if repeated. I really need to know the context as some things 
> might work differently between versions.
>
> I don't exactly remember why you used an input module. In C2.2 I use 
> properties in combination with both the cocoon-spring-configurator to
> - set bean property values in the application context files
> - use them directly in my sitemap using ${propertyName}
>
>
>
>   
> 
> 
>value="${exportFolder}/{1}/merged"/>
> 
> 
>   
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Wednesday, November 14, 2012

RE: XInclude in sitemap.xmap

2012-11-14 Thread Robby Pelssers
I did a little test myself and by the looks of it it's not supported.  







I hacked a bit in the cocoon-sample project and invoked this url:

http://localhost:/aggregation/xinclude-transformer?subfolder=tmp



In that case I get a nice XML exception page with following message:
c:\{request-param:subfolder}\xinclude\testinclude.xml (The filename, 
directory name, or volume label syntax is incorrect)

This means... that input modules are not supported yet. Will be interesting to 
see if we plan to support this in C3.  But this would work in C2.2 as I've used 
inputmodules quite a lot.

Robby


-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Wednesday, November 14, 2012 4:09 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I am using 3.0.0-beta-1-SNAPSHOT built from trunk. Here's my sitemap:

 
  









Here's part of the document:

Another Example using xinclude:
===

http://www.w3.org/2001/XInclude"/>


Here's the log:
15:04:37.529 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=516462290
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=834671663)
15:04:37.530 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=2115562712
key=[TimestampCacheKey(hashCode=2006330189
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352905028000 (2012-11-14 14:57:08.0)),
CachedCacheKey(hashCode=772251321
internalCacheKey=ObjectCacheKey(hashCode=686698957
obj=article/example.xml)
cachedCacheKey=org.apache.cocoon.pipeline.caching.InvalidCacheKey@b78a1f0d),
ParameterCacheKey(hashCode=516462290 parameters={encoding=UTF-8,
method=xml})]) for pipeline CachingPipeline(hashCode=1875503051
components=[XMLGenerator(hashCode=437776393
internalGenerator=URLGenerator(hashCode=333002925
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml)),
XIncludeTransformer(hashCode=1313024268
baseUrl=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/{global:base.repo.path}/articles/{map:id}/),
XMLSerializer(hashCode=834671663)])
15:04:37.530 [btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Going to 
send NOT MODIFIED response: statusCode=304, lastModified=-1 15:04:37.530 
[btpool0-1] INFO  o.a.cocoon.servlet.RequestProcessor - Sitemap execution for 
/article/example.xml took 195.35498 ms.

The variables are matching the correct document, and it's served correctly, but 
without xincludes being processed.



On Wed, Nov 14, 2012 at 6:54 AM, Robby Pelssers  wrote:
> I think you will need to paste the complete sitemap to get more insight into 
> your issue.  Can you please specify which version of Cocoon you're using per 
> question.. even if repeated. I really need to know the context as some things 
> might work differently between versions.
>
> I don't exactly remember why you used an input module. In C2.2 I use 
> properties in combination with both the cocoon-spring-configurator to
> - set bean property values in the application context files
> - use them directly in my sitemap using ${propertyName}
>
>
>
>   
> 
> 
>value="${exportFolder}/{1}/merged"/>
> 
> 
>   
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Wednesday, November 14, 2012 6:40 AM
> To: users@cocoon.apache.org
> Subject: Re: XInclude in sitemap.xmap
>
> Thank you both for helping.
> Robby,
> this is the message I am getting now.
> 05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - 
> Adding component XMLSerializer(hashCode=306853147) to pipeline
> [CachingPipeline(hashCode=1346781896
> components=[XMLGenerator(hashCode=1918414275
> internalGenerator=URLGenerator(hashCode=1966798757
> source=file:/home/mansour/workspace/pipelines/repo/articles/example/in
> dex.xml)), XIncludeTransformer(hashCode=950275600
> baseUrl=file:/{global:base.repo.path}/articles/{map:id}/)])].
> 05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - 
> Going to link the component XMLGenerator(hashCode=1918414275
> internalGenerator=URLGenerator(hashCode=1966798757
> source=file:/home/mansour/workspace/pipelines/repo/articles/example/in
> dex.xml)) with XIncludeTransformer(hashCode=950275600
> baseUrl=file:/{global:base.repo.path}/articles/{map:id}/).
> 05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - 
> Going to l

RE: Trouble with disable-output-escaping

2012-11-14 Thread Robby Pelssers
Lol... Ok... I had similar issues and one way I solved this issue is by just 
wrapping that content in a special custom tag.  In the last XSLT I matched on 
that tag and used disable-output-escaping.


http://robbypelssers.blogspot.nl/2009/06/escaping-html-with-xslt.html


Let's see if that's worth a beer ;-)

Cheers,
Robby

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, November 14, 2012 5:03 PM
To: users@cocoon.apache.org
Subject: Re: Trouble with disable-output-escaping

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robby,

On 11/13/12 1:41 PM, Robby Pelssers wrote:
> Allright...
> 
> You should reminder this tip.  It will only work if you do this in the 
> very last transformer right before calling the serializer.

Okay, since I have a number of transform operations, I'll have to do some fancy 
footwork. Would this work?

>  
> 
> 
> 
> 
> 
> 
> 
>   src="the-transformer-in-question.xsl" />

In the above XSL, add an attribute (or element) to the text I want to un-escape.

> 
> 
>   />

Here, I could modify the strip-namespace.xsl to also find anything wrapped in 
the special un-escapify element (or with a similar
attribute) and use disable-output-escaping="yes" here?

>  

> You owe me a beer ;-)

Not quite yet: I haven't got this sorted, yet. I'll buy you one if you are 
going to attend ApacheCon NA 2013.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCjwM8ACgkQ9CaO5/Lv0PBIkwCcC6NGOvLl1Qc15mrZDMk5iuGg
noQAn0MFKEzBAcXNu63J1MXHGp7Kwths
=kyBO
-END PGP SIGNATURE-

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




RE: XInclude in sitemap.xmap

2012-11-14 Thread Robby Pelssers
I think you will need to paste the complete sitemap to get more insight into 
your issue.  Can you please specify which version of Cocoon you're using per 
question.. even if repeated. I really need to know the context as some things 
might work differently between versions.

I don't exactly remember why you used an input module. In C2.2 I use properties 
in combination with both the cocoon-spring-configurator to 
- set bean property values in the application context files
- use them directly in my sitemap using ${propertyName}



  


  


  

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Wednesday, November 14, 2012 6:40 AM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

Thank you both for helping.
Robby,
this is the message I am getting now.
05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Adding 
component XMLSerializer(hashCode=306853147) to pipeline
[CachingPipeline(hashCode=1346781896
components=[XMLGenerator(hashCode=1918414275
internalGenerator=URLGenerator(hashCode=1966798757
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml)),
XIncludeTransformer(hashCode=950275600
baseUrl=file:/{global:base.repo.path}/articles/{map:id}/)])].
05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XMLGenerator(hashCode=1918414275
internalGenerator=URLGenerator(hashCode=1966798757
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml))
with XIncludeTransformer(hashCode=950275600
baseUrl=file:/{global:base.repo.path}/articles/{map:id}/).
05:35:08.304 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XIncludeTransformer(hashCode=950275600
baseUrl=file:/{global:base.repo.path}/articles/{map:id}/) with 
XMLSerializer(hashCode=306853147).

It looks like the baseUrl is not being resolved with the input modules. For 
example:

baseUrl=file:/{global:base.repo.path}/articles/{map:id}/

Your efforts is highly appreciated.
Thank you.


On Tue, Nov 13, 2012 at 10:43 AM, Francesco Chicchiriccò  
wrote:
> On 13/11/2012 16:33, Robby Pelssers wrote:
>> Ok..
>>
>> I fixed the issue:
>>
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> Works now.
>>
>> I committed the fix to Cocoon3 trunk.
>
> Hi Robby,
> thank you for taking care of this: just tested your fix and the build 
> runs fine.
>
> For records, could you please file an issue on JIRA (COCOON3), add 
> your fix revision number as comment and then close it?
> Thanks.
>
> Regards.
>
>> -Original Message-
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Tuesday, November 13, 2012 2:49 PM
>> To: users@cocoon.apache.org
>> Subject: RE: XInclude in sitemap.xmap
>>
>> Ok... I found the problem.
>>
>> Inside org.apache.cocoon.sitemap.node.AbstractSitemapNode the baseUrl is 
>> overridden, although it correctly receives the baseUrl.
>>
>> invocationParams = {
>> baseUrl=file:///c:/tmp/
>> cacheKey={map:0}
>> test=hello world
>> }
>>
>>
>> protected InvocationResult invoke(final String src, final String 
>> type,  final Invocation invocation) {
>>
>>     ....
>> // set the baseUrl  PROBLEMATIC PART
>> invocationParams.put("baseUrl", invocation.resolve(""));
>>
>> }
>>
>>
>> But before starting making changes... this might need careful attention.
>>
>> Robby
>>
>>
>> -Original Message-
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Tuesday, November 13, 2012 2:32 PM
>> To: users@cocoon.apache.org
>> Subject: RE: XInclude in sitemap.xmap
>>
>> I'm debugging your issue and so far I'm pretty bedazzled about what the hell 
>> is going on:
>>
>>   
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>   >
>> While debugging I see following Configuration -> Map
>>
>> baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample
>> /./src/main/resources/COB-INF/ 
>> cacheKey=aggregation/xinclude-transformer
>> test=hello world
>>
>> Will keep you posted.. Maybe the baseUrl is somewhere overridden while 
>> setting up the pipeline? Anyone who can tell this?
>>
>> Robby
>>
>> -Original Message-
>> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com

RE: Trouble with disable-output-escaping

2012-11-13 Thread Robby Pelssers
Allright...

You should reminder this tip.  It will only work if you do this in the very 
last transformer right before calling the serializer.

You owe me a beer ;-)

Robby

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, November 13, 2012 7:39 PM
To: users@cocoon.apache.org
Subject: Trouble with disable-output-escaping

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I'm running Cocoon 2.1.11 on Oracle Java 1.6.0_26. I'm using the default Xalan 
2.7.1 XSLT processor.

All examples are roughly mocked-up from a much more complicated configuration 
so I apologize if there are typos, etc. -- I hand-typed this message with no 
copy/paste.

I have some text data wrapped-up in XML like this:


  
There is HTML text in here.
  


I'd like to spit-out that text as if it were HTML -- that is, without escaping 
it on output. I would like to get this text output:

There is HTML in here.

But instead I get this:

There is HTML text in here.

Which, of course, is no surprise given no other instructions.

So I tried using disable-output-escaping, which seems uniquely-suited for this 
purpose:


   

I observe no change in the output. The XSL file has definitely been re-read 
from the disk (I made other changes so I could verify at least that much), so 
that's not an issue.

Here's my (rough) configuration:

sitemap:

  

  

  

  

  
  

  

  
  
  


My template header:

http://www.w3.org/1999/XSL/Transform";
xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
xmlns:cinclude="http://apache.org/cocoon/include/1.0";
xmlns:java="http://xml.apache.org/xalan/java";
> 
 ...

My understanding is that Xalan itself does support disable-output-escaping, and 
I can't see why Cocoon would interfere with that.

Am I trying to use disable-output-escaping incorrectly? Do I need to run Cocoon 
(or Xalan) in any special mode or with any particular settings in order to 
enable disable-output-escaping?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCik6cACgkQ9CaO5/Lv0PAqZgCeIX65HKLVa6rEe6TnL65wEdoi
48gAmgJfBNT+082ehqg7DhduZtEg/4RV
=l8ul
-END PGP SIGNATURE-

-
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: XInclude in sitemap.xmap

2012-11-13 Thread Robby Pelssers
Ok..

I fixed the issue:

  







  

Works now.

I committed the fix to Cocoon3 trunk.

Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Tuesday, November 13, 2012 2:49 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

Ok... I found the problem.

Inside org.apache.cocoon.sitemap.node.AbstractSitemapNode the baseUrl is 
overridden, although it correctly receives the baseUrl.

invocationParams = {
baseUrl=file:///c:/tmp/
cacheKey={map:0}
test=hello world
}


protected InvocationResult invoke(final String src, final String type,  final 
Invocation invocation) {


// set the baseUrl  PROBLEMATIC PART
invocationParams.put("baseUrl", invocation.resolve(""));

}


But before starting making changes... this might need careful attention.

Robby


-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Tuesday, November 13, 2012 2:32 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

I'm debugging your issue and so far I'm pretty bedazzled about what the hell is 
going on:

  







   Map

baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample/./src/main/resources/COB-INF/
cacheKey=aggregation/xinclude-transformer
test=hello world

Will keep you posted.. Maybe the baseUrl is somewhere overridden while setting 
up the pipeline? Anyone who can tell this?

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Tuesday, November 13, 2012 1:19 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I can not include all my files, but here's the relevant parts:












In my xml file:


http://www.w3.org/2001/XInclude"/>



In the log I am getting this:

12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipeline
s/repo/articles/example/index.xml)) with
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
wi
th XMLSerializer(hashCode=1413585408).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating 
CompoundCacheKey(hashCode=518365495 key=[]):
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352808707000 (2012-11-
13 12:11:47.0)) for component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml))
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false) 
cachedCacheKey=URLListCacheKey(hashCode=13584830
78 urls=[TimestampCacheKey(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])) for component
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=1430898616
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=1413585408)
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=518365495
key=[TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/ind
ex.xml timestamp=1352808707000 (2012-11-13 12:11:47.0)),
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false)
cachedCacheKey=URLListCacheKey(hashCode=1358483078
urls=[TimestampCache
Key(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])),
ParameterCacheKey(hashCode=1430898616 parameters={encoding=UTF-8, method=xm
l})]) for pipeline CachingPipeline(hashCode=839414089
components=[XMLGenerator(hashCode=1295514377
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace

RE: XInclude in sitemap.xmap

2012-11-13 Thread Robby Pelssers
I still need to commit the fix... will let you know once done.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Tuesday, November 13, 2012 3:51 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

Robby,
thank you a lot for helping in this, in a timely manner.
My recommendation is to use an instance of unmodifiable collections to hold 
configurations and prevent over writing them.
We can either use a method that ensures configurations is not over written, and 
put this method in the top level class (ie, AbstractTransformer .. etc.).
Or just use the read only collections. Here's an example 
http://javarevisited.blogspot.ca/2012/07/create-read-only-list-map-set-example-java.html

This may solve potential problems with other invocations.


On Tue, Nov 13, 2012 at 8:54 AM, Robby Pelssers  wrote:
> I made a little change to that class and will check if that resolves the 
> issue:
>
> // set the baseUrl
> if (!invocationParams.containsKey("baseUrl")) {
> invocationParams.put("baseUrl", invocation.resolve(""));
> }
> Will let you know once tested.
>
> Robby
>
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
> Sent: Tuesday, November 13, 2012 2:49 PM
> To: users@cocoon.apache.org
> Subject: RE: XInclude in sitemap.xmap
>
> Ok... I found the problem.
>
> Inside org.apache.cocoon.sitemap.node.AbstractSitemapNode the baseUrl is 
> overridden, although it correctly receives the baseUrl.
>
> invocationParams = {
> baseUrl=file:///c:/tmp/
> cacheKey={map:0}
> test=hello world
> }
>
>
> protected InvocationResult invoke(final String src, final String type,  
> final Invocation invocation) {
>
> 
> // set the baseUrl  PROBLEMATIC PART
> invocationParams.put("baseUrl", invocation.resolve(""));
>
> }
>
>
> But before starting making changes... this might need careful attention.
>
> Robby
>
>
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
> Sent: Tuesday, November 13, 2012 2:32 PM
> To: users@cocoon.apache.org
> Subject: RE: XInclude in sitemap.xmap
>
> I'm debugging your issue and so far I'm pretty bedazzled about what the hell 
> is going on:
>
>   
> 
> 
> 
> 
> 
> 
> 
>   
> While debugging I see following Configuration -> Map
>
> baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample/
> ./src/main/resources/COB-INF/ 
> cacheKey=aggregation/xinclude-transformer
> test=hello world
>
> Will keep you posted.. Maybe the baseUrl is somewhere overridden while 
> setting up the pipeline? Anyone who can tell this?
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Tuesday, November 13, 2012 1:19 PM
> To: users@cocoon.apache.org
> Subject: Re: XInclude in sitemap.xmap
>
> I can not include all my files, but here's the relevant parts:
>
>
> 
>  src="{global:base.repo.path}/articles/{map:id}/index.xml" />
> 
> 
>  value="file://{global:base.repo.path}/articles/{map:id}/" />
> 
> 
> 
> 
>
> In my xml file:
>
> 
>  xmlns:xi="http://www.w3.org/2001/XInclude"/>
> 
>
>
> In the log I am getting this:
>
> 12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - 
> Going to link the component XMLGenerator(hashCode=1295514377 
> internalGenerator=URLGenerator(hashCode=1212516680
> source=file:/home/mansour/workspace/pipeline
> s/repo/articles/example/index.xml)) with
> XIncludeTransformer(hashCode=373437306
> baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/).
> 12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - 
> Going to link the component XIncludeTransformer(hashCode=373437306
> baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/res
> ources/COB-INF/)
> wi
> th XMLSerializer(hashCode=1413585408).
> 12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating 
> CompoundCacheKey(hashCode=518365495 key=[]):
> 12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ 
> adding TimestampCacheKey(hashCode=1975202233
> url=file:/home/mansour/workspace/pipelines/repo/articles/example/index
> .xml
> timestamp=1352808707000 (2012-11-
> 13 12:11:

RE: XInclude in sitemap.xmap

2012-11-13 Thread Robby Pelssers
I made a little change to that class and will check if that resolves the issue:

// set the baseUrl
if (!invocationParams.containsKey("baseUrl")) {
invocationParams.put("baseUrl", invocation.resolve(""));
}
Will let you know once tested.

Robby

-----Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Tuesday, November 13, 2012 2:49 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

Ok... I found the problem.

Inside org.apache.cocoon.sitemap.node.AbstractSitemapNode the baseUrl is 
overridden, although it correctly receives the baseUrl.

invocationParams = {
baseUrl=file:///c:/tmp/
cacheKey={map:0}
test=hello world
}


protected InvocationResult invoke(final String src, final String type,  final 
Invocation invocation) {


// set the baseUrl  PROBLEMATIC PART
invocationParams.put("baseUrl", invocation.resolve(""));

}


But before starting making changes... this might need careful attention.

Robby


-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Tuesday, November 13, 2012 2:32 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

I'm debugging your issue and so far I'm pretty bedazzled about what the hell is 
going on:

  







   Map

baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample/./src/main/resources/COB-INF/
cacheKey=aggregation/xinclude-transformer
test=hello world

Will keep you posted.. Maybe the baseUrl is somewhere overridden while setting 
up the pipeline? Anyone who can tell this?

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Tuesday, November 13, 2012 1:19 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I can not include all my files, but here's the relevant parts:












In my xml file:


http://www.w3.org/2001/XInclude"/>



In the log I am getting this:

12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipeline
s/repo/articles/example/index.xml)) with
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
wi
th XMLSerializer(hashCode=1413585408).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating 
CompoundCacheKey(hashCode=518365495 key=[]):
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352808707000 (2012-11-
13 12:11:47.0)) for component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml))
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false) 
cachedCacheKey=URLListCacheKey(hashCode=13584830
78 urls=[TimestampCacheKey(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])) for component
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=1430898616
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=1413585408)
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=518365495
key=[TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/ind
ex.xml timestamp=1352808707000 (2012-11-13 12:11:47.0)),
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false)
cachedCacheKey=URLListCacheKey(hashCode=1358483078
urls=[TimestampCache
Key(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])),
ParameterCacheKey(hashCode=1430898616 parameters={encoding=UTF-8, method=xm
l})]) for pipeline CachingPipeline(hashCode=839414089
components=

RE: XInclude in sitemap.xmap

2012-11-13 Thread Robby Pelssers
Ok... I found the problem.

Inside org.apache.cocoon.sitemap.node.AbstractSitemapNode the baseUrl is 
overridden, although it correctly receives the baseUrl.

invocationParams = {
baseUrl=file:///c:/tmp/
cacheKey={map:0}
test=hello world
}


protected InvocationResult invoke(final String src, final String type,  final 
Invocation invocation) {


// set the baseUrl  PROBLEMATIC PART
invocationParams.put("baseUrl", invocation.resolve(""));

}


But before starting making changes... this might need careful attention.

Robby


-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Tuesday, November 13, 2012 2:32 PM
To: users@cocoon.apache.org
Subject: RE: XInclude in sitemap.xmap

I'm debugging your issue and so far I'm pretty bedazzled about what the hell is 
going on:

  







   Map

baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample/./src/main/resources/COB-INF/
cacheKey=aggregation/xinclude-transformer
test=hello world

Will keep you posted.. Maybe the baseUrl is somewhere overridden while setting 
up the pipeline? Anyone who can tell this?

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Tuesday, November 13, 2012 1:19 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I can not include all my files, but here's the relevant parts:












In my xml file:


http://www.w3.org/2001/XInclude"/>



In the log I am getting this:

12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipeline
s/repo/articles/example/index.xml)) with
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
wi
th XMLSerializer(hashCode=1413585408).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating 
CompoundCacheKey(hashCode=518365495 key=[]):
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352808707000 (2012-11-
13 12:11:47.0)) for component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml))
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false) 
cachedCacheKey=URLListCacheKey(hashCode=13584830
78 urls=[TimestampCacheKey(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])) for component
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=1430898616
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=1413585408)
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=518365495
key=[TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/ind
ex.xml timestamp=1352808707000 (2012-11-13 12:11:47.0)),
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false)
cachedCacheKey=URLListCacheKey(hashCode=1358483078
urls=[TimestampCache
Key(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])),
ParameterCacheKey(hashCode=1430898616 parameters={encoding=UTF-8, method=xm
l})]) for pipeline CachingPipeline(hashCode=839414089
components=[XMLGenerator(hashCode=1295514377
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xm
l)), XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/),
XMLSerializer(hashCode=1413585408)])
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Used 
cache: SimpleCache(hashCode=1672230800) 12:11:57.040 [btpool0-1] DEBUG 
o.a.cocoon.pipeline.Cac

RE: XInclude in sitemap.xmap

2012-11-13 Thread Robby Pelssers
I'm debugging your issue and so far I'm pretty bedazzled about what the hell is 
going on:

  







   Map

baseUrl=file:/C:/workspaces/apache/cocoon/cocoon3/trunk/cocoon-sample/./src/main/resources/COB-INF/
cacheKey=aggregation/xinclude-transformer
test=hello world

Will keep you posted.. Maybe the baseUrl is somewhere overridden while setting 
up the pipeline? Anyone who can tell this?

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Tuesday, November 13, 2012 1:19 PM
To: users@cocoon.apache.org
Subject: Re: XInclude in sitemap.xmap

I can not include all my files, but here's the relevant parts:












In my xml file:


http://www.w3.org/2001/XInclude"/>



In the log I am getting this:

12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipeline
s/repo/articles/example/index.xml)) with
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.AbstractPipeline - Going to 
link the component XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
wi
th XMLSerializer(hashCode=1413585408).
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating 
CompoundCacheKey(hashCode=518365495 key=[]):
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml
timestamp=1352808707000 (2012-11-
13 12:11:47.0)) for component XMLGenerator(hashCode=1295514377 
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xml))
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false) 
cachedCacheKey=URLListCacheKey(hashCode=13584830
78 urls=[TimestampCacheKey(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])) for component
XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/)
12:11:57.039 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - ~ adding 
ParameterCacheKey(hashCode=1430898616
parameters={encoding=UTF-8, method=xml}) for component
XMLSerializer(hashCode=1413585408)
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Creating  
CompoundCacheKey(hashCode=518365495
key=[TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/articles/example/ind
ex.xml timestamp=1352808707000 (2012-11-13 12:11:47.0)),
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false)
cachedCacheKey=URLListCacheKey(hashCode=1358483078
urls=[TimestampCache
Key(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])),
ParameterCacheKey(hashCode=1430898616 parameters={encoding=UTF-8, method=xm
l})]) for pipeline CachingPipeline(hashCode=839414089
components=[XMLGenerator(hashCode=1295514377
internalGenerator=URLGenerator(hashCode=1212516680
source=file:/home/mansour/workspace/pipelines/repo/articles/example/index.xm
l)), XIncludeTransformer(hashCode=373437306
baseUrl=file:/home/mansour/workspace/pipelines/contents/./src/main/resources/COB-INF/),
XMLSerializer(hashCode=1413585408)])
12:11:57.040 [btpool0-1] DEBUG o.a.cocoon.pipeline.CachingPipeline - Used 
cache: SimpleCache(hashCode=1672230800) 12:11:57.040 [btpool0-1] DEBUG 
o.a.cocoon.pipeline.CachingPipeline - No cache value available for 
CompoundCacheKey(hashCode=518365495
key=[TimestampCacheKey(hashCode=1975202233
url=file:/home/mansour/workspace/pipelines/repo/a
rticles/example/index.xml timestamp=1352808707000 (2012-11-13 12:11:47.0)), 
CachedCacheKey(hashCode=1855990413
internalCacheKey=ObjectCacheKey(hashCode=1421714705 obj=false)
cachedCacheKey=URLListCacheKey(hashCode=1358483078 u
rls=[TimestampCacheKey(hashCode=334463211
url=file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/hello.c
timestamp=0 (1970-01-01 00:00:00.0))])),
ParameterCacheKey(hashCode=1430898616 parameters={encodi ng=UTF-8, 
method=xml})]) 12:11:57.040 [btpool0-1] DEBUG 
o.a.cocoon.pipeline.AbstractPipeline - Invoking first component of 
CachingPipeline(hashCode=839414089

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 
 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 

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 Map.

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: Unable to transform to docbook

2012-11-08 Thread Robby Pelssers
I did see you created an issue. But if you could provide me a small isolated 
test case in some zip I could have taken a look at it. Still ready to help out.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, November 08, 2012 3:31 PM
To: users@cocoon.apache.org
Subject: Re: Unable to transform to docbook

Robby,
I created a small unit test yesterday, and created a patch for the solution.
https://issues.apache.org/jira/browse/COCOON3-108

I think a small unit test doesn't show the real issue. I will test it with 
docbook xsl today.



On Thu, Nov 8, 2012 at 4:11 AM, Robby Pelssers  wrote:
> Hi Mansour,
>
> I just wrote a little unit test which has no issues with includes.  I did not 
> commit the test but I suggest you try tackling your issue in small steps like 
> below and continue from there.
>
> Robby
>
> **
> 
> package org.apache.cocoon.sax;
>
> import junit.framework.TestCase;
> import org.custommonkey.xmlunit.Diff;
>
> import java.io.ByteArrayOutputStream;
>
> import static 
> org.apache.cocoon.sax.builder.SAXPipelineBuilder.newNonCachingPipeline
> ;
>
>
> public class XSLTIncludeTest extends TestCase  {
>
> public void testTransformerWithInclude() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
>
> newNonCachingPipeline()
> 
> .setStringGenerator("appletomato")
> .addXSLTTransformer(this.getClass().getResource("/food.xslt"))
> .addSerializer()
> .withEmptyConfiguration()
> .setup(baos)
> .execute();
>
> Diff diff = new Diff(" encoding=\"UTF-8\"?>apple class=\"vegetable\">tomato", new String(baos.toByteArray()));
> assertTrue("XSL transformation didn't work as expected " + diff, 
> diff.identical());
> }
>
> }
> **food.xslt 
> *
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
>
>   
>
>   
>
>   
> 
>   
>
>   
> 
>
> 
>   
>
>   
> 
>   
>
> 
>
> ****vegetables.xslt***
> ***  
> http://www.w3.org/1999/XSL/Transform"; 
> version="1.0">
>
>   
> 
>   
>
> 
>
> **
> 
>
>
>
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
> Sent: Thursday, November 08, 2012 9:31 AM
> To: users@cocoon.apache.org
> Subject: RE: Unable to transform to docbook
>
> Hi Mansour,
>
> To be able to confirm this one would need to setup a small test case with a 
> very simple XSLT importing another one.  Which is exactly what I am planning 
> to do.
>
> Too bad you can't send me a very simplistic project showing the problem.
>
> Robby
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Thursday, November 08, 2012 2:46 AM
> To: users@cocoon.apache.org
> Subject: Re: Unable to transform to docbook
>
> Robby, I think I know where the issue is, but I don't have eclipse set up. I 
> am just browsing the source through VI.
>
> I am working with the latest from SVN:
>
> In the file: 
> cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransform
> er.java
>
>   try {
> 160 this.templates =
> transformerFactory.newTemplates(new
> StreamSource(this.source.toExternalForm()));
> 161
> 162 // store the XSLT into the cache for future reuse
> 163 LOG.debug("{} local cache put: {}",
> getClass().getSimpleName(), this.source.toExternalForm());
> 164
> 165 ValidityValue cacheEntry = new
> ValidityValue(this.templates, lastModified);
> 166 XSLT_CACHE.put(this.source.toExternalForm(), cacheEntry);
> 167 } catch (TransformerConfigurationException e) {
> 168 throw new SetupException("Impossible to read XSLT
> from '" + this.source.toExternalForm()
> 169 + "', see nested exception", e);
> 170 }
>
>
> If I am not wrong, it's building the transformation from a stream, and a 
> SourceStream has no idea about the location of the loaded XSTL, so the 

RE: Unable to transform to docbook

2012-11-08 Thread Robby Pelssers
Hi Mansour,

I just wrote a little unit test which has no issues with includes.  I did not 
commit the test but I suggest you try tackling your issue in small steps like 
below and continue from there.

Robby

**
package org.apache.cocoon.sax;

import junit.framework.TestCase;
import org.custommonkey.xmlunit.Diff;

import java.io.ByteArrayOutputStream;

import static 
org.apache.cocoon.sax.builder.SAXPipelineBuilder.newNonCachingPipeline;


public class XSLTIncludeTest extends TestCase  {

public void testTransformerWithInclude() throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();

newNonCachingPipeline()

.setStringGenerator("appletomato")
.addXSLTTransformer(this.getClass().getResource("/food.xslt"))
.addSerializer()
.withEmptyConfiguration()
.setup(baos)
.execute();

Diff diff = new Diff("appletomato", new 
String(baos.toByteArray()));
assertTrue("XSL transformation didn't work as expected " + diff, 
diff.identical());
}

}
**food.xslt 
*

http://www.w3.org/1999/XSL/Transform"; version="1.0">

  

  

  

  

  

   

  

  

  



vegetables.xslt**

http://www.w3.org/1999/XSL/Transform"; version="1.0">

  

  



******



-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Thursday, November 08, 2012 9:31 AM
To: users@cocoon.apache.org
Subject: RE: Unable to transform to docbook

Hi Mansour,

To be able to confirm this one would need to setup a small test case with a 
very simple XSLT importing another one.  Which is exactly what I am planning to 
do. 

Too bad you can't send me a very simplistic project showing the problem.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Thursday, November 08, 2012 2:46 AM
To: users@cocoon.apache.org
Subject: Re: Unable to transform to docbook

Robby, I think I know where the issue is, but I don't have eclipse set up. I am 
just browsing the source through VI.

I am working with the latest from SVN:

In the file: 
cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java

  try {
160 this.templates =
transformerFactory.newTemplates(new
StreamSource(this.source.toExternalForm()));
161
162 // store the XSLT into the cache for future reuse
163 LOG.debug("{} local cache put: {}",
getClass().getSimpleName(), this.source.toExternalForm());
164
165 ValidityValue cacheEntry = new
ValidityValue(this.templates, lastModified);
166 XSLT_CACHE.put(this.source.toExternalForm(), cacheEntry);
167 } catch (TransformerConfigurationException e) {
168 throw new SetupException("Impossible to read XSLT
from '" + this.source.toExternalForm()
169 + "', see nested exception", e);
170 }


If I am not wrong, it's building the transformation from a stream, and a 
SourceStream has no idea about the location of the loaded XSTL, so the resolver 
can not load the imported or included, xslts.

The only way I know of, is to set the systemId so something like this should do 
the trick:

StreamSource tmpSource = new StreamSource(this.source.toExternalForm());
URL fullPath =  .
tmpSource.setSystemId(fullPath);
this.templates = transformerFactory.newTemplates(tmpSource);


if you have eclipse and your IDE setup, it will be easier to test and fix.



On Mon, Nov 5, 2012 at 7:23 PM, Mansour Al Akeel  
wrote:
> Sure I will. I will organize a project that is easy to play with.
>
> I will send it directly to your email (I think the list doesn't allow 
> attachment).
>
>
> On Mon, Nov 5, 2012 at 6:21 PM, Robby Pelssers  wrote:
>> You know what...
>>
>> It might be a problem with the includes but to be honest I would have 
>> expected another exception in that case. Is there any way you can share the 
>> sources for the project so I can adjust the dev.properties file for my 
>> situation and crack the problem?  I'm sure I will find out quickly but 
>> helping out by mail is a bit more tedious to be honest.
>>
>> So if you can provide me with a zip file containing the project and the 
>> docbook xslt's zipped and perhaps also that ex.xml file I can debug your 
>> issue.
>>
>> Robby
>>

RE: Unable to transform to docbook

2012-11-08 Thread Robby Pelssers
Hi Mansour,

To be able to confirm this one would need to setup a small test case with a 
very simple XSLT importing another one.  Which is exactly what I am planning to 
do. 

Too bad you can't send me a very simplistic project showing the problem.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Thursday, November 08, 2012 2:46 AM
To: users@cocoon.apache.org
Subject: Re: Unable to transform to docbook

Robby, I think I know where the issue is, but I don't have eclipse set up. I am 
just browsing the source through VI.

I am working with the latest from SVN:

In the file: 
cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java

  try {
160 this.templates =
transformerFactory.newTemplates(new
StreamSource(this.source.toExternalForm()));
161
162 // store the XSLT into the cache for future reuse
163 LOG.debug("{} local cache put: {}",
getClass().getSimpleName(), this.source.toExternalForm());
164
165 ValidityValue cacheEntry = new
ValidityValue(this.templates, lastModified);
166 XSLT_CACHE.put(this.source.toExternalForm(), cacheEntry);
167 } catch (TransformerConfigurationException e) {
168 throw new SetupException("Impossible to read XSLT
from '" + this.source.toExternalForm()
169 + "', see nested exception", e);
170 }


If I am not wrong, it's building the transformation from a stream, and a 
SourceStream has no idea about the location of the loaded XSTL, so the resolver 
can not load the imported or included, xslts.

The only way I know of, is to set the systemId so something like this should do 
the trick:

StreamSource tmpSource = new StreamSource(this.source.toExternalForm());
URL fullPath =  .
tmpSource.setSystemId(fullPath);
this.templates = transformerFactory.newTemplates(tmpSource);


if you have eclipse and your IDE setup, it will be easier to test and fix.



On Mon, Nov 5, 2012 at 7:23 PM, Mansour Al Akeel  
wrote:
> Sure I will. I will organize a project that is easy to play with.
>
> I will send it directly to your email (I think the list doesn't allow 
> attachment).
>
>
> On Mon, Nov 5, 2012 at 6:21 PM, Robby Pelssers  wrote:
>> You know what...
>>
>> It might be a problem with the includes but to be honest I would have 
>> expected another exception in that case. Is there any way you can share the 
>> sources for the project so I can adjust the dev.properties file for my 
>> situation and crack the problem?  I'm sure I will find out quickly but 
>> helping out by mail is a bit more tedious to be honest.
>>
>> So if you can provide me with a zip file containing the project and the 
>> docbook xslt's zipped and perhaps also that ex.xml file I can debug your 
>> issue.
>>
>> Robby
>>
>> -Original Message-
>> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
>> Sent: Monday, November 05, 2012 6:59 PM
>> To: users@cocoon.apache.org
>> Subject: Re: Unable to transform to docbook
>>
>> On Mon, Nov 5, 2012 at 7:51 AM, Robby Pelssers  
>> wrote:
>>> Hi Mansour,
>>>
>>> First of all I assume you don't have the same match patterns in the same 
>>> sitemap..right? I guess you altered the implementation just to test and the 
>>> first one (docbook.xsl) failed and the second one (myCustomSheet.xsl) 
>>> worked.
>>
>> Yes, exactly ! The first one is failing, the second one is working. So the 
>> issue is only with docbook.xsl being processed from cocoon.
>>
>>>
>>> The most obvious way to debug is to try what following matchers will do:
>>>
>>> 
>>>   >> src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
>>>   
>>> 
>>>
>>> Also try to generate that xsl:
>>>
>>> 
>>>   >> src="/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl
>>>  " />
>>>   
>>> 
>>>
>>> But my hunch is that the docbook.xsl has other xsl imports or includes 
>>> which might be the problem.
>>>
>>> Let me know what happens if you try above matchers and also check if the 
>>> docbookx.xsl has imports/includes or if it has declared xsl parameters.
>>
>>
>> I tried both matchers and they seem to be working fine. I can do 
>> http://localhost:/transform/docbook.xsl and I get the expected output.
>> The docbook.xsl has a lot of  :
>>
>> > xmlns:xsl="http://www.w3.org/1

RE: Unable to transform to docbook

2012-11-05 Thread Robby Pelssers
You know what... 

It might be a problem with the includes but to be honest I would have expected 
another exception in that case. Is there any way you can share the sources for 
the project so I can adjust the dev.properties file for my situation and crack 
the problem?  I'm sure I will find out quickly but helping out by mail is a bit 
more tedious to be honest.

So if you can provide me with a zip file containing the project and the docbook 
xslt's zipped and perhaps also that ex.xml file I can debug your issue.

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Monday, November 05, 2012 6:59 PM
To: users@cocoon.apache.org
Subject: Re: Unable to transform to docbook

On Mon, Nov 5, 2012 at 7:51 AM, Robby Pelssers  wrote:
> Hi Mansour,
>
> First of all I assume you don't have the same match patterns in the same 
> sitemap..right? I guess you altered the implementation just to test and the 
> first one (docbook.xsl) failed and the second one (myCustomSheet.xsl) worked.

Yes, exactly ! The first one is failing, the second one is working. So the 
issue is only with docbook.xsl being processed from cocoon.

>
> The most obvious way to debug is to try what following matchers will do:
>
> 
>src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
>   
> 
>
> Also try to generate that xsl:
>
> 
>src="/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl 
> " />
>   
> 
>
> But my hunch is that the docbook.xsl has other xsl imports or includes which 
> might be the problem.
>
> Let me know what happens if you try above matchers and also check if the 
> docbookx.xsl has imports/includes or if it has declared xsl parameters.


I tried both matchers and they seem to be working fine. I can do 
http://localhost:/transform/docbook.xsl and I get the expected output.
The docbook.xsl has a lot of  :

http://www.w3.org/1999/XSL/Transform";
xmlns:ng="http://docbook.org/docbook-ng";
xmlns:db="http://docbook.org/ns/docbook";
xmlns:exsl="http://exslt.org/common";
xmlns:exslt="http://exslt.org/common"; exclude-result-prefixes="db ng exsl 
exslt" version="1.0">










   
  

   
  




Thank you for helping in this.



>
> Kind regards,
> Robby Pelssers
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Sunday, November 04, 2012 11:14 PM
> To: users
> Subject: Unable to transform to docbook
>
> I have worked with C2.1 and 2.2 before. I am trying to play with C3 for a 
> coming project.
> I need to generate HTML from docbook file.
>
> INFO  RequestProcessor - Sitemap execution for /article/ex took 6470.727 ms.
> ERROR XMLSitemapServlet - Cocoon can't process the request.
> org.apache.cocoon.sitemap.InvocationException:
> org.apache.cocoon.pipeline.ProcessingException: Can't parse url connection 
> file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
> at 
> org.apache.cocoon.sitemap.util.ExceptionHandler.getInvocationException(ExceptionHandler.java:39)
> at 
> org.apache.cocoon.sitemap.node.PipelineNode.handleException(PipelineNode.java:101)
> at 
> org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:71)
> at 
> org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
> at 
> org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)
> at 
> org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
> at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)
> at 
> org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:233)
> at 
> org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:290)
> at 
> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:90)
> at 
> org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:47)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
>
> .
>
> Caused by: org.apache.cocoon.pipeline.ProcessingException: Can't parse url 
> connection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
> at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:117)
> at 
> org.apache.cocoon.sa

RE: Cocoon 3.0-alpha sitemap properties

2012-11-05 Thread Robby Pelssers
Did you check if in your application context the cocoon-spring-configurator is 
configured?  For how-to please double check the documentation.

http://cocoon.apache.org/subprojects/configuration/spring-configurator/index.html

  
  

Robby

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Monday, November 05, 2012 6:46 PM
To: users@cocoon.apache.org
Subject: Re: Cocoon 3.0-alpha sitemap properties

Robby,
Thank you for your reply. I don't see how the issue relates to the typo.
Assuming this my current sitemap:


http://apache.org/cocoon/sitemap";
xmlns:servlet="http://apache.org/cocoon/servlet";
xmlns:controller="http://apache.org/cocoon/controller";>


















The error I am recieving is :
DEBUG MemoryResourceStore - reading resource 
com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.class
DEBUG MemoryResourceStore - reading resource 
com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.class
WARN  URLConnectionUtils - Can't close input stream from 
file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/${base.path}/workspace/pipelines/repo/articles/ex.xml
java.io.FileNotFoundException:
/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/${base.path}/workspace/pipelines/repo/articles/ex.xml
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:97)
at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at 
org.apache.cocoon.pipeline.util.URLConnectionUtils.closeQuietly(URLConnectionUtils.java:44)
at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:119)
at 
org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:385)
at 
org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:104)



==
If you notice, the property is never substituted for its value. The property is 
specified in META-INF/cocoon/properties/dev/app.properties

base.path=/home/mansour/



Thank you for your time.




On Mon, Nov 5, 2012 at 2:58 AM, Robby Pelssers  wrote:
> Sorry...
>
> I will rephrase this ;-)
>
> In your property you used 'documenation'  --> typo
>
> Robby
>
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
> Sent: Monday, November 05, 2012 8:54 AM
> To: users@cocoon.apache.org
> Subject: RE: Cocoon 3.0-alpha sitemap properties
>
> =/home/mansour/docs/documentation  (value of property you defined) 
> =/home/mansour/docs/documentation  (correct path i assume)
>
> -Original Message-
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Saturday, November 03, 2012 10:10 PM
> To: users@cocoon.apache.org
> Subject: Cocoon 3.0-alpha sitemap properties
>
> I created a block for C3.0 and tried to use properties defined in a 
> *.properties file. The logs show that the file has been found and I 
> can see that properties are found loaded,
>
> for example:
>
>
>  935 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
> impl.SettingsBeanFactoryPostProcessor - Property:
> base.path=/home/mansour/docs/documenation
>  936 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
> impl.SettingsBeanFactoryPostProcessor - Property: sun.cpu.isalist=
>  937 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
> impl.SettingsBeanFactoryPostProcessor - = Settings End =
>  938 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
> support.DefaultListableBeanFactory - Finished creating instance of bean 
> 'org.apache.cocoon.configuration.Settings'
>
> However, doing this in my sitemap.xmap:
>
>   
>   
>   
> 
>
> Does not work, and it reports that file is not found.
>
> Any idea or documentation for this ??
>
> -
> 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
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
>

---

RE: Unable to transform to docbook

2012-11-05 Thread Robby Pelssers
Hi Mansour,

First of all I assume you don't have the same match patterns in the same 
sitemap..right? I guess you altered the implementation just to test and the 
first one (docbook.xsl) failed and the second one (myCustomSheet.xsl) worked.

The most obvious way to debug is to try what following matchers will do:


  
  


Also try to generate that xsl:


  
  


But my hunch is that the docbook.xsl has other xsl imports or includes which 
might be the problem.

Let me know what happens if you try above matchers and also check if the 
docbookx.xsl has imports/includes or if it has declared xsl parameters.

Kind regards,
Robby Pelssers

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Sunday, November 04, 2012 11:14 PM
To: users
Subject: Unable to transform to docbook

I have worked with C2.1 and 2.2 before. I am trying to play with C3 for a 
coming project.
I need to generate HTML from docbook file.

INFO  RequestProcessor - Sitemap execution for /article/ex took 6470.727 ms.
ERROR XMLSitemapServlet - Cocoon can't process the request.
org.apache.cocoon.sitemap.InvocationException:
org.apache.cocoon.pipeline.ProcessingException: Can't parse url connection 
file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
at 
org.apache.cocoon.sitemap.util.ExceptionHandler.getInvocationException(ExceptionHandler.java:39)
at 
org.apache.cocoon.sitemap.node.PipelineNode.handleException(PipelineNode.java:101)
at 
org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:71)
at 
org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
at 
org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)
at 
org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)
at 
org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:233)
at 
org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:290)
at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:90)
at 
org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

.

Caused by: org.apache.cocoon.pipeline.ProcessingException: Can't parse url 
connection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:117)
at 
org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:385)
at 
org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:104)
at 
org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:146)
at 
org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at 
org.apache.cocoon.servlet.collector.ResponseHeaderCollector.interceptInvoke(ResponseHeaderCollector.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.

RE: Cocoon 3.0-alpha sitemap properties

2012-11-04 Thread Robby Pelssers
Sorry...

I will rephrase this ;-)

In your property you used 'documenation'  --> typo

Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Monday, November 05, 2012 8:54 AM
To: users@cocoon.apache.org
Subject: RE: Cocoon 3.0-alpha sitemap properties

=/home/mansour/docs/documentation  (value of property you defined) 
=/home/mansour/docs/documentation  (correct path i assume)

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
Sent: Saturday, November 03, 2012 10:10 PM
To: users@cocoon.apache.org
Subject: Cocoon 3.0-alpha sitemap properties

I created a block for C3.0 and tried to use properties defined in a 
*.properties file. The logs show that the file has been found and I can see 
that properties are found loaded,

for example:


 935 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - Property:
base.path=/home/mansour/docs/documenation
 936 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - Property: sun.cpu.isalist=
 937 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - = Settings End =
 938 2012-11-03 20:53:12,369 btpool0-1 DEBUG support.DefaultListableBeanFactory 
- Finished creating instance of bean 'org.apache.cocoon.configuration.Settings'

However, doing this in my sitemap.xmap:

  
  
  


Does not work, and it reports that file is not found.

Any idea or documentation for this ??

-
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


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



RE: Cocoon 3.0-alpha sitemap properties

2012-11-04 Thread Robby Pelssers
=/home/mansour/docs/documentation  (value of property you defined)
=/home/mansour/docs/documentation  (correct path i assume)

-Original Message-
From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] 
Sent: Saturday, November 03, 2012 10:10 PM
To: users@cocoon.apache.org
Subject: Cocoon 3.0-alpha sitemap properties

I created a block for C3.0 and tried to use properties defined in a 
*.properties file. The logs show that the file has been found and I can see 
that properties are found loaded,

for example:


 935 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - Property:
base.path=/home/mansour/docs/documenation
 936 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - Property: sun.cpu.isalist=
 937 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
impl.SettingsBeanFactoryPostProcessor - = Settings End =
 938 2012-11-03 20:53:12,369 btpool0-1 DEBUG support.DefaultListableBeanFactory 
- Finished creating instance of bean 'org.apache.cocoon.configuration.Settings'

However, doing this in my sitemap.xmap:

  
  
  


Does not work, and it reports that file is not found.

Any idea or documentation for this ??

-
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



cocoon.processPipelineTo gotcha

2012-10-17 Thread Robby Pelssers
Hi guys,

Should anyone ever do crazy stuff in flowscript... be aware of the following

http://robbypelssers.blogspot.nl/2012/10/cocoon-flowscript-gotcha.html

Cheers,
Robby


RE: beginner q: possible to set extension .xsl as type='xslt' by default?

2012-10-16 Thread Robby Pelssers
Just for your reference.

Are you using XSLT2.0?  If so you will need to configure Saxon as processor.  
Default Xalan is used.

http://robbypelssers.blogspot.nl/2010/08/using-saxon-instead-of-xalan-with.html

And the best way to get started is indeed using a very simple setup. It will 
also help us in debugging your problems.  So try first using a very basic input 
file, and perhaps 1 or 2 chained transformers, or 1 transformer including 
another xslt.  If that fails, I'm more than willing to assist.

Robby

-Original Message-
From: whatnext [mailto:tom_gra...@yahoo.co.uk] 
Sent: Tuesday, October 16, 2012 6:16 PM
To: users@cocoon.apache.org
Subject: Re: beginner q: possible to set extension .xsl as type='xslt' by 
default?


I just tested a simple .xsl that calls another .xsl and it worked without that 
error. Many apologies for the confusion - the error message is obviously a red 
herring.

Our xsl's are quite substantial and now i guess it must be something else that 
is causing it to think its not an .xsl . Perhaps if there was something 
'non-standard' in the .xsl  (given that we are coming from axkit) it would give 
the error:

Unable to get transformer handler for file:/// ?

--
View this message in context: 
http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34564228.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


-
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: beginner q: possible to set extension .xsl as type='xslt' by default?

2012-10-16 Thread Robby Pelssers
This is however not a C2.2. specific issue.

Let me explain how C2.2 works.

Assume you have the following structure
COB-INF
-data
- input.xml
-xslt
-transform1.xsl
-transform2.xsl

In your sitemap you can now do
  


   < !—
 you can add another transformer here or you can include it in 
transform1.xsl  by using a relative path to current xslt   

   -->

  

Hope this gets you started,
Robby

From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Tuesday, October 16, 2012 4:10 PM
To: users@cocoon.apache.org
Subject: Re: beginner q: possible to set extension .xsl as type='xslt' by 
default?

Dear Tom,

Can you send your sitemap.xmap over?
For cocoon, the default transformation is an xslt.

If you are just starting with a migration, you may want to consider using 
cocoon 3, which is at the moment in beta,
but soon the production version will be ready (@others: isn't it ? :-)

Kind regards,
Jos

On Tue, Oct 16, 2012 at 3:55 PM, whatnext 
mailto:tom_gra...@yahoo.co.uk>> wrote:

Dear learned cocoon users,

Very sorry for the ignorance of this question. Our company has recently
decided it might be time to move away from AxKit (!) and we are looking at
the alternatives. Cocoon is an obvious choice. However, I know absolutely
nothing about it other than a broad idea of what it does.

I have been trying to get Cocoon to serve some of our pages to see whats
involved.

I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
and sure enough could display the welcome page.

Next up I tried to display one of our web pages by copying over an .xml and
related .xsl stylesheets and modifying the sitemap.xmap file.

So then it falls over saying:

Unable to get transformer handler for 
file:///path/example.xsl ...

If I go into sitemap.xmap and add type="xslt" to the  line then this error seems resolved but then it falls over with

Unable to get transformer handler for 
file:///path/another.xsl

where another.xsl is referred to by example.xsl. What can be done in this
case? Is there a way of telling cocoon that it needs to use the xslt
transformer anywhere it sees .xsl... ? Or am i approaching this in all the
wrong way etc.?

Many apologies for the elementary nature of this question - I freely admit I
have no idea what I am doing!

Any help appreciated...







--
View this message in context: 
http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



--
All generous minds have a horror of what are commonly called "Facts". They are 
the brute beasts of the intellectual domain.
-- Thomas Hobbes


transformer does not always need a generator

2012-10-12 Thread Robby Pelssers
Hi guys,

Just wanted to point out a small mistake in the pipeline concept.  It seems 
like a pipeline should not always (have to admit most of the times it does) 
start with  a generator. I accidentally ran into this .

An XSLT can load data by itself using document() and collection function.I 
know that cocoon style of working is to usually use a generator instead of 
calling the document function inside an XSLT. But not so for a collection 
though.

Let me show you.  To get this working in Cocoon I had to use a dummy generator 
just to get this working.  No big deal... just mentioning it.

  
 


  



http://www.w3.org/1999/XSL/Transform";>

  

  

  

  


Robby


RE: database connections used up by script?

2012-10-12 Thread Robby Pelssers
Javier is right.

We have the same issue sometimes when too many clients connect to our XMLDB.
So it might be worthwhile investigating how many apps are connecting to your 
postgress DB.  Do they all properly close the connection?  It's not a Cocoon 
issue for sure.

Robby

From: Javier Puerto [mailto:jpue...@gmail.com]
Sent: Friday, October 12, 2012 2:04 PM
To: users@cocoon.apache.org
Subject: Re: database connections used up by script?

Hi Paul,

Your pool is configured to max 200 connections. Is your postgres configured to 
support this quantity? (by default is 100). The error is thrown by postgres 
itself so I suspect that's could be the cause. See 
http://www.postgresql.org/docs/8.1/static/runtime-config-connection.html

Salu2
2012/10/12 Paul Joseph mailto:pjos...@gmail.com>>
Hi there,

I've supported a Cocoon application for many years now but yesterday a new 
problem was reported that I haven't' seen before.

The customer was doing something relatively unusual---using a script to read a 
spreadsheet and automatically fill in a Cocoon CForm and then save data in a 
plain old database table.

The error is as shown below.  Not sure what setting to use for my 
connection-pool in the jdbc-connection-descriptor (below).









Other than that it is Cocoon 2.1 using Java6 in Tomcat 7.x and Postgresql 9.1 
with a JDBC 3.0 driver.
The actual error is shown below.

brgds
Paul

NFO: Server startup in 5045 ms
org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
at 
org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:464)
at 
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112)
at 
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at 
org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
at 
org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.cocoon.ojb.samples.SuperDAO.getConnection(SuperDAO.java:302)
at org.apache.cocoon.ojb.samples.SuperDAO.getMaxValue(SuperDAO.java:459)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
at 
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at 
org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1591)
at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:841)
at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:124)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at 
org.apach

RE: two scripts to handle flowscript in one sitemap

2012-10-05 Thread Robby Pelssers
Not sure what you mean..

For all I know you can just store all your flowscripts in the flow folder and 
cocoon will load all of them on startup.  So all functions should be available 
from your sitemap.. even when split into multiple files.

So let's say you have 
File1:
---
Function func1() {}

File2:
--
Function func2() {}

File3:

Function func3() {
//you should be able to call func1 and func2 because they will be available 
Var res1 = func1()
Var res2 = func2()
Cocoon.sendPage("somePipeline", {x: res1, y: res2})
}


In your sitemap:



-Original Message-
From: Paul Joseph [mailto:pjos...@gmail.com] 
Sent: Friday, October 05, 2012 1:32 PM
To: users@cocoon.apache.org
Subject: two scripts to handle flowscript in one sitemap

Hi there,

I have a flowscript that has a lot of functiofnality (functions).

It is possible for one sitemap to handle more than one flowscript? That way I 
can split this file out into smaller units associated with the submenus.

(Cocoon 2.1.11,  Apache Tomcat 7, Windows 2008)

brgds
Paul

-
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: [C3] Sting template, passing argument to method

2012-10-05 Thread Robby Pelssers
Lol... you beat me to giving the solution.  It's indeed dead simple.  And 
Franscesco is right about ST only supporting javabeans style access.  I had a 
similar issue in the past passing javascript objects from flowscript to 
jxtemplate generator.

So I ended up extending the native JS Object with some methods like values() 
and keys() which are iterable.  And of course a Map has the same methods 
enabling you to get an enumerable of keys/ values or entries.

http://robbypelssers.blogspot.nl/2010/10/creating-higher-order-functions-in.html


Robby
-Original Message-
From: André Juffer [mailto:andre.juf...@oulu.fi] 
Sent: Friday, October 05, 2012 11:15 AM
To: users@cocoon.apache.org
Subject: Re: [C3] Sting template, passing argument to method

I got this problem solved. As the DTO holds the requested information as a Map, 
I added one method that returns a Set>.

With ST it is easy to iterate:


  $statistics.socialEventParticipation: { entry |

  $entry.key$
  $entry.value$

  }$



On 10/05/2012 09:30 AM, Francesco Chicchiriccò wrote:
> On 04/10/2012 08:53, André Juffer wrote:
>> Hello,
>>
>> I am dealing with the following problem. A REST resource returns an
>> (DTO) object called statistics (of type Statistics) holding various 
>> properties. With string template, each property can be inserted into 
>> an XML file, like
>>
>> $statistics.propertyA$
>>
>> where the corresponding method on the Statistics object is 
>> getPropertyA().
>>
>> One of the properties requires an argument of type String, where the 
>> actual method signature is getNumberFor(String name). It returns an 
>> int. The name is obtained from a list of names obtained from the 
>> statistics objects as well. The idea is to iterate through the list 
>> of names and return a number (int) for each name.
>>
>> Thus, the XML code that I try to complete looks like:
>> 
>>$statistics.names: { name |
>>  
>>$name$
>>$statistics.numberFor(name)$
>>  
>>}$
>> 
>>
>> The Statistics object holds among other things a Map 
>> with the requested numbers.
>>
>> The line $statistics.numberFor(name)$ is however erroneous. I cannot 
>> pass the current value of name to the method in question.
>>
>> My question is now: How to pass a argument to a given method on an 
>> object using string template. The string template website did not 
>> give a clear answer, so maybe it is not even possible, or maybe I 
>> just completely overlooked it.
>>
>> Any help is appreciated.
>
> Hi André.
> I am not an ST expert at all, but I really think there is no support 
> for generic method invocation on ST expressions: the only methods 
> supported seem to ne related to properties, "à la JavaBean".
>
> For your use case, I'd change a bit the application logic by providing 
> a
> C3 REST controller that would act as a "data conversion proxy" between 
> the sitemap and the actual REST resource you are currently dealing with.
> In this way you could query the external REST resource from the C3 
> REST controller body and prepare the data in a format that's suitable for ST.
>
> Regards.
>


-- 
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat   | WWW: www.strubiocat.oulu.fi
Triacle Biocomputing | WWW: www.triacle-bc.com

-
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: 2.1 Cocoon Forms Formatting Date in Flow

2012-09-24 Thread Robby Pelssers
Hi Peter,

Are you sending the mail from flowscript?  I think the formatting is only used 
for the form itself but you will still receive a regular Date object on the 
server side.  So you probably need to format it on the server side using plain 
java.

importClass(Packages.java.text.SimpleDateFormat);

var startDate = get date from form
var df = new SimpleDateFormat("dd/MM/") ;
var formatted = df.format(startDate);

use the formatted date in your sendmail template

Robby

From: Peter D Sparkes [mailto:pete...@kitchencharisma.com] 
Sent: Sunday, September 23, 2012 11:15 PM
To: Cocoon users
Subject: 2.1 Cocoon Forms Formatting Date in Flow

In my model I have:


       Start Date:
        
              
                
                   dd/MM/
                      
                
          
 

In my js I have:
function enquiry() {
.
form.showForm("enquiry-display-pipeline" );
var startdate =model.startdate;
I then put startdate into an email and send it
The received email has the startdate  as eg 
Mon Aug 27 00:00:00 BST 2012
Please, how can I format it as 27/0/2012 or get rid of the 

00:00:00 BST

Thanks 

peter








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



RE: more encoding problems

2012-09-20 Thread Robby Pelssers
Can you check which serializer you're using and did you explicitly set the 
encoding?

http://cocoon.apache.org/2.1/userdocs/default/html-serializer.html
http://cocoon.apache.org/2.1/userdocs/xhtml-serializer.html





-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Thursday, September 20, 2012 10:11 AM
To: users@cocoon.apache.org
Subject: RE: more encoding problems


 Yep,
 I noticed that too. But where it is coming from?
 Remember, the whole cocoon directory is a copy from old to new.
 I also copied e.g. Tomcat server.xml same way.

 - mika -


 On Thu, 20 Sep 2012 10:03:46 +0200, Robby Pelssers 
  wrote:
> The one that does not work has following encoding in 
>
>  http-equiv="Content-Type">
>
> Robby
>
> -Original Message-
> From: m...@digikartta.net [mailto:m...@digikartta.net]
> Sent: Thursday, September 20, 2012 9:23 AM
> To: users@cocoon.apache.org
> Subject: more encoding problems
>
>
>  Hi,
>  C2.11, I moved my app from one server to another, which resulted 
> some
>  pages to broke that is scands won't encode properly.
>  I have this in my sitemap:
>
>  
>  
>  
>  
>  
>  
>  
>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>
>  You can try this out:
>  Old server
>  http://77.240.23.91/cocoon/palaute_app/linkki/841 works
>  http://77.240.23.91/cocoon/palaute_app/linkki/html/841 works
>  New server
>  http://88.148.163.59/cocoon/palaute_app/linkki/1059 works
>  http://88.148.163.59/cocoon/palaute_app/linkki/html/1059 doesn't 
> work
>  !!
>
>  Any thoughts?
>  I have tried a lot of things without success.
>
>  - mika -
>
> -
> 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


-
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: more encoding problems

2012-09-20 Thread Robby Pelssers
The one that does not work has following encoding in 



Robby

-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Thursday, September 20, 2012 9:23 AM
To: users@cocoon.apache.org
Subject: more encoding problems


 Hi,
 C2.11, I moved my app from one server to another, which resulted some 
 pages to broke that is scands won't encode properly.
 I have this in my sitemap:

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 You can try this out:
 Old server
 http://77.240.23.91/cocoon/palaute_app/linkki/841 works
 http://77.240.23.91/cocoon/palaute_app/linkki/html/841 works
 New server
 http://88.148.163.59/cocoon/palaute_app/linkki/1059 works
 http://88.148.163.59/cocoon/palaute_app/linkki/html/1059 doesn't work 
 !!

 Any thoughts?
 I have tried a lot of things without success.

 - mika -

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



RE: web app directory

2012-09-14 Thread Robby Pelssers
But reading your mail twice... Are you actually uploading files inside the 
exploded war folder???

Not so nice in my opinion. Not sure if that is wise.  Or am I misinterpreting 
your use case?

Why not store/ upload the files in a configurable location?

Robby

-Original Message-
From: Paul Joseph [mailto:pjos...@gmail.com] 
Sent: Friday, September 14, 2012 5:27 PM
To: users@cocoon.apache.org
Subject: web app directory

Hi there,

I am using Tomcat 7 and Cocoon 2.1.11.

Question: How do I get the directory of my application as in "C:\Program 
Files\Apache Software Foundation\Tomcat 7.0\webapps\myapp"

I was using this call: System.getProperty("catalina.base")

But it only takes me as far as: "C:\Program Files\Apache Software 
Foundation\Tomcat 7.0"

the reason is the client wants to run many copies of myapp, each for a 
different group as in myapp1, myapp2 and so on.

Internally, in my code I needed this location to do things like upload 
files etc. and I was finding my locaiton before using the 
getProperty("catalina_base") and adding on to it "\myapp" which clearly 
won't work any more.

best
Paul

-
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: web app directory

2012-09-14 Thread Robby Pelssers
You might want to play with javax.servlet.getRealPath() but I read some 
comments that it might return null if the war is not exploded.

http://docs.oracle.com/javaee/6/api/index.html?javax/servlet/package-summary.html


-Original Message-
From: Paul Joseph [mailto:pjos...@gmail.com] 
Sent: Friday, September 14, 2012 5:27 PM
To: users@cocoon.apache.org
Subject: web app directory

Hi there,

I am using Tomcat 7 and Cocoon 2.1.11.

Question: How do I get the directory of my application as in "C:\Program 
Files\Apache Software Foundation\Tomcat 7.0\webapps\myapp"

I was using this call: System.getProperty("catalina.base")

But it only takes me as far as: "C:\Program Files\Apache Software 
Foundation\Tomcat 7.0"

the reason is the client wants to run many copies of myapp, each for a 
different group as in myapp1, myapp2 and so on.

Internally, in my code I needed this location to do things like upload 
files etc. and I was finding my locaiton before using the 
getProperty("catalina_base") and adding on to it "\myapp" which clearly 
won't work any more.

best
Paul

-
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: encoding issue

2012-08-31 Thread Robby Pelssers
Problem is I'm not using C2.1.x anymore so it's really hard to properly help 
you out here.

I know that for C2.2 we have to set 2 properties:
org.apache.cocoon.containerencoding=utf-8
org.apache.cocoon.formencoding=utf-8


As a side note: Check encoding in your xslt's

  

Robby

-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Friday, August 31, 2012 9:33 AM
To: users@cocoon.apache.org
Subject: RE: encoding issue


 Hi,
 yep, if I got you right, problems appear somewhere between the submit 
 and the outcome of the bind, at server side. Container is Tomcat 6.
 Something like this:
 flowscript:
 form.createBinding("cocoon:/form_" + id + "_bind");
 form.save(doc);
 cocoon.sendPage("vastaus-display-pipeline.jx", {title: "blaah, 
 blaah..", document: doc, id: id}

 sitemap:
 (this is for the dynamic binding..)
 
 
 
 
 
 

 and:

 

  



  


  


  
  
  


  


  
 
   
   
 
 
   
   
 
   
 
  
  

  

 

 and the #{$document} in the jx-template has lost scands

 - mika -


 On Fri, 31 Aug 2012 09:19:04 +0200, Robby Pelssers 
  wrote:
> Hi Mika,
>
> Some questions:
> - are you having problems submitting forms where the data is not
> received server side as UTF-8?
> - what application container are you using?  Tomcat, Jetty, ...
>
> Robby
>
> -Original Message-
> From: m...@digikartta.net [mailto:m...@digikartta.net]
> Sent: Wednesday, August 29, 2012 12:37 PM
> To: users@cocoon.apache.org
> Subject: encoding issue
>
>
>  Hi.
>
>  C2.11 and CForms. I loose scands after binding, they are all 
> replaced
>  by a question mark. I have read all the sites possible to resolve 
> this,
>  but without luck. All is UTF-8, except container-encoding 
> iso-8859-1.
>  Changing container to utf-8 will change the question marks to some 
> other
>  wrong ones and will do other harms.
>  What next? Checking the source code?
>
>  - mika -
>
> -
> 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


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



RE: encoding issue

2012-08-31 Thread Robby Pelssers
Hi Mika,

Some questions:
- are you having problems submitting forms where the data is not received 
server side as UTF-8?
- what application container are you using?  Tomcat, Jetty, ...

Robby

-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Wednesday, August 29, 2012 12:37 PM
To: users@cocoon.apache.org
Subject: encoding issue


 Hi.

 C2.11 and CForms. I loose scands after binding, they are all replaced 
 by a question mark. I have read all the sites possible to resolve this, 
 but without luck. All is UTF-8, except container-encoding iso-8859-1. 
 Changing container to utf-8 will change the question marks to some other 
 wrong ones and will do other harms.
 What next? Checking the source code?

 - mika -

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



RE: encoding issue

2012-08-31 Thread Robby Pelssers
Hi Mika,

Some questions:
- are you having problems submitting forms where the data is not received 
server side as UTF-8?
- what application container are you using?  Tomcat, Jetty, ...

Robby

-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Wednesday, August 29, 2012 12:37 PM
To: users@cocoon.apache.org
Subject: encoding issue


 Hi.

 C2.11 and CForms. I loose scands after binding, they are all replaced 
 by a question mark. I have read all the sites possible to resolve this, 
 but without luck. All is UTF-8, except container-encoding iso-8859-1. 
 Changing container to utf-8 will change the question marks to some other 
 wrong ones and will do other harms.
 What next? Checking the source code?

 - mika -

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



RE: Re: back button results in a blank

2012-08-22 Thread Robby Pelssers
I like problems which resolve themselves ;-)

Thx for the update,
Robby

From: Paul Joseph [mailto:pjos...@gmail.com]
Sent: Wednesday, August 22, 2012 4:20 PM
To: users@cocoon.apache.org
Subject: Fwd: Re: back button results in a blank

sorry about this, but it is indeed my error.

The back button works with Cocoon flowscript even in IE.

The problem was I was catching an error and displaying the error to the user in 
a new page that replaced the old one.

I gather in this process, the "continuation" gets "lost" and as a result, the 
back button no longer works.

What I was doing was as below:
if(errorMsg.length()>0) {
   errorPage("There appear to have been important changes made already. 
 Are you sure you want to clear all the fields before saving this task?  If 
yes, please click the back button.  Otherwice, click Create to start a new 
entry.")
   return;
}

brgds
paul


 Original Message 
Subject:

Re: back button results in a blank

Date:

Wed, 22 Aug 2012 10:15:19 -0400

From:

Paul Joseph <mailto:pjos...@gmail.com>

To:

users@cocoon.apache.org<mailto:users@cocoon.apache.org>



Yes, sorry about that I am indeed using Flowscript (Cocoon 2.11).

I did read that "back button" issues are confined to IE and FF but not to 
Chrome.  I have not confirmed that.

I should do my homework and install the full Flowscript example set that comes 
with Cocoon and try it with those.

brgds
Paul
On 8/22/2012 4:57 AM, Robby Pelssers wrote:
Well,

I am assuming Paul is using flowscript (continuations) and they 'should' solve 
the back button problem for all I know.  But let's first find out which version 
of cocoon he's using and if he is indeed using flowscript.

@Paul,
Could you perhaps setup a minimalistic test case and share it so we can test 
ourselves?

Robby

From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Wednesday, August 22, 2012 10:54 AM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: Re: back button results in a blank

Hi Paul,

The browser's back button problem is not a specific cocoon one.
I believe that it could have different causes.
It is even browser specific, I believe. The back button is just supposed to 
show the "previous viewed resource".
I usually stick to 'restful design principles'. This may help to alleviate back 
button issues.
As a principle, I never make webapps block the back button.
I know this sounds a bit vague, but it's for the moment my best shot. Anyone 
else?

Kind regards,
Jos
On Tue, Aug 21, 2012 at 8:47 PM, Paul Joseph 
mailto:pjos...@gmail.com>> wrote:
Hi there,

I notice that many times when I click the browser's back button, when I expect 
to see the form previously that was displayed, instead I get a blank page and 
have to click the browser's refresh button to retrieve what was there.

This is IE8 in particular.

Is there any simple way to preserve what was there before so that on clicking 
the back button it displays directly instead of having to click refresh on a 
blank page?

paul

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



--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson







RE: back button results in a blank

2012-08-22 Thread Robby Pelssers
Well,

I am assuming Paul is using flowscript (continuations) and they 'should' solve 
the back button problem for all I know.  But let's first find out which version 
of cocoon he's using and if he is indeed using flowscript.

@Paul,
Could you perhaps setup a minimalistic test case and share it so we can test 
ourselves?

Robby

From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Wednesday, August 22, 2012 10:54 AM
To: users@cocoon.apache.org
Subject: Re: back button results in a blank

Hi Paul,

The browser's back button problem is not a specific cocoon one.
I believe that it could have different causes.
It is even browser specific, I believe. The back button is just supposed to 
show the "previous viewed resource".
I usually stick to 'restful design principles'. This may help to alleviate back 
button issues.
As a principle, I never make webapps block the back button.
I know this sounds a bit vague, but it's for the moment my best shot. Anyone 
else?

Kind regards,
Jos
On Tue, Aug 21, 2012 at 8:47 PM, Paul Joseph 
mailto:pjos...@gmail.com>> wrote:
Hi there,

I notice that many times when I click the browser's back button, when I expect 
to see the form previously that was displayed, instead I get a blank page and 
have to click the browser's refresh button to retrieve what was there.

This is IE8 in particular.

Is there any simple way to preserve what was there before so that on clicking 
the back button it displays directly instead of having to click refresh on a 
blank page?

paul

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



--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



RE: How to build cocoon 2.2 from source for debugging

2012-07-10 Thread Robby Pelssers
You can also change the problematic pom’s to point to the correct parent pom.xml

  
org.apache.cocoon
cocoon
10-SNAPSHOT  --> this is currently 6-SNAPSHOT
../parent
  

@Francesco, can you confirm this?  I guess we should fix this in trunk in that 
case.

Robby


[ERROR] The build could not read 7 projects -> [Help 1]
[ERROR]
[ERROR]   The project org.apache.cocoon:cocoon-blocks-modules:6-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\blocks\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 24, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.apache.cocoon:cocoon-commons-modules:2-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\commons\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 27, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.apache.cocoon:cocoon-core-modules:6-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\core\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 25, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.apache.cocoon:cocoon-dists-modules:2-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\dists\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 26, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project 
org.apache.cocoon:cocoon-servlet-service-components:1.1.0-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\core\cocoon-servlet-service\cocoon-se
rvlet-service-components\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 24, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project 
org.apache.cocoon:cocoon-servlet-service-components-sample:1.0.0-SNAPSHOT 
(C:\development\workspaces\cocoon22\trunk\core\cocoon-servlet-service\co
coon-servlet-service-components-sample\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact 
org.apache.cocoon:cocoon:pom:6-SNAPSHOT and 'parent.relativePath' points at 
wrong local POM @ line 23, co
lumn 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.apache.cocoon:cocoon-project:1 
(c:\development\workspaces\cocoon22\trunk\pom.xml) has 1 error
[ERROR] Child module 
c:\development\workspaces\cocoon22\trunk\subprojects\pom.xml of 
c:\development\workspaces\cocoon22\trunk\pom.xml does not exist
[ERROR]

From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Tuesday, July 10, 2012 10:48 AM
To: users@cocoon.apache.org
Subject: Re: How to build cocoon 2.2 from source for debugging

Hi,
you shouldn't need to build 2.2 artifacts yourself, just use the provided maven 
dependencies as suggested.
Could you please describe your use case in order to understand whether you 
absolutely need to build the 2.2 source tree?

Regards.

On 10/07/2012 10:42, Huib Verwey wrote:
Hi Joel,

i had the same troubles as well, asked about it in the mailing as well, nothing 
changed apparently. It looks like a mess, which is strange. I got everything 
working in the end, but the easiest is to just add dependencies and don't try 
to compile everything yourself. If you
must you must, but I recommend against it. I hope you'll get away with not 
debugging the Cocoon source code.
Hartelijke groet,

Huib.

Verstuurd vanaf mijn iPhone

Op 9 jul. 2012 om 22:07 heeft "Joel McConaughy" 
mailto:joelmcconau...@gmail.com>> het volgende 
geschreven:
Unfortunately I am working on an app built on cocoon 2.2 so need to use that 
version.  Thanks for the quick reply though!

On Mon, Jul 9, 2012 at 1:00 PM, Reyes, Rafael 
mailto:rafael.re...@tigo.com.co>> wrote:
Hi joel, i had the same trouble when i began with cocoon but I recommend that 
you download the cocoon`s .war proyect, in google you can find this file with 
the name of cocoon 2.1.6 .war, after, you should to put this in the apache’s 
server deploying the proyect, clean some parts of the proyect and everything 
its going to be all right.

--

Francesco Chicchiriccò



ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member

http://people.apache.org/~ilgrosso/


RE: issue with form encoding C2.2

2012-06-06 Thread Robby Pelssers
I did found a workaround by the way…

If you add an extra request parameter called cocoon-form-encoding and set it to 
utf-8 it will work

Snippet from RequestProcessor.java:

protected Environment getEnvironment(String uri,
 HttpServletRequest req,
 HttpServletResponse res)
throws Exception {

String formEncoding = req.getParameter("cocoon-form-encoding");
if (formEncoding == null) {
formEncoding = this.settings.getFormEncoding();
}

HttpEnvironment env;
env = new HttpEnvironment(uri,
  req,
  res,
  this.servletContext,
  this.environmentContext,
  this.containerEncoding,
  formEncoding);
return env;
    }

From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Wednesday, June 06, 2012 1:10 PM
To: d...@cocoon.apache.org; users@cocoon.apache.org
Subject: issue with form encoding C2.2

Hi all,

Just wanted to have a short discussion on an issue that I wasted quite some 
hours on.  Let me first explain that I configured my cocoon block with 
following two properties as per http://cocoon.apache.org/2.2/1366_1_1.html :

org.apache.cocoon.containerencoding=UTF-8
org.apache.cocoon.formencoding=UTF-8


Recently I created a form showing pre-populated data from an xquery.  One form 
field contained the Ohm Ω character and the browser rendered if fine.  But I 
had to post the data back to the server and the Ohm sign got corrupted.

From firebug I could see following:
descriptiveTitle N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using 
NextPower technology
magCode R73
specificationStatus  Product

From flowscript:
descriptiveTitle=N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using 
NextPower technology
specificationStatus=Product
magCode=R73



So next I started looking at cocoon sources using URLDecoder and I had a 
suspicion that NetUtils might be responsible for the issue. But that didn’t 
seem to be the issue.  I managed to find out that the value I defined for 
formencoding is not actually used.  The reason is that it also is set in 
cocoon-core and either it doesn’t get overwritten or the property from 
cocoon-core is overwriting my own property value.

nxp10009@NXL01262 /c/development/workspaces/cocoon22/trunk/core
$ find . -name *.properties | xargs grep "formencoding"
./cocoon-core/src/main/resources/META-INF/cocoon/properties/core.properties:org.apache.cocoon.formencoding=ISO-8859-1

So what’s the best way to fix this?




issue with form encoding C2.2

2012-06-06 Thread Robby Pelssers
Hi all,

Just wanted to have a short discussion on an issue that I wasted quite some 
hours on.  Let me first explain that I configured my cocoon block with 
following two properties as per http://cocoon.apache.org/2.2/1366_1_1.html :

org.apache.cocoon.containerencoding=UTF-8
org.apache.cocoon.formencoding=UTF-8


Recently I created a form showing pre-populated data from an xquery.  One form 
field contained the Ohm Ω character and the browser rendered if fine.  But I 
had to post the data back to the server and the Ohm sign got corrupted.

From firebug I could see following:
descriptiveTitle N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using 
NextPower technology
magCode R73
specificationStatus  Product

From flowscript:
descriptiveTitle=N-channel 25 V 2.85 mΩ logic level MOSFET in LFPAK using 
NextPower technology
specificationStatus=Product
magCode=R73



So next I started looking at cocoon sources using URLDecoder and I had a 
suspicion that NetUtils might be responsible for the issue. But that didn’t 
seem to be the issue.  I managed to find out that the value I defined for 
formencoding is not actually used.  The reason is that it also is set in 
cocoon-core and either it doesn’t get overwritten or the property from 
cocoon-core is overwriting my own property value.

nxp10009@NXL01262 /c/development/workspaces/cocoon22/trunk/core
$ find . -name *.properties | xargs grep "formencoding"
./cocoon-core/src/main/resources/META-INF/cocoon/properties/core.properties:org.apache.cocoon.formencoding=ISO-8859-1

So what’s the best way to fix this?




RE: ok/cancel prompt followed by submit?

2012-05-30 Thread Robby Pelssers
Check this example: 
http://www.shiningstar.net/articles/articles/javascript/confirmsubmit.asp


-Original Message-
From: Paul Joseph [mailto:pjos...@gmail.com] 
Sent: Wednesday, May 30, 2012 4:28 PM
To: users@cocoon.apache.org
Subject: ok/cancel prompt followed by submit?

Hi there,

I was wondering how I could do this: prompt the user whether they wish 
to proceed or not.  If they want to, the form is submitted if not, not.

I am using Cocoon 2.1.11 and Flowscript/CForms

So, there are a number of rows that the user can select (highlight) and 
then click a "Delete" button whereupon I submit the row ids and delete 
the rows.  No problem.

The customer has now asked me to put a prompt, to ask the user to 
confirm, before the delete actually happens.  I was thinking of a 
JavaScript confirm box, and triggering it based on the onclick event 
from my Delete button.

But if the users confirms the delete, how do I call the same Delete 
button's submit action?

Paul

-
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: Sitemap: path matching

2012-05-24 Thread Robby Pelssers
That won't solve Jos's issue I'm afraid. From the docs it states: 'If set to 
true the values of a request parameter is available using a variable in the 
xslt with the name of the parameter.'  Jos doesn’t know which parameters will 
be passed upfront. This is merely a shortcut that prevents you from typing all 
parameters as  

Robby

-Original Message-
From: ktor...@agssa.net [mailto:ktor...@agssa.net] 
Sent: Thursday, May 24, 2012 6:55 PM
To: users@cocoon.apache.org
Cc: cocoon-us...@apache.org
Subject: Re: Sitemap: path matching

Hello Gilbert,

A way to catch multiple parameter is to have your own stylesheet where you
define as many parameters as you need and then you use the XSLT
Transformer[1] to get them on your pipeline.

The way to retrieve your parameters is setting to "true" the property
"use-request-parameters"  at your pipeline, eg:

 

  

  

BTW - The '**' wildcard is greedy and thus the following sample matches as
{"foo/bar","baz","bug"}.

[1] http://cocoon.apache.org/2.1/userdocs/xslt-transformer.html

Thanks.

Kind regards,
Karen Torres.

> Hi all,
>
> I am looking for a way to pass a variable number of sitemap parameters to
> a
> sitemap component:
> I explain the use case:
>
> "**" stands for non-greedy multiple segment matcher, no?
>
> 
>   
>
> 
>
> Of course you could {1}, {2}, {3}  but that is a clutch.
> Is there an elegant way?
>
> Kind regards,
> Jos
>
>
> --
> The doctrine of human equality reposes on this: that there is no man
> really clever who has not found that he is stupid.
> -- Gilbert K. Chesterson
>


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



RE: Sitemap: path matching

2012-05-24 Thread Robby Pelssers
But as a little side note:

If all files in these folders were treated uniformely.. let's say with a 
map:read

You could just as well do


  


From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Thursday, May 24, 2012 4:48 PM
To: users@cocoon.apache.org
Subject: RE: Sitemap: path matching

The only way to work around this is what I've used in the past.

matchbypath/index.html/virtualrootfolder/themes/conservation

pattern="matchbypath/*.*/**"


From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Thursday, May 24, 2012 4:45 PM
To: users@cocoon.apache.org
Subject: Re: Sitemap: path matching

Hi Robby,

Here's an example:


conservation 

   => this is to be a hit for a matcher, and what I would like to 
pass to the generator:

   "matchbypath/{path}/{name}.{extension}"

   Of course, the pipeline matcher cannot know how many segments there 
will be.

Cheers,
Jos

On Thu, May 24, 2012 at 4:38 PM, Robby Pelssers 
mailto:robby.pelss...@nxp.com>> wrote:
Can you give a few possible examples of the pattern that you're trying to match?

Ps.  Maybe a bit nasty as solution but let's say you want to handle multiple 
productId's


Pattern="generateProduct/*"

Example

generateProduct/[P1, P2, P3]

You just pass '[P1,P2,P3]' to your generator as a single argument and let the 
generator extract the ids.

Robby

From: Jos Snellings 
[mailto:jos.snelli...@upperware.biz<mailto:jos.snelli...@upperware.biz>]
Sent: Thursday, May 24, 2012 4:31 PM
To: cocoon-us...@apache.org<mailto:cocoon-us...@apache.org>
Subject: Sitemap: path matching

Hi all,

I am looking for a way to pass a variable number of sitemap parameters to a 
sitemap component:
I explain the use case:

"**" stands for non-greedy multiple segment matcher, no?


  



Of course you could {1}, {2}, {3}  but that is a clutch.
Is there an elegant way?

Kind regards,
Jos


--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson


RE: Sitemap: path matching

2012-05-24 Thread Robby Pelssers
The only way to work around this is what I've used in the past.

matchbypath/index.html/virtualrootfolder/themes/conservation

pattern="matchbypath/*.*/**"


From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Thursday, May 24, 2012 4:45 PM
To: users@cocoon.apache.org
Subject: Re: Sitemap: path matching

Hi Robby,

Here's an example:


conservation 

   => this is to be a hit for a matcher, and what I would like to 
pass to the generator:

   "matchbypath/{path}/{name}.{extension}"

   Of course, the pipeline matcher cannot know how many segments there 
will be.

Cheers,
Jos


On Thu, May 24, 2012 at 4:38 PM, Robby Pelssers 
mailto:robby.pelss...@nxp.com>> wrote:
Can you give a few possible examples of the pattern that you're trying to match?

Ps.  Maybe a bit nasty as solution but let's say you want to handle multiple 
productId's


Pattern="generateProduct/*"

Example

generateProduct/[P1, P2, P3]

You just pass '[P1,P2,P3]' to your generator as a single argument and let the 
generator extract the ids.

Robby

From: Jos Snellings 
[mailto:jos.snelli...@upperware.biz<mailto:jos.snelli...@upperware.biz>]
Sent: Thursday, May 24, 2012 4:31 PM
To: cocoon-us...@apache.org<mailto:cocoon-us...@apache.org>
Subject: Sitemap: path matching

Hi all,

I am looking for a way to pass a variable number of sitemap parameters to a 
sitemap component:
I explain the use case:

"**" stands for non-greedy multiple segment matcher, no?


  



Of course you could {1}, {2}, {3}  but that is a clutch.
Is there an elegant way?

Kind regards,
Jos


--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



RE: Sitemap: path matching

2012-05-24 Thread Robby Pelssers
Can you give a few possible examples of the pattern that you're trying to match?

Ps.  Maybe a bit nasty as solution but let's say you want to handle multiple 
productId's


Pattern="generateProduct/*"

Example

generateProduct/[P1, P2, P3]

You just pass '[P1,P2,P3]' to your generator as a single argument and let the 
generator extract the ids.

Robby

From: Jos Snellings [mailto:jos.snelli...@upperware.biz]
Sent: Thursday, May 24, 2012 4:31 PM
To: cocoon-us...@apache.org
Subject: Sitemap: path matching

Hi all,

I am looking for a way to pass a variable number of sitemap parameters to a 
sitemap component:
I explain the use case:

"**" stands for non-greedy multiple segment matcher, no?


  



Of course you could {1}, {2}, {3}  but that is a clutch.
Is there an elegant way?

Kind regards,
Jos


--
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson



Bug in servlet service framework C2.2??

2012-05-15 Thread Robby Pelssers
Hi all,

As an important side note.  I've run into a serious limitation a few times 
already.

Let me explain shortly what I try to do.

I want to e.g. generate an XML representation of CSV data from an XQuery 
generator.  I borrowed the schema from the CSV generator and dropped some 
attributes which are not useful.


http://apache.org/cocoon/csv/1.0";>

Column A
Column B
Column C


Field A1
Field B1
Field C1


Field A2
Field B2
Field C2



Next I wrote a XSLT that transforms this into a CSV file.




http://www.w3.org/1999/XSL/Transform";
  xmlns:xs="http://www.w3.org/2001/XMLSchema";
  xmlns:fn="http://www.w3.org/2005/xpath-functions";
  xmlns:csv="http://apache.org/cocoon/csv/1.0";>

  

  
  

  

  

  


  

  

  

  

  



To test if it works I wrote a little match pattern:


  
  

  
  


And the output works like a charm:
Column A   Column B   Column C
Field A1   Field B1   Field C1
Field A2   Field B2   Field C2

But I wanted to create a reusable transformation service and setup following 
pattern:


  
  

  
  


Unfortunately I can't call this from another cocoon block like e.g.

  
  
  

  
  
  


The reason is that only XML is supported evidently.  But is this a requirement 
by design or were such use cases not foreseen?!

Robby


Stacktrace:

2012-05-15 12:33:55.935::INFO:  Started SelectChannelConnector@0.0.0.0:
javax.servlet.ServletException: org.apache.cocoon.ProcessingException: Failed 
to process pipeline
at [SAXParseException] - 
servlet:com.nxp.spider2.shared.service+:/csv-transformation-service/blabla:1:1
at  - 
file:///C:/development/workspaces/intellij11/CTPI-PX/spider2/search/target/classes/COB-INF/sitemap.xmap:354:39
at  - 
file:///C:/development/workspaces/intellij11/CTPI-PX/spider2/search/target/classes/COB-INF/sitemap.xmap:351:48
at  - 
file:///C:/development/workspaces/intellij11/CTPI-PX/spider2/search/target/classes/COB-INF/sitemap.xmap:350:64
at  - 
file:///C:/development/workspaces/intellij11/CTPI-PX/spider2/search/target/classes/COB-INF/sitemap.xmap:349:57
at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:230)
at 
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
at 
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
at 
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy21.service(Unknown Source)
at 
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet.service(ReloadingServlet.java:115)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at 
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:66)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
org.apache.cocoon.servlet.DebugFilter.doFilter(DebugFilter.java:167)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:66)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter.doFilter(ReloadingSpringFilter.java:71)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:66)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
org.mortba

how to pass parameters to a service transformer

2012-05-15 Thread Robby Pelssers
Hi all,

I've got a question regarding the service transformer.  How do I pass any 
parameters to the service?  The demo from get-started page is not clear on this 
topic.



  
  

  
  




  
  

  
  


Robby


RE: cocoon migrate from 2.1 to 2.2 or 3 (was Re: Forms and maps)

2012-04-20 Thread Robby Pelssers
Hi Thorsten,

This line kind of triggered me to reply: "you can even use even generic app 
generator to create 
native android, etc. apps without writing a single line of code"

Are you aware of people having done so or were you involved yourself?  If so... 
you don't happen to have some guidelines or sample app to take a look at?

Cheers,
Robby


-Original Message-
From: Thorsten Scherler [mailto:scher...@gmail.com] 
Sent: Wednesday, April 18, 2012 5:08 PM
To: users@cocoon.apache.org
Subject: cocoon migrate from 2.1 to 2.2 or 3 (was Re: Forms and maps)

The whole thread had changed the subject a long time ago ...

On 04/18/2012 03:29 PM, Mark H. Wood wrote:
> On Wed, Apr 18, 2012 at 11:34:26AM +0200, Derek Hohls wrote:
>> It all depends on your environment and the "rate of change". There are
>> many back-end systems (running on old but reliable technology) that
>> hardly change at all.  However, the web (and now tablets/mobile) has a
>> very high rate of change (and expectation of change).  The point here is
>> that by using more loosely-coupled modules then you will only have to
>> change the parts that really need to be changed; a monolithic approach
>> is less amenable to that.
> I think this may actually underscore the O.P.'s point.  Changing the
> whole world in one go is the monolithic approach.  The modular
> approach would enable choosing new mechanisms for new work and
> sticking with old, established mechanisms for existing, still-useful
> work when that makes sense.  Having to throw out piles of satisfactory
> working code just to use a dependency version that still has the
> attention of its maintainers is really unwelcome.
>
> I think the complaint is that Cocoon 3 is really Butterfly 1.

Well, yes and no.

If you have experience with c2.x you can do close to the same thing on 
c3. Most of the pipelines i saw are pure generator -> xsl transform -> 
serializer stuff that has not changed a bit.


Yes there are some components not yet migrated but we are an open source 
project and welcome every patch. However the basic idea from the start 
of 2.1 blocks had been to slim down cocoon. c3 is the consequence of 10 
years of "slim" down.

To pin it down on a concrete code example if you wanted a specific 
component in c2.1 you needed to get hold of an avalon manager, ask the 
manager to lookup your component (or additional ones to do the final 
lookup). Every component needed to be configured and registered with the 
manager. Leaving your 20 lines of code being 90% boilerplate code.

In comparison in c3 you do
@Autowired
@Qualifier("messageSource")
ReloadableResourceBundleMessageSource messageSource;

To inject your variables and creating a setter you are not forced to 
even use spring BUT you can still reuse your code. ...and best NO 
boileplate code, resulting is much cleaner code.

I had chosen c3 as  base framework for our current project because that 
allowed me to have pure java devs in my team that never worked with 
cocoon at all and they were productive since day one (which is not 
possible in 2.x having made that experience in other projects).

Bottom line regarding forms handling html5 + ajax framework + your js + 
css as view technologies and c3 rest service as form action handler is a 
beautiful base due to various reasons:
- mobile ready (you can even use even generic app generator to create 
native android, etc. apps without writing a single line of code)
- REST services are not bound to c3
- REST services can call or even dynamically create c3 based pipelines.

-- 
Thorsten Scherler
codeBusters S.L. - web based systems


http://www.codebusters.es/


-
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: Forms and maps

2012-04-18 Thread Robby Pelssers
Although I don't think this mailing list is the appropriate list to discuss 
these kinds of issues I will post my final word on this.

Just like we all use Java (at least the ones working with Cocoon) most of us 
should be fair to admit that Java's progress is heavily been slowed down by 
trying to be backwards compatible.  Lots of newer/cooler/more productive 
languages have evolved among which to name an example is Scala.

One of the key arguments for C3 was in fact opening up the opportunity to:
- run a pipeline from command line
- embed cocoon into other frameworks

And although you might have no need for this, I think it enables freedom / 
choice which is a great thing.  So C3's mission statement could very well be:
- you choose your favourite (web)stack and we will take care of the XML 
processing.
- Or you could use C3's REST controllers and stick with 1 single framework

Robby



-Original Message-
From: Mark H. Wood [mailto:mw...@iupui.edu] 
Sent: Wednesday, April 18, 2012 3:29 PM
To: users@cocoon.apache.org
Subject: Re: Forms and maps

On Wed, Apr 18, 2012 at 11:34:26AM +0200, Derek Hohls wrote:
> It all depends on your environment and the "rate of change". There are 
> many back-end systems (running on old but reliable technology) that 
> hardly change at all.  However, the web (and now tablets/mobile) has a 
> very high rate of change (and expectation of change).  The point here 
> is that by using more loosely-coupled modules then you will only have 
> to change the parts that really need to be changed; a monolithic 
> approach is less amenable to that.

I think this may actually underscore the O.P.'s point.  Changing the whole 
world in one go is the monolithic approach.  The modular approach would enable 
choosing new mechanisms for new work and sticking with old, established 
mechanisms for existing, still-useful work when that makes sense.  Having to 
throw out piles of satisfactory working code just to use a dependency version 
that still has the attention of its maintainers is really unwelcome.

I think the complaint is that Cocoon 3 is really Butterfly 1.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.

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



RE: Forms and maps

2012-04-18 Thread Robby Pelssers
Well,

I also have a pretty strong opinion about the remark you make now.  

Let's first make the distinction between
- innovators  (people who are always trying to improve the way of working 
themselves  --> E.g. Reinhard Poetz who started C3)
- early adapters  (people who see clear benefits in innovative technologies .. 
e.g. early committers / users like Simone Tripodi)
- reasonable adapters  (people who upgrade their software after major stable 
releases)
- slow adapters   (people who are satisfied with current way of working and 
wait till they are forced to upgrade)


Point is... there are always costs involved.  If you created lots of C2.1.x 
apps and you want to start using the latest and greatest... you have 2 choices. 

Either you start creating NEW apps using the latest technology and leave the 
existing ones alone  --> Low adaptation cost
Or you decide to rewrite/upgrade your existing apps --> higher adaptation cost

Sometimes the upgrade path is hard to sell to your customer if the upgrade does 
not provide immediate visible benefits.

But let's consider you are a slow adapter and you get forced to upgrade at some 
point.  You have put great amounts of effort in getting those Cforms working 
and all logic is contained in flowscript  (both are deprecated in C3).

Now what do you think the cost of sticking with the old technology is?  It's 
even much higher. I think for most developers the easiest approach would be to 
follow that of a reasonable adapter.  It balances the Costs involved in a safer 
way.

Robby






-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Wednesday, April 18, 2012 11:52 AM
To: users@cocoon.apache.org
Subject: Re: Forms and maps


 Torsten,
 I understand your points.
 Still, it depends on what are trying to achieve, how much do you have 
 time for it and what are your skills and competence. Also, from the 
 point of the business view, there is a concept of opportunity costs. It 
 may be reasonable to go on with the old framework, even if the newer one 
 would be much better. On the other hand, starting with the old one isn't 
 smart. So suggestion to start with (or wait for) the stable C3 can be 
 very wise decision.

 - mika -


 On Wed, 18 Apr 2012 11:37:59 +0200, Thorsten Scherler 
  wrote:
> On 04/18/2012 07:58 AM, m...@digikartta.net wrote:
>>
>> Ciao Alberto,
>> you'll probably right.
>>
>> What comes to Cocoon lifecycle, I don't get it. Has C3 anything in 
>> common with C2 except the concept of pipelines? Can you do the same 
>> things with it?
>> When C2.2 was published, I fell off the wagon because of techical 
>> differences. C3 knocked me out for good. If you think of the user 
>> coming from C2.1 environment who has get used to utilize flowscript, 
>> templates, cforms, xsp etc and think of him/her trying to get 
>> accustomed in C3, I think the least one can say is that he/she will be 
>> totally in a faint.
>>
>> I don't either get the eagerness for dumbing all the "good old" 
>> techiques and frameworks.
>
> Well if you refer to avalon as good old framework, I think dropping
> that is the best thing that happened for c3. To use spring is using
> the de facto industry standard and I bet there are MUCH MORE people
> having used spring then avalon. Other then that xsp, cforms, ... are
> home grown that are only known by nerds and which never have reached
> to be a standard. Like other said in their responses the technology
> ecosystem is changing rapidly and e.g. cform is nightmare to
> understand, pain to extend and never had been really stable. Further
> it brings no benefit over using html5 forms and REST services for the
> ajax calls which is so much straight forward and ... de facto 
> industry
> standard for web2 apps.
>
> I migrated a couple of 2.1 generators and  transformer and it is not
> too complicated to migrate. Further the whole concept is still the
> same only details changed (e.g. validity and cache keys)
>
> The limitation of c2.x had been Avalon all this years. In c3 we
> finally can use transformer as simple sax handler outside cocoon.
>
>> Of course the general abandonment will halt the development but if 
>> you think something like C2.1 and C2.2, I guess they will be useful 
>> for years to go, if you are willing and capable of updating some parts 
>> by your own.
>
> Having worked with each version I see your point, but would strongly
> advice people to look into c3 when we release it in a stable version
> (hopefully in the next couple of month).
>
> salu2


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



RE: Forms and maps

2012-04-18 Thread Robby Pelssers
You should read this article  'Why Good Programmers Are Lazy and Dumb'  
http://blogoscoped.com/archive/2005-08-24-n14.html

I think it's not so much about losing our jobs but about 
- trying to become more productive (getting more done in the same amount of 
time)
- avoiding repetitive work


The ones who do actually have more market value compared to their competitors.  
So even from financial point of view there is a drive towards doing exactly the 
above.  

Why does Apple release a new iphone / ipad each year?   Because they have to 
keep generating a income...   That does not mean the previous products were of 
poor quality.  

Robby


-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Wednesday, April 18, 2012 11:25 AM
To: users@cocoon.apache.org
Subject: RE: Forms and maps


 Absolutely. But trying to stay on the edge of the trends won't fit for 
 us all.
 And continous rewriting of apps doesn't make any sense. Why on earth we 
 can't create something that would last at least a decade?
 Half of us would be out of jobs?

 - mika -


 On Wed, 18 Apr 2012 10:50:37 +0200, gelo1234  
 wrote:
> I totally agree with Robby's opinion. The trend is to use HTML5 on
> the client side in case of Web apps.
>
> Greetings,
>  Greg
> 18-04-2012 10:27, "Robby Pelssers"  napisał(a):
>  Just my 2 cents on this topic...
>
>  Cocoon forms was at the time in my eyes a pretty awesome solution to
> build highly dynamic forms with support for continuations. But as we
> all know this puts considerable strain on the server side.  Gradually
> we started seeing a tendency towards AJAX (XmlHttpRequests) which is 
> a
> fancy word for:
>  - no complete page refresh
>  - partial re-rendering of page
>  - only fetching the minimal amount of data
>  - let the browser do the heavy lifting
>
>  This trend is evolving even further now with Websockets.
>
>  One could easily say that the same discussions hold for database
> related technologies. Hibernate was the big revelation, a super
> abstraction over RDBMS dialects.  It greatly reduces portability but
> it just doesn't always do the right thing (e.g. performance wise) so
> some people reverted back to plain jdbc wrappers.
>
>  XSP was very convenient but it allows developers to mix controller /
> view which is now seen as a bad habit.
>
>  Avalon was the way forward to configure your components at the time
> and next dependency injection became the most hyped buzzword.  Spring
> framework and google juice came into play.
>
>  I guess it's a matter of taste and the willingness to move forward.
>  All (web)frameworks and technologies move forward (willingly or
> not):
>  - new JDK
>  - newer versions of dependencies
>  - Ant --> maven
>  - ...
>
>  Recently there were some rants against XSLT
> (http://www.snoyman.com/blog/2012/04/xslt-rant.html [2] ).  Just try
> transforming XML from your most favorite programming language and you
> might be in for a surprise.  Surely XSLT takes a lot of typing but
> also XSLT is evolving just as XQuery is.
>
>  I can only advise to take a good look around and find the best match
> for your requirements.  If that is all about building dynamic forms
> wicket might be a good fit.  Cocoon still is and certainly will be
> for the near future the best choice for transforming XML.
>
>  Cheers,
>  Robby
>
>  -Original Message-
>  From: m...@digikartta.net [3] [mailto:m...@digikartta.net [4]]
>  Sent: Wednesday, April 18, 2012 7:58 AM
>  To: users@cocoon.apache.org [5]
>  Subject: Re: Forms and maps
>
>   Ciao Alberto,
>   you'll probably right.
>
>   What comes to Cocoon lifecycle, I don't get it. Has C3 anything in
>   common with C2 except the concept of pipelines? Can you do the
> same
>   things with it?
>   When C2.2 was published, I fell off the wagon because of techical
>   differences. C3 knocked me out for good. If you think of the user
> coming
>   from C2.1 environment who has get used to utilize flowscript,
> templates,
>   cforms, xsp etc and think of him/her trying to get accustomed in
> C3, I
>   think the least one can say is that he/she will be totally in a
> faint.
>
>   I don't either get the eagerness for dumbing all the "good old"
>   techiques and frameworks. Of course the general abandonment will
> halt
>   the development but if you think something like C2.1 and C2.2, I
> guess
>   they will be useful for years to go, if you are willing and
> capable of
>   updating some parts by your own.
>
>   cheers,
>   - mika -
>
>   P.S. There are still several actors using C2.0..
>
>   On Tue, 17 Apr 2012 22:49:37 +0200, Alberto
>   w

RE: Forms and maps

2012-04-18 Thread Robby Pelssers
Just my 2 cents on this topic...

Cocoon forms was at the time in my eyes a pretty awesome solution to build 
highly dynamic forms with support for continuations. But as we all know this 
puts considerable strain on the server side.  Gradually we started seeing a 
tendency towards AJAX (XmlHttpRequests) which is a fancy word for:
- no complete page refresh
- partial re-rendering of page
- only fetching the minimal amount of data 
- let the browser do the heavy lifting

This trend is evolving even further now with Websockets.

One could easily say that the same discussions hold for database related 
technologies. Hibernate was the big revelation, a super abstraction over RDBMS 
dialects.  It greatly reduces portability but it just doesn't always do the 
right thing (e.g. performance wise) so some people reverted back to plain jdbc 
wrappers.

XSP was very convenient but it allows developers to mix controller / view which 
is now seen as a bad habit.

Avalon was the way forward to configure your components at the time and next 
dependency injection became the most hyped buzzword.  Spring framework and 
google juice came into play.

I guess it's a matter of taste and the willingness to move forward.  All 
(web)frameworks and technologies move forward (willingly or not):
- new JDK
- newer versions of dependencies
- Ant --> maven
- ...

Recently there were some rants against XSLT 
(http://www.snoyman.com/blog/2012/04/xslt-rant.html ).  Just try transforming 
XML from your most favorite programming language and you might be in for a 
surprise.  Surely XSLT takes a lot of typing but also XSLT is evolving just as 
XQuery is.

I can only advise to take a good look around and find the best match for your 
requirements.  If that is all about building dynamic forms wicket might be a 
good fit.  Cocoon still is and certainly will be for the near future the best 
choice for transforming XML.

Cheers,
Robby

 

-Original Message-
From: m...@digikartta.net [mailto:m...@digikartta.net] 
Sent: Wednesday, April 18, 2012 7:58 AM
To: users@cocoon.apache.org
Subject: Re: Forms and maps


 Ciao Alberto,
 you'll probably right.

 What comes to Cocoon lifecycle, I don't get it. Has C3 anything in 
 common with C2 except the concept of pipelines? Can you do the same 
 things with it?
 When C2.2 was published, I fell off the wagon because of techical 
 differences. C3 knocked me out for good. If you think of the user coming 
 from C2.1 environment who has get used to utilize flowscript, templates, 
 cforms, xsp etc and think of him/her trying to get accustomed in C3, I 
 think the least one can say is that he/she will be totally in a faint.

 I don't either get the eagerness for dumbing all the "good old" 
 techiques and frameworks. Of course the general abandonment will halt 
 the development but if you think something like C2.1 and C2.2, I guess 
 they will be useful for years to go, if you are willing and capable of 
 updating some parts by your own.

 cheers,
 - mika -

 P.S. There are still several actors using C2.0..


 On Tue, 17 Apr 2012 22:49:37 +0200, Alberto  
 wrote:
> On 04/13/2012 07:18 PM, Mika M Lehtonen wrote:
>> Interesting,
>> I am also integrating maps into sites produced with Cocoon 2.1x. I
>> have no answer to you but maybe we could collaborate on this issue?
>> OpenLayers widget would be something!
>
> Just some considerations.
> I like very much cocoon, its philosophy, and the way to produce
> application with it and especially with forms. But we must remain
> realistic: in the last years the pace of the develop of cocoon is 
> slow
> and the next release will be something different. For example, the
> integration with Wicket seems to be the sign that forms will not be 
> more
> developed.
> Due to the fact that I don't know how to develop a new widget for
> cocoon, I was waiting for some clue or suggest to evaluate the effort
> needed.
> Unfortunately I have not received any answer so I'm considering to
> invest my time in another framework (Wicket) that can solve this kind
> problem and has a future more outlined.
>
> Ciao
>
> Alberto
>
>
>>
>> cheers,
>> mika
>>
>>
>> 13.4.2012 20:03, Alberto kirjoitti:
>>> Hi,
>>>
>>> I'm using cocoon 2.1.12-dev and I'm facing how to include a map in
>>> cocoon forms.
>>> I have to do simple things from flowscript: load a kml url and 
>>> receive
>>> the coordinates of an area selection.
>>> I'm considering to use OpenLayers or Google Maps. Looking sources I
>>> found already existing widget classes for GoogleMaps
>>> (org.apache.cocoon.forms.formmodel.GoogleMap) but it is 
>>> undocumented and
>>> using it I have the following error: "Non-existing component for 
>>> this
>>> hint (Key='googlemap')". Moreover it seems it lacks methods to load 
>>> a
>>> kml file.
>>>
>>> So, which is the best way to do it? The googlemap widget is 
>>> working?
>>> I have to write a new widget following the document
>>> http://wiki.apache.org/cocoon/CocoonFormsCreatingWidgets?
>>>

using proxy from flowscript in Cocoon2.2

2012-04-16 Thread Robby Pelssers
Hi all,

I have a use case where I need to post data to an Alfresco service which 
returns JSON response.  Currently I just posted the page and showed the JSON 
data but ideally I want to stay on the same page and make an XMLhttpRequest 
from the client side.  As this is crossdomain I need to setup a proxy service 
in flowscript but I can't seem to find an easy way to accomplish this.

Anyone who has a nice suggestion or some sample snippets laying around?

Robby


RE: Cocoon2.2 maven jetty plugin issue

2012-04-11 Thread Robby Pelssers
In reply to my own question.  We don't see consistent behaviour.  Some blocks 
startup properly so this might be caused by another issue.  It's too bad from 
the stacktrace I don't get any insight into the issue ;-(

Robby

From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Wednesday, April 11, 2012 3:39 PM
To: d...@cocoon.apache.org; users@cocoon.apache.org
Subject: Cocoon2.2 maven jetty plugin issue

Hi guys,

I have been facing an issue related to the maven jetty plugin which is used to 
start a single C2.2 block.   Just for the record I have to mention that this 
has always worked in the past.  I have a strong suspicion that this is somehow 
related to our upgrade to Maven 3.

Did anybody else have similar issues and if so, were you able to resolve this?  
 I already tried switching to a newer jetty plugin but I could not get it 
working unfortunately.

2012-04-11 15:33:01.805:INFO:/:Initializing Spring root WebApplicationContext
2012-04-11 15:33:03.102:WARN::Failed startup of context 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@dd0f87{/,C:\development\workspaces\intellij11\CTPI-PX\spider2\shared\target\rcl\webapp}
java.lang.RuntimeException: Cannot invoke listener 
org.springframework.web.context.ContextLoaderListener@182752b
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.invoke(ReloadingListener.java:190)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.contextInitialized(ReloadingListener.java:213)
at 
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
at 
org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at 
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454)
at 
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
at 
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
at 
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at 
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc

Cocoon2.2 maven jetty plugin issue

2012-04-11 Thread Robby Pelssers
Hi guys,

I have been facing an issue related to the maven jetty plugin which is used to 
start a single C2.2 block.   Just for the record I have to mention that this 
has always worked in the past.  I have a strong suspicion that this is somehow 
related to our upgrade to Maven 3.

Did anybody else have similar issues and if so, were you able to resolve this?  
 I already tried switching to a newer jetty plugin but I could not get it 
working unfortunately.

2012-04-11 15:33:01.805:INFO:/:Initializing Spring root WebApplicationContext
2012-04-11 15:33:03.102:WARN::Failed startup of context 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@dd0f87{/,C:\development\workspaces\intellij11\CTPI-PX\spider2\shared\target\rcl\webapp}
java.lang.RuntimeException: Cannot invoke listener 
org.springframework.web.context.ContextLoaderListener@182752b
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.invoke(ReloadingListener.java:190)
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.contextInitialized(ReloadingListener.java:213)
at 
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
at 
org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at 
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454)
at 
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
at 
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
at 
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at 
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at 
org.codehaus.plex

RE: Problem in designing pipelines

2012-03-23 Thread Robby Pelssers
The default generator @type is the XML file generator. So if 
cocoon://{1}/tree-expo-get-children returns XML you don't need to specify a 
type on the generator.

Robby

From: Patricia Déchandol [mailto:pdechan...@ajlsm.com]
Sent: Friday, March 23, 2012 4:54 PM
To: users@cocoon.apache.org
Subject: Re: Problem in designing pipelines

Yes, I understood this point I think.
But which the of generator must I call there ? No particular type ?
It may like this ?
Because if it's supposed to work, the error I meet when I use a generator must 
be due to something else.

Patricia

Le 23 mars 2012 à 16:04, Robby Pelssers a écrit :


You should not use map:read but map:generate when you want to do further 
processing.

  
   
   
   
 


From: Patricia Déchandol [mailto:pdechan...@ajlsm.com]
Sent: Friday, March 23, 2012 3:31 PM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: Problem in designing pipelines

Hi everybody,

I have a problem understanding how to write my pipelines.

I have a first pipeline :

 
   
  
   
   
   
 

This pipeline works perfectly resulting a XML tree.
I would want to applicate another XSL to the resulting XML.

You will say that I just have to put another  after the first 
one.
But I can't, because of a particularity :  the call to this first pipeline is 
iterative : the transform call this same pipeline.

So I thought about writing another :

 
   
   
   
 

The problem is that when I execute this pipeline, I get the XML document 
resulting from the map:read but the transform is not performed.
If I put a map:generate replacing the map:read, the execution fails with an 
error in declaration of my XSL.

I don't understand how I can chain these transforms.
Which generator could work ?

Thanks for your help

Patricia



RE: Problem in designing pipelines

2012-03-23 Thread Robby Pelssers
You should not use map:read but map:generate when you want to do further 
processing.

  
   
   
   
 


From: Patricia Déchandol [mailto:pdechan...@ajlsm.com]
Sent: Friday, March 23, 2012 3:31 PM
To: users@cocoon.apache.org
Subject: Problem in designing pipelines

Hi everybody,

I have a problem understanding how to write my pipelines.

I have a first pipeline :

 
   
  
   
   
   
 

This pipeline works perfectly resulting a XML tree.
I would want to applicate another XSL to the resulting XML.

You will say that I just have to put another  after the first 
one.
But I can't, because of a particularity :  the call to this first pipeline is 
iterative : the transform call this same pipeline.

So I thought about writing another :

 
   
   
   
 

The problem is that when I execute this pipeline, I get the XML document 
resulting from the map:read but the transform is not performed.
If I put a map:generate replacing the map:read, the execution fails with an 
error in declaration of my XSL.

I don't understand how I can chain these transforms.
Which generator could work ?

Thanks for your help

Patricia


RE: [C3] Working with archetypes [Was Re: parent of parent artifact?]

2012-03-22 Thread Robby Pelssers
In the root of your project folder you will see a rcl.properties file looking 
sth like this:

#com.nxp.spider2.shared.service%classes-dir=./target/classes

Just comment it out and this will tell the reloading classloader to reload 
files from the target/classes folder.

Robby

From: Lars Huttar [mailto:lars_hut...@sil.org]
Sent: Thursday, March 22, 2012 5:04 PM
To: users@cocoon.apache.org
Cc: Francesco Chicchiriccò
Subject: Re: [C3] Working with archetypes [Was Re: parent of parent artifact?]

As so often happens, asking for help generated some further thoughts and I was 
able to get things working better.

Although I had added a COB-INF/sitemap.xmap to src in my block 
(e-17-pub/src/main/resources/COB-INF/sitemap.xmap), I noticed that the target 
(e-17-pub/target/classes) did not have COB-INF/sitemap.xmap.

I quit jetty, and ran "mvn jetty:run" again -- and now the test sitemap works.

So apparently the problem was that my changes in the src tree were unnoticed.

The next question is, what is the best-practice way to develop? I don't think 
the intention is that every time I make a change, I'm supposed to stop and 
restart jetty in order to see my changes.

Maybe I misunderstood this paragraph from Francesco:


Coming to you question above: when developing, you only need your block - i.e. 
"mysite". Since cocoon blocks feature the reloading plugin, just launch your 
block with "mvn jetty:run" and start playing with 
mysite/src/main/resources/COB-INF/sitemap.xmap. All your changes will be 
immediately available.

Does this mean immediately after I restart jetty? Or immediately after I make 
changes? If the latter, what am I doing wrong, that I don't see this happening?

Thanks again!

Lars



On 3/22/2012 10:54 AM, Lars Huttar wrote:
Francesco,
Thanks for your patience. I feel like I'm very close, but I apparently still 
don't have some of the concept understood correctly, because things are not 
working for me.
[snip]

Notice that the base URL for the request is 
e-17-pub/./src/main/resources/COB-INF/
yet Cocoon doesn't seem to be looking at 
e-17-pub/./src/main/resources/COB-INF/sitemap.xmap.

Any ideas? Is it really running the webapp instead of the block? In that case 
do I need to put a mount command (or equivalent) in the webapp's sitemap to 
direct URLs to my block?

Thanks,
Lars



RE: [C3] Working with archetypes [Was Re: parent of parent artifact?]

2012-03-22 Thread Robby Pelssers
Unless you changed the spring application context that is auto-generated using 
the cocoon block archetype you should use:

http://localhost:/mysite/test.html

Robby

From: Lars Huttar [mailto:lars_hut...@sil.org]
Sent: Thursday, March 22, 2012 4:55 PM
To: users@cocoon.apache.org
Cc: Francesco Chicchiriccò
Subject: Re: [C3] Working with archetypes [Was Re: parent of parent artifact?]

Francesco,
Thanks for your patience. I feel like I'm very close, but I apparently still 
don't have some of the concept understood correctly, because things are not 
working for me.

I generated the myparent, mysite, and mywebapp artifacts as described in your 
instructions at http://markmail.org/message/d6m2yidkrfqkslo2 part C.

Then I went into mysite (instead of mywebapp) and ran mvn jetty:run.
Then I created a sitemap in mysite/src/main/resource/COB-INF and gave it a 
simple match pattern:
  

  

But when I try to exercise this test, by going to 
http://localhost:/test.html in the browser, I get an empty response (200 OK 
status but zero bytes of content), and the following error in 
mysite\target\work\log\cocoon.log:
2012-03-22 10:32:22,026 ERROR 24024212@qtp-19118752-2 
org.apache.cocoon.servlet.XMLSitemapServlet - Cocoon can't process the request.
org.apache.cocoon.sitemap.NoMatchingPipelineException: No pipeline matched the 
request '/test.html'

Here is a little more context from the log (note that e-17-pub is my version of 
mysite):

2012-03-22 10:32:22,022 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.servletservice.DispatcherServlet - DispatcherServlet: service 
servlet=org.apache.cocoon.servlet.XMLSitemapServlet@980484 mountPath= 
servletPath= pathInfo=/test.html
2012-03-22 10:32:22,022 INFO  24024212@qtp-19118752-2 
org.apache.cocoon.servlet.RequestProcessor - Performing GET request at 
/test.html
2012-03-22 10:32:22,022 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.servlet.RequestProcessor - The base URL for this request is 
file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/./src/main/resources/COB-INF/
2012-03-22 10:32:22,023 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelinesNode.invoke(/test.html)
2012-03-22 10:32:22,023 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelineNode(caching).invoke(/test.html)
2012-03-22 10:32:22,024 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
MatchNode.invoke(/test.html)
2012-03-22 10:32:22,024 DEBUG 24024212@qtp-19118752-2 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=, testValue=test.html, result=null
2012-03-22 10:32:22,024 INFO  24024212@qtp-19118752-2 
org.apache.cocoon.servlet.RequestProcessor - Sitemap execution for /test.html 
took 1.549768 ms.
2012-03-22 10:32:22,026 ERROR 24024212@qtp-19118752-2 
org.apache.cocoon.servlet.XMLSitemapServlet - Cocoon can't process the request.
org.apache.cocoon.sitemap.NoMatchingPipelineException: No pipeline matched the 
request '/test.html'
at 
org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:55) 
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]


Notice that the base URL for the request is 
e-17-pub/./src/main/resources/COB-INF/
yet Cocoon doesn't seem to be looking at 
e-17-pub/./src/main/resources/COB-INF/sitemap.xmap.

Any ideas? Is it really running the webapp instead of the block? In that case 
do I need to put a mount command (or equivalent) in the webapp's sitemap to 
direct URLs to my block?

Thanks,
Lars


On 3/22/2012 6:29 AM, Francesco Chicchiriccò wrote:
On 21/03/2012 21:09, Lars Huttar wrote:
[...]
Thank you, that is definitely clearer.
So I do my development in blocks, not in the webapp; the webapp is for 
packaging for external deployment.

The one thing I'm not clear on, then, is this part of your instructions: 
(http://markmail.org/message/d6m2yidkrfqkslo2 for full context)



C) If you want to develop a complete C3 web application

You need to generate a multimodule maven project [2] with the following 
structure:

myparent/
  mysite/
  mywebapp/
...


Now you can finally

cd mywebapp
mvn jetty:run

Why is this telling me to run jetty in mywebapp, instead of in mysite?
Maybe that's just a red herring (not important), but it has me confused.

Running "mvn jetty:run" in each of your blocks (i.e. mysite) will let you 
develop and test each single block.
If you want to look how the final webapp assembles everything together, you 
will have to run "mvn jetty:run" under mywebapp.

Having a single block (like as in your case) the two things above are 
equivalent.

Regards.


--

Francesco Chicchiriccò



Apache Cocoon PMC and Apache Syncope PPMC Member

http://people.apache.org/~ilgrosso/



  1   2   3   4   5   6   >