Re: Changer le transformateur XSLT avec la version 2.1

2006-11-06 Thread Bertrand Delacretaz

On 11/6/06, Christophe Nowicki [EMAIL PROTECTED] wrote:


...Visiblement pour faire fonctionner les feuille de style de Norman Walsh, il
faut changer le transformateur XSLT.  Mais malheureusement la documentation
pour cette opération n'est pas à jour pour la version 2.1 :..


La page http://wiki.apache.org/cocoon/Saxon est sauf erreur à jour.

-Bertrand


RE: json post

2006-11-06 Thread Ard Schrijvers
I know there was something to include all the params at once, without having to 
configure them all seperately...something with queryString. Must be in the 
archives somewhere.

And otherwise, just create your own inputmodule, {myparams} and let this 
inputmodule return all params + values in one string, like the GET looks like 
(perhaps you have to url encode as well...).

Regards Ard 




In fact i am using ur solution adding params on the url... the bad side is that 
for each different json call and different params i have to write different 
matches in sitemap... each one with his params... btw in GET is functioning... 
also fi i think it's not the best solution btw. 

Thank u very much for the quick answer

Best regards,
Maurizio
--


2006/11/5, Ard Schrijvers [EMAIL PROTECTED] :
Is it possible to add the parameters to src= http://www.myhost.com/{1}.php; ? 
So, if you get a post with param id, just call src= 
http://www.myhost.com/{1}.php?id={request-param:id};. There also must be some 
way to append all request parameters with one input module, I forgot how, but 
there has been a thread about it ones, you could find it in the archives. But, 
you are then changing a POST into a GET then, with parameters in the url, 
perhaps you dont want this. 

Can't the ProxyTransformer, or the cinclude transformer help you out (though I 
am not to familiar with both)...you probably have to change them a little since 
you are expecting text/javascript...

Regards Ard 


Greetings all.

I found out that FileGenerator may let me grab output from a PHP page that 
outputs javascript code (header(Content-Type: text/javascript);):
Unfortunately it does NOT propagate the POST data sent by javascript JSON call. 

!--sitemap snip--
map:match pattern=*.json
  map:generate type=text mime-type=application/javascript src= 
http://www.myhost.com/{1}.php;
  map:serialize type=text
/map:match

Indeed i successfully receive the Javascript string that i produce from PHP, 
but PHP does NOT receive POST data from JSON call. 

The QUESTION is: i DO POST data from browser javascript function --- to cocoon 
-- arriving to PHP and back, but in some way in PHP i don't see any parameter 
sent by the browser, so i presume that cocoon is NOT sending the params that 
browser sent to it through calling xmlhttp.send.

I tested the example using just php and it is functioning good (POST data from 
json call is in $GLOBALS['HTTP_RAW_POST_DATA']), but when i pass through cocoon 
i loose POST data in some way.

Is there any way i can POST data in javascript to a PHP page ? 

May a gentle soul between U all give me an hint (and maybe a piece of code) 
that can drive me to solution, please?

Any idea is well accepted.

thanks in advance to all.

Maurizio
---

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





-- 
Saluti,
Maurizio 

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



RE: Any experience with SOAP Server WITHOUT Axis ?

2006-11-06 Thread Geert Josten
Hi,

A while back I wanted to use Cocoon as a SOAP server myself and found it not 
that difficult. I used the stream generator to get access to the SOAP envelop, 
processed it with XSL, transforming it to an 'internal' request with 
request-parameters and/or XML fragments, used cinclude to execute that internal 
request, wrapped that into a response envelop with XSL and submitted that as 
result.

Worked okay for me.

Though, you might find that the Flow approach mentioned below gives you more 
power over handling of request headers and such. 

Kind regards,
Geert

 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.
 

 Van: Andreas Kuehne [mailto:[EMAIL PROTECTED] 
 Verzonden: woensdag 1 november 2006 10:41
 Aan: [EMAIL PROTECTED]; users@cocoon.apache.org
 Onderwerp: Re: Any experience with SOAP Server WITHOUT Axis ?
 
 Hi Jan,
 
 thanks for the intersting link ! Don't know how I missed this ...
 
 In meantime I went for the trivial approach like Yves 
 outlined. Works fine for me. But I'll check the more 
 sophisticated stuff described in the Wiki to nsee what I did miss ;-)
 
   maybe this wikipage has some information for you:
   http://wiki.apache.org/cocoon/WebServiceServer
 
   On Tuesday 10 October 2006 13:37, Yves Zoundi wrote:
I think you can generate a soap response for a requested 
 url?? Not 
  tested   though.
   
map:match pattern = getResponse
  map:generate type = getRecords/
  map:transform src = xmltosoap.xsl/
  map:serialize type = xml/
/map:match
-Original Message-
From: Andreas Kuehne [EMAIL PROTECTED]   To: 
  [EMAIL PROTECTED], users@cocoon.apache.org   
 Date: Tue, 10 
  Oct 2006 12:41:46 +0200   Subject: Re: Any experience with SOAP 
  Server WITHOUT Axis ?
   
 Hi Thomas,

   what about xfire
   http://xfire.codehaus.org
   E.g., it can be used in conjunction with xmlbeans.
 sounds intersting !
 But as I'm a lazy guy, I don't want to go for a Java model. I 
  woulddream of using my already-made-and-tested 
 pipelines enabled 
  with a SOAPfrontend ...
 
 
 ___
 Andreas Kühne
 phone: +49 177 293 24 97
 mailto: [EMAIL PROTECTED]
 
 Trustable
 Kirchröder Str. 70e
 30625 Hannover
 Germany
 www.trustable.de
 
 Kostenlose Verifikation qualifizierter elektronischer Signaturen:
 www.sig-check.de
 
 
 
 
 
 -
 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: json post

2006-11-06 Thread Maurizio P.
You rule! it was {request:queryString} in url ! Thank u very much.Btw i did not full understand ur last hint  about a 'my own inputmodule' ... do u mean to make a resource parametrized with {myparams} and in the match pattern doing a call to that resource, passing as param all url params i need? es.: [btw i did not try these lines of code yet]
map:resource name=myresource map:generate type=text src=""> map:serialize type=text mime-type=application/_javascript_/
/map:resource...map:match pattern=**.json map:call resource=myresource  map:parameter name=myparams value=par_3=mp;par_4=bbbamp;par_5=ccc/
 /map:call/map:matchBtw i presume that the impossibility to do a POST is due to the use of TextSerializer ... maybe the HtmlSerializer could do the job.Regards,Maurizio
--2006/11/6, Ard Schrijvers [EMAIL PROTECTED]:
I know there was something to include all the params at once, without having to configure them all seperately...something with queryString. Must be in the archives somewhere.And otherwise, just create your own inputmodule, {myparams} and let this inputmodule return all params + values in one string, like the GET looks like (perhaps you have to url encode as well...).
Regards ArdIn fact i am using ur solution adding params on the url... the bad side is that for each different json call and different params i have to write different matches in sitemap... each one with his params... btw in GET is functioning... also fi i think it's not the best solution btw.
Thank u very much for the quick answerBest regards,Maurizio--2006/11/5, Ard Schrijvers [EMAIL PROTECTED] :Is it possible to add the parameters to src="" 
http://www.myhost.com/{1}.php ? So, if you get a post with param id, just call src="" http://www.myhost.com/{1}.php?id={request-param:id}
. There also must be some way to append all request parameters with one input module, I forgot how, but there has been a thread about it ones, you could find it in the archives. But, you are then changing a POST into a GET then, with parameters in the url, perhaps you dont want this.
Can't the ProxyTransformer, or the cinclude transformer help you out (though I am not to familiar with both)...you probably have to change them a little since you are expecting text/_javascript_...Regards Ard
Greetings all.I found out that FileGenerator may let me grab output from a PHP page that outputs _javascript_ code (header(Content-Type: text/_javascript_);):Unfortunately it does NOT propagate the POST data sent by _javascript_ JSON call.
!--sitemap snip--map:match pattern=*.jsonmap:generate type=text mime-type=application/_javascript_ src="" 
http://www.myhost.com/{1}.phpmap:serialize type=text/map:matchIndeed i successfully receive the _javascript_ string that i produce from PHP, but PHP does NOT receive POST data from JSON call.
The QUESTION is: i DO POST data from browser _javascript_ function --- to cocoon -- arriving to PHP and back, but in some way in PHP i don't see any parameter sent by the browser, so i presume that cocoon is NOT sending the params that browser sent to it through calling 
xmlhttp.send.I tested the example using just php and it is functioning good (POST data from json call is in $GLOBALS['HTTP_RAW_POST_DATA']), but when i pass through cocoon i loose POST data in some way.Is there any way i can POST data in _javascript_ to a PHP page ?
May a gentle soul between U all give me an hint (and maybe a piece of code) that can drive me to solution, please?Any idea is well accepted.thanks in advance to all.Maurizio---
-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: 
[EMAIL PROTECTED]--Saluti,Maurizio-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
-- Saluti,Maurizio


RE: json post

2006-11-06 Thread Ard Schrijvers

 Btw i did not full understand ur last hint  about a 'my 
 own inputmodule' ... do u mean to make a resource 
 parametrized with {myparams} and in the match pattern doing a 
 call to that resource, passing as param all url params i 
 need? es.: [btw i did not try these lines of code yet] 
 

No, I meant something else. In the cocoon.xconf, there are a bunch of 
inputModules defined, like request,session, request-param, date, etc etc. But, 
if you need something that  is not yet there, you just create your own input 
module. Look at the implementation of some inputModule, and extend it, or make 
an entire new one, that meets your goals. That is what I meant. Think you 
should still try how the POST is translated to a queryString when you add non 
ASCII chars (not sure if only non ASCII but you know what I mean, right?) 

 
 Btw i presume that the impossibility to do a POST is due to 
 the use of TextSerializer ... maybe the HtmlSerializer could 
 do the job.

No no, you are thinking here in the wrong direction. It is totally irrespective 
of whatever you do after the generator. You just have a generator, that happens 
to be a url to another server/site. After your generator, your call to the 
other server is finished. The serializer you choose changes nothing. What you 
actually want, is to forward the POST via a generator or transformer, and then 
get the result, right? I know there is some proxy stuff, you could look for, 
but I think the easiest way is by far the cinclude transformer:

http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html

though, this is about including external XML. And you want javascript. Not sure 
what happens, but I think when you fetch the external data and wrap it with 
date and serialize it as text/javascript, it probably will strip the 
element...never tried, but I suppose it works :-)

Good luck,

Ard

 
 Regards,
 Maurizio
 --
 
 
 2006/11/6, Ard Schrijvers [EMAIL PROTECTED]:
 I know there was something to include all the params at once, 
 without having to configure them all seperately...something 
 with queryString. Must be in the archives somewhere.
 
 And otherwise, just create your own inputmodule, {myparams} 
 and let this inputmodule return all params + values in one 
 string, like the GET looks like (perhaps you have to url 
 encode as well...). 
 
 Regards Ard
 
 
 
 
 In fact i am using ur solution adding params on the url... 
 the bad side is that for each different json call and 
 different params i have to write different matches in 
 sitemap... each one with his params... btw in GET is 
 functioning... also fi i think it's not the best solution btw. 
 
 Thank u very much for the quick answer
 
 Best regards,
 Maurizio
 --
 
 
 2006/11/5, Ard Schrijvers [EMAIL PROTECTED] :
 Is it possible to add the parameters to src= 
 http://www.myhost.com/{1}.php; ? So, if you get a post with 
 param id, just call src= 
 http://www.myhost.com/{1}.php?id={request-param:id} . There 
 also must be some way to append all request parameters with 
 one input module, I forgot how, but there has been a thread 
 about it ones, you could find it in the archives. But, you 
 are then changing a POST into a GET then, with parameters in 
 the url, perhaps you dont want this. 
 
 Can't the ProxyTransformer, or the cinclude transformer help 
 you out (though I am not to familiar with both)...you 
 probably have to change them a little since you are expecting 
 text/javascript...
 
 Regards Ard 
 
 
 Greetings all.
 
 I found out that FileGenerator may let me grab output from a 
 PHP page that outputs javascript code (header(Content-Type: 
 text/javascript);):
 Unfortunately it does NOT propagate the POST data sent by 
 javascript JSON call. 
 
 !--sitemap snip--
 map:match pattern=*.json
   map:generate type=text 
 mime-type=application/javascript src= 
http://www.myhost.com/{1}.php;
  map:serialize type=text
/map:match

Indeed i successfully receive the Javascript string that i produce from PHP, 
but PHP does NOT receive POST data from JSON call. 

The QUESTION is: i DO POST data from browser javascript function --- to cocoon 
-- arriving to PHP and back, but in some way in PHP i don't see any parameter 
sent by the browser, so i presume that cocoon is NOT sending the params that 
browser sent to it through calling xmlhttp.send.

I tested the example using just php and it is functioning good (POST data from 
json call is in $GLOBALS['HTTP_RAW_POST_DATA']), but when i pass through cocoon 
i loose POST data in some way.

Is there any way i can POST data in javascript to a PHP page ? 

May a gentle soul between U all give me an hint (and maybe a piece of code) 
that can drive me to solution, please?

Any idea is well accepted.

thanks in advance to all.

Maurizio
---

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





--
Saluti,

RE: XPathDirectory generator styling help

2006-11-06 Thread Ard Schrijvers
Hello,

did you manage to get it to work? Think you have some problems with xml/xsl 
transformations. Also take into account the namespaces. If you are still having 
problems, please let us know, or subscribe to some xsl mailinglist, like 
http://www.mulberrytech.com/xsl/xsl-list/.

Your problem is only xsl related, not browser. 

Regards


 
 I would like to be able to drop valid xml files into a directory and
 have them appear automagically in a menu, with the ability to 
 transform
 the title of the article in the file into the text of a link 
 if I want.
 
 I get the XPathDirectory generator to work with the following pipeline
 matcher.
 
 map:match pattern=articles/*
   map:generate type=xpathdirectory src=articles/{1}
   map:parameter name=xpath value=title/
   map:parameter name=xmlFiles value=\.x.*$/
   /map:generate
   map:serialize type=xml/
 /map:match
 
 The above matcher produces the following output.
 
 ?xml version=1.0 encoding=ISO-8859-1?
 dir:directory xmlns:dir=http://apache.org/cocoon/directory/2.0;
 name=articles lastModified=1162301516000 date=31/10/06 07:31
 size=4096 sort=name reverse=false requested=true
   dir:file name=article1.xml lastModified=116231223
 date=31/10/06 10:30 size=136
   dir:xpath query=title
   titleArticle title/title
   /dir:xpath
   /dir:file
 /dir:directory
 
 So far, so good. 
 
 However, I would like to transform the XML so I can do other 
 things with
 it, such as a quick and dirty dynamic HTML menu or aggregate into
 another web page as XML and subsequently transform the title elements
 into links. I have attempted the following.
 
 xsl:template match=/
 xsl:apply-templates/
 /xsl:template
 
 xsl:template match=article
 xsl:value-of select=title/
 /xsl:template
 
 When I add this XSL to the matcher, still serializing as XML 
 I get this
 result (when viewing the source).
 
 ?xml version=1.0 encoding=ISO-8859-1?Article title
 
 Which looks OK, but Firefox complains with the following error.
 
 XML Parsing Error: syntax error
 Location: http://localhost:8080/sandbox/articles/
 Line Number 1, Column 44:?xml version=1.0
 encoding=ISO-8859-1?Article title
   ---^
 Why is it encoded as ISO-8859-1? Everything in my sitemap says UTF-8.
 
 This happens regardless of the charset I specify in Firefox. 
 Amaya also
 complains. 
 
 
 
 -
 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]



error: Too Many Open Files

2006-11-06 Thread Bokluci

From Time to time cocoon shows Too many open files error.
I've already set ulimit to

ulimit -n 8192

, but it still shows from time to time this error...
Any suggestions?

Thanks in advance.
Vik


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



Re: error: Too Many Open Files

2006-11-06 Thread Joerg Heinicke

On 06.11.2006 23:19, Bokluci wrote:

From Time to time cocoon shows Too many open files error.

I've already set ulimit to

ulimit -n 8192

, but it still shows from time to time this error...
Any suggestions?


I'm not aware of any resource leak in Cocoon itself. Are you doing 
anything special? Opening and handling many files or anything like that? 
For example, are you releasing all resolved sources you obtained via a 
SourceResolver.


Jörg

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



RE: error: Too Many Open Files

2006-11-06 Thread Bokluci
I'm doing big searches trough lot of files (3-400)... I'm using simply
document function, is there any release function I'm missing?

Vik

-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 06, 2006 11:45 PM
To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

On 06.11.2006 23:19, Bokluci wrote:
From Time to time cocoon shows Too many open files error.
 I've already set ulimit to
 
 ulimit -n 8192
 
 , but it still shows from time to time this error...
 Any suggestions?

I'm not aware of any resource leak in Cocoon itself. Are you doing 
anything special? Opening and handling many files or anything like that? 
For example, are you releasing all resolved sources you obtained via a 
SourceResolver.

Jörg

-
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: error: Too Many Open Files

2006-11-06 Thread Joerg Heinicke

On 07.11.2006 00:03, Bokluci wrote:

I'm doing big searches trough lot of files (3-400)... I'm using simply
document function, is there any release function I'm missing?


This means document function in XSLT? Or something different? Can you 
describe your technical concept a bit? Maybe this points to a problem 
with document in XSLT - which is rarely used in Cocoon environments.


Jörg


-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 06, 2006 11:45 PM

To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

On 06.11.2006 23:19, Bokluci wrote:

From Time to time cocoon shows Too many open files error.
I've already set ulimit to

ulimit -n 8192

, but it still shows from time to time this error...
Any suggestions?


I'm not aware of any resource leak in Cocoon itself. Are you doing 
anything special? Opening and handling many files or anything like that? 
For example, are you releasing all resolved sources you obtained via a 
SourceResolver.


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



RE: error: Too Many Open Files

2006-11-06 Thread Bokluci
Exactly.
It looks for previous and next file in a file with xml tree, then looks for
special info in these files. I'm not very good with xslt, but as far as I
know the only sitable function for my case is document function...
Or I'm wrong? Why document is not used in cocoon env? Which function is used
instead?

Vik

-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 12:13 AM
To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

On 07.11.2006 00:03, Bokluci wrote:
 I'm doing big searches trough lot of files (3-400)... I'm using simply
 document function, is there any release function I'm missing?

This means document function in XSLT? Or something different? Can you 
describe your technical concept a bit? Maybe this points to a problem 
with document in XSLT - which is rarely used in Cocoon environments.

Jörg

 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 06, 2006 11:45 PM
 To: users@cocoon.apache.org
 Subject: Re: error: Too Many Open Files
 
 On 06.11.2006 23:19, Bokluci wrote:
 From Time to time cocoon shows Too many open files error.
 I've already set ulimit to

 ulimit -n 8192

 , but it still shows from time to time this error...
 Any suggestions?
 
 I'm not aware of any resource leak in Cocoon itself. Are you doing 
 anything special? Opening and handling many files or anything like that? 
 For example, are you releasing all resolved sources you obtained via a 
 SourceResolver.

-
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: error: Too Many Open Files

2006-11-06 Thread Jeroen Reijn

Hi,

i've seen this happen in combination with lucene quite often. Might that 
be your problem?


Regards,

Jeroen Reijn

Joerg Heinicke wrote:

On 06.11.2006 23:19, Bokluci wrote:

From Time to time cocoon shows Too many open files error.

I've already set ulimit to

ulimit -n 8192

, but it still shows from time to time this error...
Any suggestions?


I'm not aware of any resource leak in Cocoon itself. Are you doing 
anything special? Opening and handling many files or anything like that? 
For example, are you releasing all resolved sources you obtained via a 
SourceResolver.


Jörg

-
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: error: Too Many Open Files

2006-11-06 Thread Bokluci
No, it's not my case... does cocoon not automatically close files?

-Original Message-
From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 12:30 AM
To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

Hi,

i've seen this happen in combination with lucene quite often. Might that 
be your problem?

Regards,

Jeroen Reijn

Joerg Heinicke wrote:
 On 06.11.2006 23:19, Bokluci wrote:
 From Time to time cocoon shows Too many open files error.
 I've already set ulimit to

 ulimit -n 8192

 , but it still shows from time to time this error...
 Any suggestions?
 
 I'm not aware of any resource leak in Cocoon itself. Are you doing 
 anything special? Opening and handling many files or anything like that? 
 For example, are you releasing all resolved sources you obtained via a 
 SourceResolver.
 
 Jörg
 
 -
 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]


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



Re: error: Too Many Open Files

2006-11-06 Thread Jeroen Reijn
Yes cocoon should automatically close the files, unless you use the 
document function a lot.


Can't you generate the XML to search in from cocoon instead of using the 
document function?


Reijn

Bokluci wrote:

No, it's not my case... does cocoon not automatically close files?

-Original Message-
From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 12:30 AM

To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

Hi,

i've seen this happen in combination with lucene quite often. Might that 
be your problem?


Regards,

Jeroen Reijn

Joerg Heinicke wrote:

On 06.11.2006 23:19, Bokluci wrote:

From Time to time cocoon shows Too many open files error.

I've already set ulimit to

ulimit -n 8192

, but it still shows from time to time this error...
Any suggestions?
I'm not aware of any resource leak in Cocoon itself. Are you doing 
anything special? Opening and handling many files or anything like that? 
For example, are you releasing all resolved sources you obtained via a 
SourceResolver.


Jörg

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


-
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: error: Too Many Open Files

2006-11-06 Thread Bokluci
No... those are xml files with a lot of info in them... can't be
automatically generated...

How does cocoon make difference between using document function a lot and
not so much...

-Original Message-
From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 12:38 AM
To: users@cocoon.apache.org
Subject: Re: error: Too Many Open Files

Yes cocoon should automatically close the files, unless you use the 
document function a lot.

Can't you generate the XML to search in from cocoon instead of using the 
document function?

Reijn

Bokluci wrote:
 No, it's not my case... does cocoon not automatically close files?
 
 -Original Message-
 From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 07, 2006 12:30 AM
 To: users@cocoon.apache.org
 Subject: Re: error: Too Many Open Files
 
 Hi,
 
 i've seen this happen in combination with lucene quite often. Might that 
 be your problem?
 
 Regards,
 
 Jeroen Reijn
 
 Joerg Heinicke wrote:
 On 06.11.2006 23:19, Bokluci wrote:
 From Time to time cocoon shows Too many open files error.
 I've already set ulimit to

 ulimit -n 8192

 , but it still shows from time to time this error...
 Any suggestions?
 I'm not aware of any resource leak in Cocoon itself. Are you doing 
 anything special? Opening and handling many files or anything like that? 
 For example, are you releasing all resolved sources you obtained via a 
 SourceResolver.

 Jörg

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


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



Nested Repeaters in Cocoon Forms

2006-11-06 Thread Peter Shipley
Hi,

I am trying to setup some 
nested repeaters using Cocoon Forms (currently migrating from 2.1.7 to 2.1.9) 
and have not really found a lot of information searching (might be just looking 
in the wrong places). There was one good result which seemed to be perfect but 
unless I am missing something the XML snippets are incomplete (http://www.planetcocoon.com/node/1132)

The example is perfect: with 
a series of questions as one repeater and then each question has a series of 
answers (the nested repeater)

Can someone help me out with 
the definition/template/binding (based on the cited page) ?

Thanks

Peter


RE: error: Too Many Open Files

2006-11-06 Thread Geert Josten
I've heard of a java bug that caused this message. What Java version are
you using and what happens if you upgrade to the latest? (if possible) 

Kind regards,
Geert

 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.
 

 Van: Bokluci [mailto:[EMAIL PROTECTED] 
 Verzonden: maandag 6 november 2006 23:19
 Aan: users@cocoon.apache.org
 Onderwerp: error: Too Many Open Files
 
 
 From Time to time cocoon shows Too many open files error.
 I've already set ulimit to
 
 ulimit -n 8192
 
 , but it still shows from time to time this error...
 Any suggestions?
 
 Thanks in advance.
 Vik
 
 
 -
 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: json post

2006-11-06 Thread Tal Shalif

Only a week ago I was in a need of a proxy generator which will handle
POST/GET to generate HTML from external sources for embedding in my
Forrest site. None of the generator classes seem to have done the job
so I finally merged parts a proxy generated I found under Lenya with
the Cocoon HTMLGenerator, with the built-in jtidy support. If none of
the existing proxy generators do the job for you, try to compile the
following and put a line like this in your sitemap.xmap:


 map:components
   
   map:generators default=file
  
 map:generator name=proxy
src=org.nargila.cocoon.generation.MyHttpProxyGenerator
jtidy-configWEB-INF/jtidy.properties/jtidy-config
 /map:generator
...
   /map:generators default=file
   ...
/map:components

== MyHttpProxyGenerator.java ===
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
* (the License); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nargila.cocoon.generation;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.ResourceNotFoundException;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.Response;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.generation.ServiceableGenerator;
import org.apache.cocoon.xml.XMLUtils;
import org.apache.cocoon.xml.dom.DOMStreamer;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.HttpState;
import org.apache.commons.httpclient.HttpURL;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.w3c.dom.NodeList;
import org.w3c.tidy.Tidy;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;

/**
 * The codeHttpProxyGenerator/code is a Cocoon generator using the
 * bJakarta Commons HTTPClient Library/b to access an XML stream
* over HTTP.
*
 * @author a href=mailto:[EMAIL PROTECTED]Ivelin Ivanov/a, June 2002
* @author a href=mailto:[EMAIL PROTECTED]Tony Collen/a, December 2002
 * @author a href=mailto:[EMAIL PROTECTED]Pier Fumagalli/a, February 2003
 * @version CVS $Id: HttpProxyGenerator.java 433543 2006-08-22
06:22:54Z crossley $
*/
public class MyHttpProxyGenerator extends ServiceableGenerator
implements Configurable {
//private static Logger log = Logger.getLogger(MyHttpProxyGenerator.class);

/** The HTTP method to use at request time. */
private HttpMethodBase method = null;
/** The base HTTP URL for requests. */
private HttpURL url = null;
/** The list of request parameters for the request */
private ArrayList reqParams = null;
/** The list of query parameters for the request */
private ArrayList qryParams = null;
/** Wether we want a debug output or not */
private boolean debug = false;
private String xpath;
private XPathProcessor processor;
private Properties properties;
private Map cookies = new HashMap();

Nested Repeaters in Cocoon Forms

2006-11-06 Thread peter

Hi,

I am trying to setup some nested repeaters using Cocoon Forms (currently 
migrating from 2.1.7 to 2.1.9) and have not really found a lot of 
information searching. There was one good result which seemed to be 
perfect but unless I am missing something the XML snippets are 
incomplete (http://www.planetcocoon.com/node/1132)


The example is perfect: with a series of questions as one repeater and 
then each question has a series of answers (the nested repeater)


Can someone help me out with the definition/template/binding (based on 
the cited page) ?


Thanks

Pete


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



Regarding PDF file open in browser.

2006-11-06 Thread Renga, Subburaman
Title: Apparatus Analyzer








Hi,



I want to display a pdf on the browser.

I have byte stream with me, using which I
need to display the pdf

directly on the browser.

Currently, I am storing it in my local file
system by creating a file

output stream. But its taking a lot of time.

I don't want to create any intermediate
files.

Is it possible to display the PDF directly
on the browser?

If anyone knows please let me know how this
can be achieved in java?





Thanks  Regards,

Renganathan.S.

P A T N I

(: X: 2133, 34, M: 9833064984

*: [EMAIL PROTECTED]

http://www.patni.com/ 

---





-- 
Disclaimer: This e-mail message along with attachment, contain Patni GE Confidential, proprietary & legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify the sender and delete this mail. This email (in whole or in part) is not to be reproduced or furnished to third parties or made public without the prior express written permission of the sender. 
--