Re: [2.1] cinclude using a pipeline as a generator source

2016-05-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nico,

On 5/10/16 4:35 AM, Nico Verwer wrote:
> On 7-5-2016 15:10, Christopher Schultz wrote:
>> On 5/7/16 7:38 AM, warrell harries wrote:
 cocoon:// is understood as standard
>>> Awesome. I was hoping it would be something simple like that.
> You can use something like
> 
>  src="cocoon://{normalize-path:{request:sitemapURIPrefix}../somewhere/e
lse}/whatever.xml"/>
>
>  The RequestModule is standard, and the NormalizePathInputModule
> comes from this project
> . Doing this will make
> you project "relocatable" relative to the sitemap root. This works
> in Cocoon 2.1, which for me is still preferable over 2.2 or 3.
> 
> It is good to see that people are still using Cocoon (2.1)!

Thanks. And yes, I too prefer 2.1 over the later versions. We spent so
much time trying to figure out how 2.1 worked with little usable
documentation that upgrading seemed like it wouldn't be worth it. It's
been a looong time since I checked-out the documentation for the later
versions. Maybe things have gotten better.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlcx8KcACgkQ9CaO5/Lv0PBVcACfam2SJPROJUgkKth36JXCmo0h
Up0AnAuwS5AKl0wFYzAMpw+/JeIOVqtl
=5MYS
-END PGP SIGNATURE-

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



RE: [2.1] cinclude using a pipeline as a generator source

2016-05-10 Thread warrell Harries
Cocoon 2.1 is a living legend!

-Original Message-
From: "Nico Verwer" <nver...@gmail.com>
Sent: ‎10/‎05/‎2016 09:35
To: "users@cocoon.apache.org" <users@cocoon.apache.org>
Subject: Re: [2.1] cinclude using a pipeline as a generator source

On 7-5-2016 15:10, Christopher Schultz wrote:

On 5/7/16 7:38 AM, warrell harries wrote: 
cocoon:// is understood as standard
Awesome. I was hoping it would be something simple like that.
You can use something like



The RequestModule is standard, and the NormalizePathInputModule comes from this 
project.
Doing this will make you project "relocatable" relative to the sitemap root.
This works in Cocoon 2.1, which for me is still preferable over 2.2 or 3.

It is good to see that people are still using Cocoon (2.1)!

Best regards,
Nico

Re: [2.1] cinclude using a pipeline as a generator source

2016-05-10 Thread Nico Verwer

On 7-5-2016 15:10, Christopher Schultz wrote:

On 5/7/16 7:38 AM, warrell harries wrote:

cocoon:// is understood as standard

Awesome. I was hoping it would be something simple like that.

You can use something like

src="cocoon://{normalize-path:{request:sitemapURIPrefix}../somewhere/else}/whatever.xml"/>


The RequestModule is standard, and the NormalizePathInputModule comes 
from this project .

Doing this will make you project "relocatable" relative to the sitemap root.
This works in Cocoon 2.1, which for me is still preferable over 2.2 or 3.

It is good to see that people are still using Cocoon (2.1)!

Best regards,
Nico


Re: [2.1] cinclude using a pipeline as a generator source

2016-05-09 Thread gelo1234
Hello Chris,

>what would happen if I wanted to use a pipeline from
>a different sitemap in my URL? Something (conceptually) like this?
>
>Since I need to remove the "other-foo" to get this to work, how can I
>address it?

It depends on what version of Cocoon you are using.

If pre-block version, using // (two /) gets context from MAIN sitemap.xmap,
so you would have
to define match="other-foo" in the MAIN / context.

If you are using block version, you have to define a new block with Cocoon
and make a reference to this new block from the original one (connecting
two blocks).
Take a look at tutorials about Cocoon 2.2 blocks.
http://cocoon.apache.org/2.2/1291_1_1.html

Greetings,
Greg


2016-05-07 15:10 GMT+02:00 Christopher Schultz :

> Warrell,
>
> On 5/7/16 8:58 AM, Christopher Schultz wrote:
> > Warrell,
> >
> > Thanks for the quick reply!
> >
> > On 5/7/16 7:38 AM, warrell harries wrote:
> >> cocoon:// is understood as standard
> >
> > Awesome. I was hoping it would be something simple like that.
> >
> >> Use :/ to go relative to the root
> >
> > I'm having trouble configuring it properly, though.
> >
> > So, my original URL looks like this:
> >
> >> src="https://host/context/foo/bar/baz.html{$jsessionid}; />
> >
> > My sitemap is actually foo/sitemap.xmap, so it matches all the stuff in
> /foo
> >
> > When I change the URL to this:
> >
> >  
> >
> > I get this error:
> >
> > java.lang.RuntimeException: The current URI
> > (/foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E) doesn't
> > start with given prefix (foo)
> >
> > If I remove the "extra" leading / :
> >
> >  
> >
> > I get this error:
> >
> > org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> > request: foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> >
> > If I use ./ like this:
> >
> >  
> >
> > I get this error:
> >
> > org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> > request: ./foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> >
> > I'm vry close. Just have to fix the speling, evidently ;)
>
> The last permutation ended up doing it:
>
>   
>
> So since the sitemap currently operating is "foo", the "foo" isn't
> necessary in the URL? This completely solves my problem but I have an
> academic question: what would happen if I wanted to use a pipeline from
> a different sitemap in my URL? Something (conceptually) like this?
>
>  
>
> Since I need to remove the "other-foo" to get this to work, how can I
> address it?
>
> Thanks,
> -chris
>
> >> On 7 May 2016 12:12, "Christopher Schultz" <
> ch...@christopherschultz.net
> >> > wrote:
> >>
> >> All,
> >>
> >> I've got a Cocoon setup with a pipeline whose transformer contains
> >> something like this:
> >>
> >>   https://my-app/get-some-data; />
> >>
> >> Now, the URL included there is actually coming from Cocoon, and
> actually
> >> I have a certificate that Java doesn't trust, so I get errors about
> PKI
> >> certification paths. I can "easily" solve that (and have been for
> some
> >> time, now) by specifying a truststore for the JVM process that
> contains
> >> my server's TLS certificate in it.
> >>
> >> I'd like to stop doing that for at least two reasons:
> >>
> >> 1. When my server certificate needs an update, I have to update my
> trust
> >> store and bounce Cocoon
> >> 2. It could be more efficient (no loopback HTTP request, no TLS
> >> handshake, etc.)
> >>
> >> Does cinclude understand Cocoon-relative paths?
> >>
> >> I'm looking for something like this:
> >>
> >>   
> >>
> >> Does something like that exist?
> >>
> >> Thanks,
> >> -chris
> >>
> >>
>  -
> >> 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: [2.1] cinclude using a pipeline as a generator source

2016-05-07 Thread warrell harries
That's right. As per directories and XPath... Well done! Just keep tinkering
On 7 May 2016 14:10, "Christopher Schultz" 
wrote:

> Warrell,
>
> On 5/7/16 8:58 AM, Christopher Schultz wrote:
> > Warrell,
> >
> > Thanks for the quick reply!
> >
> > On 5/7/16 7:38 AM, warrell harries wrote:
> >> cocoon:// is understood as standard
> >
> > Awesome. I was hoping it would be something simple like that.
> >
> >> Use :/ to go relative to the root
> >
> > I'm having trouble configuring it properly, though.
> >
> > So, my original URL looks like this:
> >
> >> src="https://host/context/foo/bar/baz.html{$jsessionid}; />
> >
> > My sitemap is actually foo/sitemap.xmap, so it matches all the stuff in
> /foo
> >
> > When I change the URL to this:
> >
> >  
> >
> > I get this error:
> >
> > java.lang.RuntimeException: The current URI
> > (/foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E) doesn't
> > start with given prefix (foo)
> >
> > If I remove the "extra" leading / :
> >
> >  
> >
> > I get this error:
> >
> > org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> > request: foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> >
> > If I use ./ like this:
> >
> >  
> >
> > I get this error:
> >
> > org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> > request: ./foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> >
> > I'm vry close. Just have to fix the speling, evidently ;)
>
> The last permutation ended up doing it:
>
>   
>
> So since the sitemap currently operating is "foo", the "foo" isn't
> necessary in the URL? This completely solves my problem but I have an
> academic question: what would happen if I wanted to use a pipeline from
> a different sitemap in my URL? Something (conceptually) like this?
>
>  
>
> Since I need to remove the "other-foo" to get this to work, how can I
> address it?
>
> Thanks,
> -chris
>
> >> On 7 May 2016 12:12, "Christopher Schultz" <
> ch...@christopherschultz.net
> >> > wrote:
> >>
> >> All,
> >>
> >> I've got a Cocoon setup with a pipeline whose transformer contains
> >> something like this:
> >>
> >>   https://my-app/get-some-data; />
> >>
> >> Now, the URL included there is actually coming from Cocoon, and
> actually
> >> I have a certificate that Java doesn't trust, so I get errors about
> PKI
> >> certification paths. I can "easily" solve that (and have been for
> some
> >> time, now) by specifying a truststore for the JVM process that
> contains
> >> my server's TLS certificate in it.
> >>
> >> I'd like to stop doing that for at least two reasons:
> >>
> >> 1. When my server certificate needs an update, I have to update my
> trust
> >> store and bounce Cocoon
> >> 2. It could be more efficient (no loopback HTTP request, no TLS
> >> handshake, etc.)
> >>
> >> Does cinclude understand Cocoon-relative paths?
> >>
> >> I'm looking for something like this:
> >>
> >>   
> >>
> >> Does something like that exist?
> >>
> >> Thanks,
> >> -chris
> >>
> >>
>  -
> >> 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: [2.1] cinclude using a pipeline as a generator source

2016-05-07 Thread Christopher Schultz
Warrell,

On 5/7/16 8:58 AM, Christopher Schultz wrote:
> Warrell,
> 
> Thanks for the quick reply!
> 
> On 5/7/16 7:38 AM, warrell harries wrote:
>> cocoon:// is understood as standard
> 
> Awesome. I was hoping it would be something simple like that.
> 
>> Use :/ to go relative to the root
> 
> I'm having trouble configuring it properly, though.
> 
> So, my original URL looks like this:
> 
>src="https://host/context/foo/bar/baz.html{$jsessionid}; />
> 
> My sitemap is actually foo/sitemap.xmap, so it matches all the stuff in /foo
> 
> When I change the URL to this:
> 
>  
> 
> I get this error:
> 
> java.lang.RuntimeException: The current URI
> (/foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E) doesn't
> start with given prefix (foo)
> 
> If I remove the "extra" leading / :
> 
>  
> 
> I get this error:
> 
> org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> request: foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> 
> If I use ./ like this:
> 
>  
> 
> I get this error:
> 
> org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> request: ./foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E
> 
> I'm vry close. Just have to fix the speling, evidently ;)

The last permutation ended up doing it:

  

So since the sitemap currently operating is "foo", the "foo" isn't
necessary in the URL? This completely solves my problem but I have an
academic question: what would happen if I wanted to use a pipeline from
a different sitemap in my URL? Something (conceptually) like this?

 

Since I need to remove the "other-foo" to get this to work, how can I
address it?

Thanks,
-chris

>> On 7 May 2016 12:12, "Christopher Schultz" > > wrote:
>>
>> All,
>>
>> I've got a Cocoon setup with a pipeline whose transformer contains
>> something like this:
>>
>>   https://my-app/get-some-data; />
>>
>> Now, the URL included there is actually coming from Cocoon, and actually
>> I have a certificate that Java doesn't trust, so I get errors about PKI
>> certification paths. I can "easily" solve that (and have been for some
>> time, now) by specifying a truststore for the JVM process that contains
>> my server's TLS certificate in it.
>>
>> I'd like to stop doing that for at least two reasons:
>>
>> 1. When my server certificate needs an update, I have to update my trust
>> store and bounce Cocoon
>> 2. It could be more efficient (no loopback HTTP request, no TLS
>> handshake, etc.)
>>
>> Does cinclude understand Cocoon-relative paths?
>>
>> I'm looking for something like this:
>>
>>   
>>
>> Does something like that exist?
>>
>> Thanks,
>> -chris
>>
>> -
>> 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: [2.1] cinclude using a pipeline as a generator source

2016-05-07 Thread Christopher Schultz
Warrell,

Thanks for the quick reply!

On 5/7/16 7:38 AM, warrell harries wrote:
> cocoon:// is understood as standard

Awesome. I was hoping it would be something simple like that.

> Use :/ to go relative to the root

I'm having trouble configuring it properly, though.

So, my original URL looks like this:

  https://host/context/foo/bar/baz.html{$jsessionid}; />

My sitemap is actually foo/sitemap.xmap, so it matches all the stuff in /foo

When I change the URL to this:

 

I get this error:

java.lang.RuntimeException: The current URI
(/foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E) doesn't
start with given prefix (foo)

If I remove the "extra" leading / :

 

I get this error:

org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E

If I use ./ like this:

 

I get this error:

org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: ./foo/bar/baz.html;jsessionid=97079C2DC1E19B20F2BEB8303AECF74E

I'm vry close. Just have to fix the speling, evidently ;)

Thanks,
-chris

> On 7 May 2016 12:12, "Christopher Schultz"  > wrote:
> 
> All,
> 
> I've got a Cocoon setup with a pipeline whose transformer contains
> something like this:
> 
>   https://my-app/get-some-data; />
> 
> Now, the URL included there is actually coming from Cocoon, and actually
> I have a certificate that Java doesn't trust, so I get errors about PKI
> certification paths. I can "easily" solve that (and have been for some
> time, now) by specifying a truststore for the JVM process that contains
> my server's TLS certificate in it.
> 
> I'd like to stop doing that for at least two reasons:
> 
> 1. When my server certificate needs an update, I have to update my trust
> store and bounce Cocoon
> 2. It could be more efficient (no loopback HTTP request, no TLS
> handshake, etc.)
> 
> Does cinclude understand Cocoon-relative paths?
> 
> I'm looking for something like this:
> 
>   
> 
> Does something like that exist?
> 
> Thanks,
> -chris
> 
> -
> 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] cinclude using a pipeline as a generator source

2016-05-07 Thread warrell harries
Hi Chris

cocoon:// is understood as standard

Use :/ to go relative to the root

Xpath rules 
On 7 May 2016 12:12, "Christopher Schultz" 
wrote:

All,

I've got a Cocoon setup with a pipeline whose transformer contains
something like this:

  https://my-app/get-some-data; />

Now, the URL included there is actually coming from Cocoon, and actually
I have a certificate that Java doesn't trust, so I get errors about PKI
certification paths. I can "easily" solve that (and have been for some
time, now) by specifying a truststore for the JVM process that contains
my server's TLS certificate in it.

I'd like to stop doing that for at least two reasons:

1. When my server certificate needs an update, I have to update my trust
store and bounce Cocoon
2. It could be more efficient (no loopback HTTP request, no TLS
handshake, etc.)

Does cinclude understand Cocoon-relative paths?

I'm looking for something like this:

  

Does something like that exist?

Thanks,
-chris

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