Updating Xindice with Request Data

2006-01-31 Thread Mike Casey
Hi All,

I am currently working on an implementation of a wiki type site that
uses XML for Wiki syntax, partly to help learn NXBs/Cocoon and partly
because I could not find a suitable product out there to meet my needs.

The XMLDB block samples has some good examples on how to update Xindice
using XML files which is all very well in good however I need to figure
out how to pull xml data out of a CForm and then push it into Xindice.
The sample has the pipeline

map:match pattern=populate
 map:generate src="">
 map:transform type=cinclude/
 map:transform type=xmldb/
 map:serialize/
/map:match

Where ofcourse the generator looks for a physical xml file. Does anyone
have any hints on how I might acheive this? I am reasonably new to
Cocoon so forgive me if the answer you return is blatantly obvious!

Cheers,

Mike Casey
Wellington 
New Zealand


Re: Updating Xindice with Request Data

2006-01-31 Thread Jonas Lundberg
It seems that no one works on Xindice anymore. At least, I have found
no new versions since 2004.
I would recommend that you use eXist instead of Xindice, if you want
an XML database.
http://exist.sourceforge.net/

Regards
Hans

On 1/31/06, Mike Casey [EMAIL PROTECTED] wrote:
 Hi All,

  I am currently working on an implementation of a wiki type site that uses
 XML for Wiki syntax, partly to help learn NXBs/Cocoon and partly because I
 could not find a suitable product out there to meet my needs.

  The XMLDB block samples has some good examples on how to update Xindice
 using XML files which is all very well in good however I need to figure out
 how to pull xml data out of a CForm and then push it into Xindice. The
 sample has the pipeline

  map:match pattern=populate
  map:generate src=populate.xml/
  map:transform type=cinclude/
  map:transform type=xmldb/
  map:serialize/
   /map:match

  Where ofcourse the generator looks for a physical xml file. Does anyone
 have any hints on how I might acheive this? I am reasonably new to Cocoon so
 forgive me if the answer you return is blatantly obvious!

  Cheers,

  Mike Casey
  Wellington
  New Zealand


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



RE: Updating Xindice with Request Data

2006-01-31 Thread Combinational Logic








Sorry I dont have time to describe
all the details, but a brief overview of what worked for me follows:



Use flow to display and bind the CForm to
the results of an xmldb query then save the results back to a document. Pass
the document to a JX pipeline to get it back into the pipeline, then use XSLT
to generate stuff in the XUpdate namespace and pass it through an XMLDB
transformer. 



It would be nice to package /abstract this
sort of operation up as it seems to be a re-occurring design pattern
At least it was for my cocoon development. Perhaps someone knows of a
better way. Thoughts?



CL











From: Mike Casey
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 30, 2006
5:10 PM
To: users@cocoon.apache.org
Subject: Updating Xindice with
Request Data





Hi All,

I am currently working on an implementation of a wiki type site that uses XML
for Wiki syntax, partly to help learn NXBs/Cocoon and partly because I could
not find a suitable product out there to meet my needs.

The XMLDB block samples has some good examples on how to update Xindice using
XML files which is all very well in good however I need to figure out how to
pull xml data out of a CForm and then push it into Xindice. The sample has the
pipeline

map:match pattern=populate
 map:generate
src="">
 map:transform type=cinclude/
 map:transform
type=xmldb/
 map:serialize/
/map:match

Where ofcourse the generator looks for a physical xml file. Does anyone have
any hints on how I might acheive this? I am reasonably new to Cocoon so forgive
me if the answer you return is blatantly obvious!

Cheers,

Mike Casey
Wellington 
New Zealand








Re: Updating Xindice with Request Data

2006-01-31 Thread Andre Juffer

Jonas Lundberg wrote:

It seems that no one works on Xindice anymore. At least, I have found
no new versions since 2004.


The last version is 1.1b5-dev (May 25 2005)

See http://xml.apache.org/xindice/changes.html

You can download the source code with svn.


I would recommend that you use eXist instead of Xindice, if you want
an XML database.
http://exist.sourceforge.net/




Regards
Hans

On 1/31/06, Mike Casey [EMAIL PROTECTED] wrote:


Hi All,

I am currently working on an implementation of a wiki type site that uses
XML for Wiki syntax, partly to help learn NXBs/Cocoon and partly because I
could not find a suitable product out there to meet my needs.

The XMLDB block samples has some good examples on how to update Xindice
using XML files which is all very well in good however I need to figure out
how to pull xml data out of a CForm and then push it into Xindice. The
sample has the pipeline

map:match pattern=populate
map:generate src=populate.xml/
map:transform type=cinclude/
map:transform type=xmldb/
map:serialize/
 /map:match

Where ofcourse the generator looks for a physical xml file. Does anyone
have any hints on how I might acheive this? I am reasonably new to Cocoon so
forgive me if the answer you return is blatantly obvious!

Cheers,

Mike Casey
Wellington
New Zealand




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





--
Andre H. Juffer  | Phone: +358-8-553 1161
The Biocenter and| Fax: +358-8-553-1141
the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/

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



Re: Updating Xindice with Request Data

2006-01-31 Thread Jonas Lundberg
I see. I was looking at the downloads page...

Regards
Hans

On 1/31/06, Andre Juffer [EMAIL PROTECTED] wrote:
 Jonas Lundberg wrote:
  It seems that no one works on Xindice anymore. At least, I have found
  no new versions since 2004.

 The last version is 1.1b5-dev (May 25 2005)

 See http://xml.apache.org/xindice/changes.html

 You can download the source code with svn.

  I would recommend that you use eXist instead of Xindice, if you want
  an XML database.
  http://exist.sourceforge.net/

 
  Regards
  Hans
 
  On 1/31/06, Mike Casey [EMAIL PROTECTED] wrote:
 
 Hi All,
 
  I am currently working on an implementation of a wiki type site that uses
 XML for Wiki syntax, partly to help learn NXBs/Cocoon and partly because I
 could not find a suitable product out there to meet my needs.
 
  The XMLDB block samples has some good examples on how to update Xindice
 using XML files which is all very well in good however I need to figure out
 how to pull xml data out of a CForm and then push it into Xindice. The
 sample has the pipeline
 
  map:match pattern=populate
  map:generate src=populate.xml/
  map:transform type=cinclude/
  map:transform type=xmldb/
  map:serialize/
   /map:match
 
  Where ofcourse the generator looks for a physical xml file. Does anyone
 have any hints on how I might acheive this? I am reasonably new to Cocoon so
 forgive me if the answer you return is blatantly obvious!
 
  Cheers,
 
  Mike Casey
  Wellington
  New Zealand
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Andre H. Juffer  | Phone: +358-8-553 1161
 The Biocenter and| Fax: +358-8-553-1141
  the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
 University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/

 -
 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: How to make sessions survive browser restart

2006-01-31 Thread Armaz Mellati
Dear Armaz

All you needed to do was :

Cookie [] cookies = request.getCookies();
for (int i=0;icookies.length;i++){
if (cookies[i].getName().equals(JSESSIONID)){
cookies[i].setMaxAge(6*3600); // expire after 6 houre
cookies[i].setValue(request.getSession().getId());
response.addCookie(cookies[i]);
break;
}
}


Stop asking stupid questions :)

Regards,
Armaz 

 -Original Message-
 From: Armaz Mellati [mailto:[EMAIL PROTECTED] 
 Sent: 30. januar 2006 15:18
 To: users@cocoon.apache.org
 Subject: How to make sessions survive browser restart
 
 Hi
 
 
 This may not be a Cocoon issue, however I take the chance.
 
 I am using Cocoon-portal behind Tomcat, and I can't figure 
 out what to do to make Cocoon recognize users already logged 
 inn after they have restarted their browsers. 
 I know that in a cookie, you can set the maxAge with 
 setMaxAge(). But how can I do that for the JSESSIONID cookie 
 ??? Where is that cookie made ? 
 
 Thanks for any tip in advance.
 
 Regards,
 Armaz Mellati 
 
 
 -
 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: How to make sessions survive browser restart

2006-01-31 Thread Bertrand Delacretaz

Le 31 janv. 06, à 13:50, Armaz Mellati a écrit :


...Stop asking stupid questions :)


As I always tell my students: the only stupid questions are the ones 
you don't dare to ask ;-)


-Bertrand

smime.p7s
Description: S/MIME cryptographic signature


RE: collection() error

2006-01-31 Thread Chris Marasti-Georg
This looks like Xquery syntax... for and return are constructs of a
FLWOR expression.  Along with the other posts regarding the collection
funciton itself, you want syntax like
collection('../test/xdocs?select=*.xml;recurse=yes;on-error=warn')//def
inition... Since you have a query string, I am assuming you are trying
to use the result of a cocoon pipeline in your xslt?  In that case, you
could either use document(), which is not recommended, or you can
aggregate these documents into your source document before processing
with the XSLT

Chris Marasti-Georg


 -Original Message-
 From: bokluk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, January 30, 2006 5:08 PM
 To: users@cocoon.apache.org
 Subject: collection() error
 
 (How) is collection function implemented in cocoon?
 I tried following code:
 
 xsl:for-each select=for $x in
 collection('../test/xdocs?select=*.xml;recurse=yes;on-error=wa
 rn') return $x//defnition
   
   xsl:sort select=@title/
 
   TITLE=xsl:value-of select=@title/br/
 
 /xsl:for-each
 
 And it gave me following error:
 
 Extra illegal tokens: '$', 'x', 'in', 'collection', '(', 
 ''../prosa/xdocs?select=*.xml;recurse=yes;on-error=warn'', 
 ')', 'return', '$', 'x', '/', '/', 'defnition'
 
 What am I missing?
 
 
 
 -
 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: Using SSL for parts of a cocoon web-application?

2006-01-31 Thread Bertrand Delacretaz

Le 30 janv. 06, à 22:32, Tino Breddin a écrit :


...Your workaround seem to be useful for our application..


I don't consider it a workaround - I would *never* put anything else 
than httpd as the front-end of a production site.


... The only thing i do not know right now, is how to tell apache that 
only the connections with a special prefix should be secured...


http and https use different port numbers, so you will need two virtual 
hosts if you want to serve parts of your site without SSL.


IMHO a clean way of doing this is to use different hostnames, like 
https://apps.mydomain.com and http://files.mydomain.com - this helps 
avoid any confusion about what's secure and what's not.


-Bertrand


smime.p7s
Description: S/MIME cryptographic signature


Re: Using SSL for parts of a cocoon web-application?

2006-01-31 Thread Bertrand Delacretaz

Le 31 janv. 06, à 08:59, Joost Kuif a écrit :


...Why not use mod_jk and AJP to connect from apache to tomcat?..


You can certainly use different ways of connecting apache to your 
servlet engine. Me, I like reverse proxies because they're well 
decoupled.


Dunno about performance - in the kind of projects that I do, the cost 
of connecting apache to my app is irrelevant compared to the cost of 
generating the pages, so a reverse proxy is good enough.


-Bertrand

smime.p7s
Description: S/MIME cryptographic signature


Re: Using SSL for parts of a cocoon web-application?

2006-01-31 Thread Thomas Soddemann
Bertrand Delacretaz wrote:


 http and https use different port numbers, so you will need two
 virtual hosts if you want to serve parts of your site without SSL.

 IMHO a clean way of doing this is to use different hostnames, like
 https://apps.mydomain.com and http://files.mydomain.com - this helps
 avoid any confusion about what's secure and what's not.

 -Bertrand

Note, that in that case one would have to ensure that the hostname for
https is not an alias.
Otherwise, the reverse lookup of the ip address for the alias would
reveal another hostname than the one in the certificate.

Cheers,
Thomas

-- 
--
 Dr. Thomas Soddemann |  Boltzmannstrasse 2
 Projects Engineer|  85748 Garching
 Rechenzentrum der MPG|  Germany 
 am MPI fuer Plasmaphysik |
---
 phone: +49 89 3299 2694  |  fax: +49 89 3299 1301
---


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



Re: Using SSL for parts of a cocoon web-application?

2006-01-31 Thread Bertrand Delacretaz

Le 31 janv. 06, à 15:08, Thomas Soddemann a écrit :

...Note, that in that case one would have to ensure that the hostname 
for

https is not an alias.
Otherwise, the reverse lookup of the ip address for the alias would
reveal another hostname than the one in the certificate...


You're right - but the non-SSL host can be anything.

-Bertrand


smime.p7s
Description: S/MIME cryptographic signature


Re: CForms, Ajax, Visual Effects and onchange events

2006-01-31 Thread Brian Maddy



Jason Johnston wrote:


Brian Maddy wrote:


Hello,

I am making a form that uses ajax like in the car selector sample.  I 
would like to make another div on the page have the fade out visual 
effect when the form widgets are updated.


I am able to add events to the onchange attribute (I have to add the 
forms_submitForm() function also though), but the javascript is 
executed before the ajax stuff updates the browser's DOM.



Known issue: https://issues.apache.org/jira/browse/COCOON-1718


ft:widget id=address_city
   fi:styling onchange=forms_submitForm(this); alert('asdf');/
/ft:widget

Does anyone here know how to trigger an event after the ajax update 
happens?



You could potentially figure out what JS function gets called within 
the ajax library post-update and override it to execute some of your 
own code in addition to its normal behavior.  Unfortunately this ties 
you to that specific ajax implementation, and I believe there are 
plans in the works to replace it for some release in the 
not-so-distant future.


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

Well, I went back and looked at this again and was able to figure it 
out.  So here it is in case anyone else is trying to do the same thing:


html
...
body
...
   script type=text/javascript
   ![CDATA[
   // append some commands to be executed after the form is 
updated
   var oldProcessResponse = 
cocoon.ajax.BrowserUpdater.prototype.processResponse;
   cocoon.ajax.BrowserUpdater.prototype.processResponse = 
function(doc, request){

   oldProcessResponse.apply(this, [doc, request]);
   alert('asdf');
   }
   ]]
   /script
...
/body
/html

As Jason mentioned though, there is a warning near the cocoon.ajax.Fader 
function in resources/ajax/js/cocoon-ajax.js:


//-
// Fader used to highlight page areas that have been updated
// WARNING: don't rely too much on these effects, as they're very likely to be 
replaced
//  by some third party library in the near future
//-

So be weary of this if you are wanting to change the fading effects.

Brian





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



Is this thing possible?

2006-01-31 Thread Angelo Immediata
Hi all.
I'm using cocoon 2.1.7 and its portal block.
I'ld like to know if it's possible this thing.

I have some web application developed by third part users and by using 
different technologies.
My project manager would like to do a similar thing: to display this web 
application in my portal without using Web Services but by capturing the html 
stream and re-elaborating it in order to have an url rewiting that can work 
under our portal. When the user clicks on a link on our portal there must be a 
component that re-elaborates the URL and sends the requests to the right 
server; this server does what it must do and gives to me the right response.
I hope to have been clear:-)

Now... according to you is this thing possible? If so can anybody tell me a way 
to proceed?
Thanks to all.


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



Re: Is this thing possible?

2006-01-31 Thread christian bindeballe
Angelo Immediata schrieb:
 Hi all.
 I'm using cocoon 2.1.7 and its portal block.
 I'ld like to know if it's possible this thing.
 
 I have some web application developed by third part users and by using 
 different technologies.
 My project manager would like to do a similar thing: to display this web 
 application in my portal without using Web Services but by capturing the html 
 stream and re-elaborating it in order to have an url rewiting that can work 
 under our portal. When the user clicks on a link on our portal there must be 
 a component that re-elaborates the URL and sends the requests to the right 
 server; this server does what it must do and gives to me the right response.
 I hope to have been clear:-)
 
 Now... according to you is this thing possible? If so can anybody tell me a 
 way to proceed?
 Thanks to all.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

Hello Angelo,

if I get you right, this should be possible.
You can include whole web-applications inside a Coplet, look here:
http://cocoon.apache.org/2.1/developing/portal/forms.html
There is a paragraph called including applications.

Also, this link might be interesting:
http://cocoon.zones.apache.org/demos/release/samples/blocks/portal/portal

login using the username supplied and go to the tab that is called
App-Coplet (on the far right).

HTH,

christian

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



Re: Is this thing possible?

2006-01-31 Thread Angelo Immediata
Hi first of all thanks for your answer.
What i must do is to put in my portal a simple and or a complex web application 
developed also in .NET, asp etc... is this possible by cocoon and its portal 
block?

-- Initial Header ---

From  : christian bindeballe [EMAIL PROTECTED]
To  : users@cocoon.apache.org
Cc  :
Date  : Tue, 31 Jan 2006 18:35:02 +0100
Subject : Re: Is this thing possible?







 Angelo Immediata schrieb:
  Hi all.
  I'm using cocoon 2.1.7 and its portal block.
  I'ld like to know if it's possible this thing.
 
  I have some web application developed by third part users and by using 
  different technologies.
  My project manager would like to do a similar thing: to display this web 
  application in my portal without using Web Services but by capturing the 
  html stream and re-elaborating it in order to have an url rewiting that can 
  work under our portal. When the user clicks on a link on our portal there 
  must be a component that re-elaborates the URL and sends the requests to 
  the right server; this server does what it must do and gives to me the 
  right response.
  I hope to have been clear:-)
 
  Now... according to you is this thing possible? If so can anybody tell me a 
  way to proceed?
  Thanks to all.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 Hello Angelo,

 if I get you right, this should be possible.
 You can include whole web-applications inside a Coplet, look here:
 http://cocoon.apache.org/2.1/developing/portal/forms.html
 There is a paragraph called including applications.

 Also, this link might be interesting:
 http://cocoon.zones.apache.org/demos/release/samples/blocks/portal/portal

 login using the username supplied and go to the tab that is called
 App-Coplet (on the far right).

 HTH,

 christian

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



Update Re: Questions re: source resolving porting from 2.1.6 = 2.1.8

2006-01-31 Thread Mark Lundquist


Some more data...

I tried passing an absolute pathname to the source resolver, and 
exists() on the returned still Source returns false, even though the 
file _does_ exist.


I prepended file: to the pathname, and that made no difference.

Any ideas?
—ml—


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



Questions re: source resolving porting from 2.1.6 = 2.1.8

2006-01-31 Thread Mark Lundquist

Hi all,

I have a bunch of Cocoon apps based on 2.1.6, and I'm actually just 
rev-ing the first of these up to 2.1.8.  So far so good, mostly... but 
I have two questions:


1) Sources appear to be resolved differently.  Some background: my root 
sitemap is not located directly within the webapp context directory, 
instead of webapp/sitemap.xmap, I have


webapp/
sitemap/
main.xmap
.
. (other crap that included in main.xmap via XML 
entities)
.

All file paths in the sitemap, e.g. 'src' attribute on generators and 
transformers now resolve relative to the parent directory of the the 
sitemap document (viz., webapp/sitemap/), where they always used to 
resolve relative to the mount point of the sitemap (the webapp context 
in the case of the root sitemap, i.e. webapp/).  To get my 
application working again, I had to change all these attributes to use 
the context: protocol, then all was well.


So Question 1 is: is this how it's supposed to work now, or is this 
caused by some misconfiguration on my part, e.g. something I was 
supposed to have changed going from 2.1.6 to 2.1.8?


2) In a subsitemap area, I have some flowscript that invokes the 
SourceResolver on a file pathname, and then calls exists() on the 
result.  No matter what I try, I am not able to come up with a URL for 
the source that gets exists() to return true when I know that it should 
(i.e., the file _does_ exist!).  This _could_ be related to Question 
(1) above; however, it's not exactly the same thing, because in this 
sitemap, the sitemap.xmap file _is_ located directly within the 
subsitemap mount point.


(1) was an annoyance, but not a big deal and there I'm really just 
curious about whether it's really supposed to work that way.  (2) 
however is a show-stopper for me — I really need to figure out what the 
problem is here!


Any help much appreciated! :-)
—ml—


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



ParanoidCocoonServlet cannot run in an undeployed WAR file

2006-01-31 Thread Brian Maddy
Anyone know what may be causing this error in the logs?  I'm deploying 
as a war file on Tomcat 4.1.24 with a hosting company.  I'm only getting 
a white screen when I visit /cocoon.  It works fine on my local Tomcat 
4.1.24 server though...


Servlet /cocoon threw load() exception: javax.servlet.ServletException: 
org.apache.cocoon.servlet.ParanoidCocoonServlet cannot run in an 
undeployed WAR file


Any ideas?

Brian


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



Re: Apache Coccon developer anywhere in the world

2006-01-31 Thread Quoin Developers
To elaborate further...

We offer a highly collaborative environment where we use many agile
practices such as pair programming, test-driven development, short
iterations. We endeavor to work closely with our clients to understand
how their business works so that we can build systems that can help
them to excel.

We're doing a lot of development in Java and Cocoon. Some of our work
is with the Lenya open-source content management platform. We use both
Linux and Windows. Mostly we're doing web-applications, but that's not
the only type of thing we do. Past clients include Washingtonpost.com,
Onstar, Fivestaralliance.com.

Things that we'd like you to know (some or all of): Java, Hibernate,
Cocoon, XSTL, CSS, XHTML, Lucene, Javascript.

You'd be a great fit with us if you...

Enjoy collaborative pair programming.
Continually try to improve through reading (books, blogs, manuals).
Love Design Patterns but know they can be overused and abused.
Understand that writing software is a long series of trade-offs, and
there usually isn't a one, true implementation.
Don't think you know all the answers but think you know some of the questions.
Understand why Agile is useful as a methodology and have worked in
several projects using some kind of Agile approach.
Are smart, but not conceited.
Are a team player, and self-motivated.
Are confident with your skills and abilities, but always seeking to
improve and learn from others.
Think UML can be useful in expressing, understanding and communicating
concepts, but are not dogmatic about UML as a language for specifying
technical projects.
Can handle your code being reviewed, and can contribute useful
suggestions on improving others'.
Have a curious personality and, through discipline and experience,
instinctively know when it is appropriate to take time to dig deeper
into a problem

Please email with an introduction and your resume (preferably in PDF).

Our web site is http://www.quoininc.com/

(acknowledgments to my friend, Rob Cecil
[http://nxopinion.robertsoninstitute.org/blogs/rcecil/] for many of
the attributes listed above).

Regards,
Eric Meyer

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



Re: Questions re: source resolving porting from 2.1.6 = 2.1.8

2006-01-31 Thread Antonio Fiol Bonnín
2006/1/31, Mark Lundquist [EMAIL PROTECTED]:
 Hi all,

 I have a bunch of Cocoon apps based on 2.1.6, and I'm actually just
 rev-ing the first of these up to 2.1.8.  So far so good, mostly... but
 I have two questions:

 1) Sources appear to be resolved differently.  Some background: my root
 sitemap is not located directly within the webapp context directory,
 instead of webapp/sitemap.xmap, I have

 webapp/
 sitemap/
 main.xmap
 .
 . (other crap that included in main.xmap via XML 
 entities)
 .

 All file paths in the sitemap, e.g. 'src' attribute on generators and
 transformers now resolve relative to the parent directory of the the
 sitemap document (viz., webapp/sitemap/), where they always used to
 resolve relative to the mount point of the sitemap (the webapp context
 in the case of the root sitemap, i.e. webapp/).  To get my
 application working again, I had to change all these attributes to use
 the context: protocol, then all was well.

 So Question 1 is: is this how it's supposed to work now, or is this
 caused by some misconfiguration on my part, e.g. something I was
 supposed to have changed going from 2.1.6 to 2.1.8?

 2) In a subsitemap area, I have some flowscript that invokes the
 SourceResolver on a file pathname, and then calls exists() on the
 result.  No matter what I try, I am not able to come up with a URL for
 the source that gets exists() to return true when I know that it should
 (i.e., the file _does_ exist!).  This _could_ be related to Question
 (1) above; however, it's not exactly the same thing, because in this
 sitemap, the sitemap.xmap file _is_ located directly within the
 subsitemap mount point.

 (1) was an annoyance, but not a big deal and there I'm really just
 curious about whether it's really supposed to work that way.  (2)
 however is a show-stopper for me —I really need to figure out what the
 problem is here!

 Any help much appreciated! :-)
 —ml—


Could you please post the relevant parts of your sitemap, subsitemap
and flowscript?

In particular, I am interested in seeing any map:mount in your sitemap(s).

We do use the resolver to resolve absolute pathnames with Cocoon
2.1.8, from subsitemaps, and from flowscript, and apparently, it works
with no problems. Linux environment.

I had a strange similar thing, consisting in cocoon:/ URLs not being
resolved properly on flowscript called by subsitemaps. This was on
2.1.7, but although we migrated our app from 2.1.5.1 to 2.1.7 and now
to 2.1.8, we had not called flowscript from the subsitemap with
2.1.5.1. So I don't know if it was a regression.

The problem I had is explained on:
http://mail-archives.apache.org/mod_mbox/cocoon-users/200508.mbox/[EMAIL 
PROTECTED]



--
Antonio


selectionList sort order

2006-01-31 Thread Bruyn Bill
I have a multivaluefield with a selection list, bound with some
fb:javascript.  The contents of the list are sorted the way I want them
when I obtain the list, but are rendered differently.  Snippet follows:

  fb:javascript id=languages path=languages direction=load  
fb:load-form

  var list = facade.getListOptions(Language.LIST_NAME);
  for(var i = list.iterator(); i.hasNext();) {
print(i.next().getOptionLong());
  }

  /* yields the following, as desired:
  
English
ASL or other assistance for hearing impaired
Achumaw
   */
  
  widget.setSelectionList(list, id, optionLong);
  
  /* but is rendered in the following order:
  
ASL or other assistance for hearing impaired
Achumaw
English
  */

 /fb:load-form
  /fb:javascript


Anybody know offhand where/why this is happening and how to stop it?
Thanks in advance.


Thanks,

Bill Bruyn


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



Re: Updating Xindice with Request Data

2006-01-31 Thread Mike Casey
Brilliant, that is exactly what I need... its not quite just a sitemap
thing like I was hoping for, but it is good enough to get it all
working. Thankyou to all!

MikeOn 2/1/06, Johnson [EMAIL PROTECTED] wrote:
Hi!We use this method var wid = form.lookupWidget(); form.createBinding(forms/shpk_bind.xml); var documentURI = cocoon.parameters[documentURI]; if (documentURI == xmldb:xindice://localhost:8080/db/shpk/) {documentURI
= cocoon.parameters[documentURI2];} var document = loadDocument(documentURI);form.load(document);saveDocument(document, xmldb:xindice://localhost:8080/db/shpk/ +
wid.shpk_cpdh.value + wid.rev.value + .xml);Best Regardsjohnson- Original Message -From: Jonas Lundberg [EMAIL PROTECTED]
To: users@cocoon.apache.org; [EMAIL PROTECTED]Sent: Tuesday, January 31, 2006 4:59 PMSubject: Re: Updating Xindice with Request Data
I see. I was looking at the downloads page... Regards Hans On 1/31/06, Andre Juffer [EMAIL PROTECTED] wrote:
 Jonas Lundberg wrote:  It seems that no one works on Xindice anymore. At least, I have found  no new versions since 2004. The last version is 1.1b5-dev (May 25 2005)
 See http://xml.apache.org/xindice/changes.html You can download the source code with svn.  I would recommend that you use eXist instead of Xindice, if you want
  an XML database.  http://exist.sourceforge.net/   Regards  Hans 
  On 1/31/06, Mike Casey [EMAIL PROTECTED] wrote:  Hi All,   I am currently working on an implementation of a wiki type site that
  uses XML for Wiki syntax, partly to help learn NXBs/Cocoon and partly because I could not find a suitable product out there to meet my needs.
   The XMLDB block samples has some good examples on how to update  Xindice using XML files which is all very well in good however I need to figure
 out how to pull xml data out of a CForm and then push it into Xindice. The sample has the pipeline   map:match pattern=populate
  map:generate src="">  map:transform type=cinclude/  map:transform type=xmldb/
  map:serialize/ /map:match   Where ofcourse the generator looks for a physical xml file. Does  anyone
 have any hints on how I might acheive this? I am reasonably new to Cocoon so forgive me if the answer you return is blatantly obvious!   Cheers,
   Mike Casey  Wellington  New Zealand -
  To unsubscribe, e-mail: [EMAIL PROTECTED]  For additional commands, e-mail: 
[EMAIL PROTECTED]   --
Andre H.
Juffer|
Phone: +358-8-553 1161 The Biocenter and| Fax: +358-8-553-1141the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland| WWW: 
www.biochem.oulu.fi/Biocomputing/ - 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: ParanoidCocoonServlet cannot run in an undeployed WAR file (solved)

2006-01-31 Thread Brian Maddy

Never mind, I figured it out.

The war file wasn't being unpacked into the webapps/cocoon directory.  
In other words, in my hosting company's /etc/tomcat4/server.xml file, 
the value

Server/Service/Engine/Host/@unpackWARs
is set to false, whereas it is set to true on my installation.  Looks 
like it's time to start negotiations with my hosting company.  :)


Brian


Brian Maddy wrote:

Anyone know what may be causing this error in the logs?  I'm deploying 
as a war file on Tomcat 4.1.24 with a hosting company.  I'm only 
getting a white screen when I visit /cocoon.  It works fine on my 
local Tomcat 4.1.24 server though...


Servlet /cocoon threw load() exception: 
javax.servlet.ServletException: 
org.apache.cocoon.servlet.ParanoidCocoonServlet cannot run in an 
undeployed WAR file


Any ideas?

Brian


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



bug? dupliate triggers/jobs with cron block

2006-01-31 Thread Quoin Developers
I'm using the cron block to launch a CronJob. I'm seeing two instances
of my CronJob created - one with a NullLogger, and one that logs to
the standard cocoon log (that was hard to track down!).

Enable logging is being called from the same place in each instance:

at 
org.apache.avalon.framework.container.ContainerUtil.enableLogging(ContainerUtil.java:89)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:220)
at 
org.apache.avalon.excalibur.component.DefaultComponentHandler.doGet(DefaultComponentHandler.java:136)
at 
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentHandler.java:381)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:272)
at 
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:335)
at 
org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
at 
org.apache.cocoon.components.cron.QuartzJobExecutor.execute(QuartzJobExecutor.java:89)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:534)

It looks like I'm getting two instances of the QuartzJobExecutor from
my trigger.

Has anyone seen this before? Any suggestions what I'm doing wrong, or
is this a bug?

There is nothing particular remarkable about the component
declarations for the jobs or for the cron/trigger declarations (they
are much like the example from the cron block).

Thanks in advance, as I'm starting to pull my hair out on this one.

Regards,
Eric Meyer

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



Re: bug? dupliate triggers/jobs with cron block

2006-01-31 Thread Quoin Developers
In looking at my full thread dump, I see two distinct
Cocoon_QuartzSchedulerThread threads.

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



Re: Questions re: source resolving porting from 2.1.6 = 2.1.8

2006-01-31 Thread Mark Lundquist


On Jan 31, 2006, at 1:50 PM, Antonio Fiol Bonnín wrote:


Could you please post the relevant parts of your sitemap, subsitemap
and flowscript?

In particular, I am interested in seeing any map:mount in your  
sitemap(s).


Well, the mount looks like this:

match pattern=eforms-internal/**
  mount
check-reload=yes
src=context:/eforms/
uri-prefix=eforms-internal
/
/match

As I mentioned, the context:/ appears to be necessary now to get  
Cocoon to look in the webapp root instead of the directory containing  
the (parent) sitemap, since these are not the same.



I had a strange similar thing, consisting in cocoon:/ URLs not being
resolved properly on flowscript called by subsitemaps. This was on
2.1.7, but although we migrated our app from 2.1.5.1 to 2.1.7 and now
to 2.1.8, we had not called flowscript from the subsitemap with
2.1.5.1. So I don't know if it was a regression.

The problem I had is explained on:
http://mail-archives.apache.org/mod_mbox/cocoon-users/200508.mbox/ 
[EMAIL PROTECTED]


Hmm, it may be related but I can't really tell.

But I do notice that the excalibur-sourceresolve jar rev'ed from 1.1 to  
2.1 going from Cocoon 2.1.6 to 2.1.8...


—ml—


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



CForm Persistence Question

2006-01-31 Thread Eric Shannon


I have a form that upon submit gets persisted via an EJB call to our 
business layer.


I need to improve my current implementation so that if an error occurs 
in the business layer,  the error is displayed on the form giving the 
user the chance to possibly make changes and re-submit the form.


I can use java script validation in the binding to implement _most 
_validation logic.


How can I persist the form  with the possibility of needing to set a 
ValidationError?


I have tried using fb:save-form, but the form always completes even if 
I set an error on a widget and return false.
I have also tried using java script validation on the form, but from 
what I can tell the form data is not bound, so I do not have a valid 
object to persist.


Thanks for any ideas,

Eric

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



Re: CForm Persistence Question

2006-01-31 Thread Jason Johnston
Eric Shannon wrote:
 
 I have a form that upon submit gets persisted via an EJB call to our
 business layer.
 
 I need to improve my current implementation so that if an error occurs
 in the business layer,  the error is displayed on the form giving the
 user the chance to possibly make changes and re-submit the form.
 
 I can use java script validation in the binding to implement _most
 _validation logic.
 
 How can I persist the form  with the possibility of needing to set a
 ValidationError?
 
 I have tried using fb:save-form, but the form always completes even if
 I set an error on a widget and return false.
 I have also tried using java script validation on the form, but from
 what I can tell the form data is not bound, so I do not have a valid
 object to persist.


This is a great question!  There are of course many ways you could
approach this, but here's one that I've found works well:

First of all, don't worry about preventing your form from
completing... you can re-display the form even after it has exited the
showForm() loop by simply calling showForm() again on the same Form
object, for instance within a while-loop.  This makes it easy to perform
validations in addition to the field-level validation specified in the
form definition.  Think of two levels of validation: the field-level
validations done by the form, and business-level validation performed by
your business layer and handled by flow outside the showForm() loop.

To communicate the business-level validation errors up to the UI, let
your business layer throw an exception of a particular type you create
(for instance a ValidationException) when it encounters a validation
error.  This exception object will carry the message that should be
presented to the user.  Then in your flowscript (I assume you're using
flowscript here... javaflow would work similarly) use a try/catch to
handle the exception and redisplay the form with the message.  For
instance, off the top of my head:


function myFlow() {
  var form = new Form(...);
  form.createBinding(...);

  var finished = false;
  while(!finished) {
form.showForm(...);
var dataObj = new DataObject(); //whatever
form.save(dataObj);

try {
  callTheEJB(dataObj); //make the ejb call
  //if we got here the ejb call completed without an exception.
  finished = true;
}
catch(e) {
  if(e instanceof ValidationException) {
//display the exception's message in a fd:messages widget:
form.lookupWidget(messagesWidget).addMessage(e.getMessage());
  }
  else throw e; //let other exceptions bubble up
}
  }

  // we're done, show confirmation...
}


I hope that gives you a good start.
--Jason





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



Re: Updating Xindice with Request Data

2006-01-31 Thread Johnson



You're welcome, additional info, if you want delete 
or do something more than load and save document from Xindice, you must write 
some java class like this to achive it.

package org.apache.xindice.examples;

import org.xmldb.api.base.*;import 
org.xmldb.api.modules.*;import org.xmldb.api.*;

import java.io.*;

public class ShpkXIN {public static void 
deleteDocument(String args) throws Exception {Collection col = 
null;try {String driver = 
"org.apache.xindice.client.xmldb.DatabaseImpl";Class c = 
Class.forName(driver);

Database database = (Database) 
c.newInstance();DatabaseManager.registerDatabase(database);col 
= 
DatabaseManager.getCollection("xmldb:xindice://localhost:8080/db/shpk");

Resource document = 
col.getResource(args);col.removeResource(document);}catch 
(XMLDBException e) {System.err.println("XML:DB Exception occured 
" + e.errorCode);}finally {if (col != null) 
{col.close();}}}

public static void retrieveDocument(String args) 
throws Exception {Collection col = null;try 
{String driver = 
"org.apache.xindice.client.xmldb.DatabaseImpl";Class c = 
Class.forName(driver);

Database database = (Database) 
c.newInstance();DatabaseManager.registerDatabase(database);col 
= 
DatabaseManager.getCollection("xmldb:xindice://localhost:8080/db/shpk");

XMLResource document = (XMLResource) 
col.getResource(args);if (document != null) 
{System.out.println("Document " + 
args);System.out.println(document.getContent());}else 
{System.out.println("Document not 
found");}}catch (XMLDBException e) 
{System.err.println("XML:DB Exception occured " + 
e.errorCode);}finally {if (col != null) 
{col.close();}}}

}
and in flowscript

var dao_xindice= new 
Packages.org.apache.xindice.examples.ShpkXIN();

var button4 = 
form.lookupWidget("delete");button4. 
{var document = wid.shpk_cpdh.value + wid.rev.value + 
".xml";dao_xindice.deleteDocument(document);form.load(blank); 
wid.shpk_jdrq.value = new 
java.util.Date();wid.shpk_xgrq.value = new 
java.util.Date();ls_rev = null;ls_tlc = 
null;}
evenwith OJB, you must write something linke 
this, not only sitemap.
with this method, you can easily treat XML DB like 
RDB.

best regards

johnson


  - Original Message - 
  From: 
  Mike 
  Casey 
  To: users@cocoon.apache.org 
  Sent: Wednesday, February 01, 2006 5:58 
  AM
  Subject: Re: Updating Xindice with Request 
  Data
  Brilliant, that is exactly what I need... its not quite just a 
  sitemap thing like I was hoping for, but it is good enough to get it all 
  working. Thankyou to all!Mike
  On 2/1/06, Johnson 
  [EMAIL PROTECTED] wrote:
  Hi!We 
use this methodvar wid = 
form.lookupWidget();form.createBinding("forms/shpk_bind.xml");var 
documentURI = cocoon.parameters["documentURI"];if (documentURI == 
"xmldb:xindice://localhost:8080/db/shpk/") {documentURI = 
cocoon.parameters["documentURI2"];}var document = 
loadDocument(documentURI);form.load(document);saveDocument(document, 
"xmldb:xindice://localhost:8080/db/shpk/" +wid.shpk_cpdh.value + 
wid.rev.value + ".xml");Best Regardsjohnson- 
Original Message -From: "Jonas Lundberg" [EMAIL PROTECTED] 
To: users@cocoon.apache.org; 
[EMAIL PROTECTED]Sent: 
Tuesday, January 31, 2006 4:59 PMSubject: Re: Updating Xindice with 
Request Data I see. I was looking at the downloads 
page... Regards Hans On 1/31/06, 
Andre Juffer [EMAIL PROTECTED] 
wrote: Jonas Lundberg wrote:  It seems that no 
one works on Xindice anymore. At least, I have found  no new 
versions since 2004. The last version is 1.1b5-dev 
(May 25 2005)  See http://xml.apache.org/xindice/changes.html 
You can download the source code with svn.  I 
would recommend that you use eXist instead of Xindice, if you want 
  an XML database.  http://exist.sourceforge.net/ 
  Regards  Hans 
  On 1/31/06, Mike Casey [EMAIL PROTECTED] 
wrote:  Hi All, 
  I am currently working on an implementation of 
a wiki type site that   uses XML for 
Wiki syntax, partly to help learn NXBs/Cocoon and partly 
because I could not find a suitable product out 
there to meet my needs.The XMLDB 
block samples has some good examples on how to update  
Xindice using XML files which is all very well in good 
however I need to figure  out how to 
pull xml data out of a CForm and then push it into Xindice. The 
sample has the pipeline   
map:match pattern="populate"  
 map:generate 
src=""/ 
 map:transform 
type="cinclude"/ 
 map:transform 
type="xmldb"/  
 
map:serialize/ 
/map:match  
 Where ofcourse the generator looks for a physical xml file. 
Does  anyone  have any hints on how 
I might acheive this? I am reasonably new to Cocoon 
so forgive me if the answer you return is blatantly 
obvious!   Cheers,  
  Mike Casey  
Wellington  New Zealand