Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt

Joerg Heinicke wrote:

On 17.12.2007 1:31 Uhr, Kamal Bhatt wrote:


Can you move your variable into the parameters of a new pipeline?


   
  src="cocoon:/parsexspaction/{my-xsp-action-variable}"/>

  




   
   
   

  

How can I aggregate this though?


His solution is indeed a nice work around, similar to passing an 
additional method parameter:



  

  
  

  
  



  
  
  



OK, thanks, that makes more sense to me. Not exactly what I want, but I 
could make it work.


Thanks.

--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Joerg Heinicke

On 17.12.2007 1:31 Uhr, Kamal Bhatt wrote:


Can you move your variable into the parameters of a new pipeline?


   
  src="cocoon:/parsexspaction/{my-xsp-action-variable}"/>

  




   
   
   

  

How can I aggregate this though?


His solution is indeed a nice work around, similar to passing an 
additional method parameter:



  

  
  

  
  



  
  
  


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt

Joerg Heinicke wrote:

On 17.12.2007 0:31 Uhr, Kamal Bhatt wrote:

I have a folder location that is specified in a database. I need to 
run a query on the database and generate XML (using an XSP) , as 
well, I need to get this folder location and use it to determine the 
location of some XSLTs that is later used to transform the generated 
XML. Seeing as I am querying the database for XML, I don't want a 
situation where I am querying twice.


Something like this:

  

  
  



  

However, I also have the added requirement that I need to support 
aggregation, which isn't working in this scenario (that is 
my-xsp-action-variable isn't available outside of  the associated 
match). I want to be able to setup a parameter that is available from 
any match/pipeline. In a similar way that flow attributes seem to be.


Now the picture is clearer. The above is one of the pipelines that 
should be aggregated. The second map:part should also be configured 
dynamically from the database ({testXML} in your other mail).


Unfortunately I don't think this is possible. While flow sets 
something like a global context, the action context is local to the 
map:act. Even writing it the following way does not help you:



  

  
  


  

  



  


This works - but the action is executed twice though since there are 
two requests that are processed: test-xsp-action2 and 
cocoon:/test-xsp-action and both run through this pipeline.



Bummer.

I guess I will have to run the query twice. I guess the saving grace is 
that it isn't an expensive query, just a bit annoying that I have to hit 
the database twice.


Thanks.

--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt

[EMAIL PROTECTED] wrote:

On 12/17/07, Kamal Bhatt <[EMAIL PROTECTED]> wrote:
  

I should probably phrase the scenario better. I have a folder location
that is specified in a database. I need to run a query on the database
and generate XML (using an XSP) , as well, I need to get this folder
location and use it to determine the location of some XSLTs that is
later used to transform the generated XML. Seeing as I am querying the
database for XML, I don't want a situation where I am querying twice.

Something like this:

   
 
   
   
 

 
   

However, I also have the added requirement that I need to support
aggregation, which isn't working in this scenario (that is
my-xsp-action-variable isn't available outside of  the associated
match). I want to be able to setup a parameter that is available from
any match/pipeline. In a similar way that flow attributes seem to be.
Kamal Bhatt



Can you move your variable into the parameters of a new pipeline?


   
  
  




   
   
   

  

How can I aggregate this though?



--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread solprovider
On 12/17/07, Kamal Bhatt <[EMAIL PROTECTED]> wrote:
> I should probably phrase the scenario better. I have a folder location
> that is specified in a database. I need to run a query on the database
> and generate XML (using an XSP) , as well, I need to get this folder
> location and use it to determine the location of some XSLTs that is
> later used to transform the generated XML. Seeing as I am querying the
> database for XML, I don't want a situation where I am querying twice.
>
> Something like this:
>
>
>  
>
>
>  
>
>  
>
>
> However, I also have the added requirement that I need to support
> aggregation, which isn't working in this scenario (that is
> my-xsp-action-variable isn't available outside of  the associated
> match). I want to be able to setup a parameter that is available from
> any match/pipeline. In a similar way that flow attributes seem to be.
> Kamal Bhatt

Can you move your variable into the parameters of a new pipeline?


   
  
  




   
   
   


HTH.
solprovider

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Joerg Heinicke

On 17.12.2007 0:31 Uhr, Kamal Bhatt wrote:

I have a folder location 
that is specified in a database. I need to run a query on the database 
and generate XML (using an XSP) , as well, I need to get this folder 
location and use it to determine the location of some XSLTs that is 
later used to transform the generated XML. Seeing as I am querying the 
database for XML, I don't want a situation where I am querying twice.


Something like this:

  

  
  



  

However, I also have the added requirement that I need to support 
aggregation, which isn't working in this scenario (that is 
my-xsp-action-variable isn't available outside of  the associated 
match). I want to be able to setup a parameter that is available from 
any match/pipeline. In a similar way that flow attributes seem to be.


Now the picture is clearer. The above is one of the pipelines that 
should be aggregated. The second map:part should also be configured 
dynamically from the database ({testXML} in your other mail).


Unfortunately I don't think this is possible. While flow sets something 
like a global context, the action context is local to the map:act. Even 
writing it the following way does not help you:



  

  
  


  

  



  


This works - but the action is executed twice though since there are two 
requests that are processed: test-xsp-action2 and 
cocoon:/test-xsp-action and both run through this pipeline.


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fop 0.93 in cocoon 2.1.9

2007-12-16 Thread Joerg Heinicke

On 30.11.2007 2:56 Uhr, Carlos Martínez wrote:


I'm trying to run fop 0.93 in cocoon 2.1.9.

I have added fop0.93.jar and xmlgraphics-commons-1.1.jar l to the 
WEB-INF\lib in my local instalation of cocoon, and remove the old jar 
versions. And when i try to use the fo2pdf serializer it show me this 
error.


The API of FOP has changed fundamentally between 0.20.5 and 0.9x. That's 
why it does not work by just replacing the jars. What you can try though 
is to use the FOP NG block which is only available in Cocoon 2.2. It 
should be pretty straight forward to use it in Cocoon 2.1.


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt




I fear I did not understand what you really want - and still don't. 
Can you rephrase it?


I should probably phrase the scenario better. I have a folder location 
that is specified in a database. I need to run a query on the database 
and generate XML (using an XSP) , as well, I need to get this folder 
location and use it to determine the location of some XSLTs that is 
later used to transform the generated XML. Seeing as I am querying the 
database for XML, I don't want a situation where I am querying twice.


Something like this:

  

  
  



  

However, I also have the added requirement that I need to support 
aggregation, which isn't working in this scenario (that is 
my-xsp-action-variable isn't available outside of  the associated 
match). I want to be able to setup a parameter that is available from 
any match/pipeline. In a similar way that flow attributes seem to be.


Hope that makes more sense.






--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SQLTransformer - in 2.1 but not in 2.2?

2007-12-16 Thread Antonio Gallardo

Hi Shahriar,

See https://issues.apache.org/jira/browse/COCOON-1894

Best Regards,

Antonio Gallardo.

Shahriar Aghajani escribió:

Hello,

I'm using Cocoon 2.2, where SQLTransformer doesn't have an  
tag to embed XML into the queries.  According to the documentation for 
2.2, it's on the TODO list:


http://cocoon.apache.org/2.2/blocks/databases/1.0/apidocs/index.html


However, according to the documentation for 2.1, it's available:

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/SQLTransformer.html 



Maybe 2.2 was branched before  was put into SQLTransformer? 
Is there any way for me to use the 2.1 SQLTransformer in Cocoon 2.2?



Any comments or pointers would be appreciated.


Thank you,
Shahriar.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Joerg Heinicke

On 16.12.2007 20:39 Uhr, Kamal Bhatt wrote:

I want to be able to get a folder location from an database query, 
and based on this folder location specify the folder location for 
some XSLTs. For example, the database may store /xslts/myxslts/ as 
the location, so in the sitemap, I want to go:




Now, I know this can be setup in using actions. Where it fails, 
however, is when you need an aggregate, eg:


   
 
   
   
 
 
   
   
 
   
   
 

 
 
   


What exactly is the problem? Couldn't you wrap the map:aggregate with 
the map:act XSP action?
When I tried to get te value testXML in test-xsp-action2, it didn't 
work. It does work when it is done in test-xsp-action.


I would prefer not wrapping the XSP action. What I have is a situation 
where I will need to get some data from a database (using an XSP) as 
well as passing a value back from the XSP to select the stylesheets. I 
would prefer this was done in one transaction.


I fear I did not understand what you really want - and still don't. Can 
you rephrase it?


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt

Joerg Heinicke wrote:

On 16.12.2007 17:20 Uhr, Kamal Bhatt wrote:

I want to be able to get a folder location from an database query, 
and based on this folder location specify the folder location for 
some XSLTs. For example, the database may store /xslts/myxslts/ as 
the location, so in the sitemap, I want to go:




Now, I know this can be setup in using actions. Where it fails, 
however, is when you need an aggregate, eg:


   
 
   
   
 
 
   
   
 
   
   
 

 
 
   


What exactly is the problem? Couldn't you wrap the map:aggregate with 
the map:act XSP action?
When I tried to get te value testXML in test-xsp-action2, it didn't 
work. It does work when it is done in test-xsp-action.


I would prefer not wrapping the XSP action. What I have is a situation 
where I will need to get some data from a database (using an XSP) as 
well as passing a value back from the XSP to select the stylesheets. I 
would prefer this was done in one transaction.



--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing values from an XSP back to the sitemap

2007-12-16 Thread Joerg Heinicke

On 16.12.2007 17:20 Uhr, Kamal Bhatt wrote:

I want to be able to get a folder location from an database query, and 
based on this folder location specify the folder location for some 
XSLTs. For example, the database may store /xslts/myxslts/ as the 
location, so in the sitemap, I want to go:




Now, I know this can be setup in using actions. Where it fails, however, 
is when you need an aggregate, eg:


   
 
   
   
 
 
   
   
 
   
   
 

 
 
   


What exactly is the problem? Couldn't you wrap the map:aggregate with 
the map:act XSP action?


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE : RE : Does CInclude/Include transformers buffer incoming documents ?

2007-12-16 Thread Joerg Heinicke

On 15.12.2007 20:05 Uhr, Boisvert, Eric wrote:


That's not quite true. Yes, you can write XSLT in a bad way (using
XPaths starting with double slash for example), which indeed forces the
whole document to be loaded. 
 
Well.. I stand corrected. Thank you for this information.  So the XSLT engine is smart enough to analyse the stylesheet and load a subset of the document (I'm impressed)


You can read at http://wiki.apache.org/cocoon/NoMoreDtmIdError for an 
example where changing the XSLT fixed such an issue.


It uses SAX to stream through the included documents 


ok. but is the thing buffered (as a character buffer) in memory before being 
parsed ?


From what I understand it is not by default. Only in case of using 
cached-include element instead of just the include element the stream is 
cached. So you really should be fine with it.


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Passing values from an XSP back to the sitemap

2007-12-16 Thread Kamal Bhatt

Hi,
I want to be able to get a folder location from an database query, and 
based on this folder location specify the folder location for some 
XSLTs. For example, the database may store /xslts/myxslts/ as the 
location, so in the sitemap, I want to go:




Now, I know this can be setup in using actions. Where it fails, however, 
is when you need an aggregate, eg:


   
 
   
   
 

 
  
 
   

 
   
   
 

 
 



Where testXML is a an action attribute set in my-xsp-action.xsp.

I would like this to work with aggregates. I know something can be 
achieved with session objects, but surely there has to be better way. I 
am using Cocoon 2.1.9. We can do similar things with flow attributes.


Thanks.

--
Kamal Bhatt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cocoon 2.2 - Symbolic links in map:mount path not working

2007-12-16 Thread Hugh Sparks

I have a test case sitemap that simply mounts a sub-sitemap:

   
   
   

The cocoon webapp has this root directory:

   WEB-INF
   sitemap.xmap
   stuff

Stuff is a directory that contains:

   sitemap.xmap
   index.html

The stuff/sitemap.xmap simply does a
map:read on the index.html file.

This configuration works as expected when "stuff" is a
directory, but if I introduce asymbolic link, "thing" :

   ln -s stuff thing

I get this error:

   http-8080-1 ERROR cocoon.access - Internal Cocoon
   Problem org.apache.cocoon.ProcessingException:
   Sitemap: error when calling sub-sitemap at
- jndi:/localhost/cocoon22//sitemap.xmap:8:43
   at  - jndi:/localhost/cocoon22//sitemap.xmap:7:28
   at org.apache.cocoon.ProcessingException.throwLocated
   (ProcessingException.java:111)
   at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke
   (MountNode.java:118)
   ...

Note the empty path element in the jndi path where
"thing" might be expected.

I have both cocoon 1.1 and cocoon 2.2 installations running
under Tomcat 6.x. When I move the "stuff" directory to the
cocoon 1.1 webapp, the example works as expected.

Is there some property I should set to enable symbolic links
as path components in cocoon 2.2?

Thanks,

-Hugh Sparks, [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]