RE: Problem running the WebDAV sample block from Cocoon 2.2 TRUNK (2006-01-05 19:00 UTC)

2007-01-09 Thread Ard Schrijvers


 On 1/8/07, Joerg Heinicke [EMAIL PROTECTED] wrote:
  On 08.01.2007 13:33, Ard Schrijvers wrote:
 
 java.lang.ClassNotFoundException:
   org.apache.cocoon.generation.JXTemplateGenerator
   The correct class name is now
   org.apache.cocoon.template.JXTemplateGenerator.
  
   Why did this move? Strangely enough, cocoon-2.1.10 does 
 not complain
   about org.apache.cocoon.generation.JXTemplateGenerator, but the
   JXTemplateGenerator does not seem to work properly.
   org.apache.cocoon.template.JXTemplateGenerator does work.
 
  It's not a simple class renaming, but a complete refactoring of the
  JXTemplateGenerator with some incompatibilities. The old one
  (o.a.c.generation) was a 3.000 lines beast IIRC. The new 
 one is modularized.
 
  So, in 2.1 both versions exist, in 2.2 only the new one.
 
 Is there some porting guide somewhere? Maybe I could apply it on
 cocoon-webdav in 2.2 to make it work again...

Can't help you out with this guide, but if you want a sample with webdav that 
works, you can follow http://blogs.hippo.nl/arje/2007/01/got_chinese.html. 
There you have some steps to get slide and cms up and running, though this 
might be not necessary, since you have your own. The sample site explained at 
http://www.hippocms.org/display/CMS/Hippo+Site+Developers has a working webdav 
connection. If you connect to your webdav thing, you might have to remove the 
jms configuration in cocoon.xconf, because probably it cannot connect to jms 
because you won't have a jms server running.

Regards Ard

 
 /Mikael
 
 
  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: cforms: tabs in an aggregated page

2007-01-09 Thread ZongoZongo

Ok, now its getting really strange!
I built a new basic application only with the files ein I need to display
the tabbed form (header and navigation all the same like in the app where
the form doesnt work). And It works fine!
Now I used a tool to compare the htmlfile (generated by cocoon)  of the
first app that doesnt display the form correctly and the htmlfile of this
new applikation where everything works fine. And they are identical (except
tab id and continuation id).
Who can explain me that? two identical files, two different representations?
I am really confused!

kind regards,

Niclas
-- 
View this message in context: 
http://www.nabble.com/cforms%3A-tabs-in-an-aggregated-page-tf2918903.html#a8235066
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



Re: cforms: tabs in an aggregated page

2007-01-09 Thread ZongoZongo

Ok, now I solved the problem. I had an fault inside the matcher that is
responsible for the ressources.

kind regards,

Niclas


ZongoZongo wrote:
 
 Ok, now its getting really strange!
 I built a new basic application only with the files ein I need to display
 the tabbed form (header and navigation all the same like in the app where
 the form doesnt work). And It works fine!
 Now I used a tool to compare the htmlfile (generated by cocoon)  of the
 first app that doesnt display the form correctly and the htmlfile of this
 new applikation where everything works fine. And they are identical
 (except tab id and continuation id).
 Who can explain me that? two identical files, two different
 representations? I am really confused!
 
 kind regards,
 
 Niclas
 

-- 
View this message in context: 
http://www.nabble.com/cforms%3A-tabs-in-an-aggregated-page-tf2918903.html#a8235331
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



Forcing reload of XSL files

2007-01-09 Thread Mikael Olenfalk

Hi everybody!

I just created a getting-started-webapp and getting-started-block and
have the following pipeline in my block:

 map:match pattern=test1
map:generate src=demo.xml/
map:transform src=demo.xsl/
map:serialize /
 /map:match

The I run the following commands:

[EMAIL PROTECTED]: getting-started-block/$ mvn install
[EMAIL PROTECTED]: getting-started-webapp/$ mvn package jetty:run

Now I want to change demo.xsl slightly and see the results without
having to restart jetty.

Is this possible?


Regards,

Mikael

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



Formtdefinition and -template from a org.w3c.dom.Document stream

2007-01-09 Thread ZongoZongo

Hi

Inside the flow I get the formtemplate and the formdefinition from a
javamethod as an org.w3c.dom.Document stream. How can I use this streams to:
-  generate the form
-  call the formtemplate

I hope this is possible.

kind regards,

Niclas
-- 
View this message in context: 
http://www.nabble.com/Formtdefinition-and--template-from-a-org.w3c.dom.Document-stream-tf2945399.html#a8236321
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



how to catch and throw exceptions in cocoon2.1.10 (javascript)

2007-01-09 Thread Robby Pelssers, AGP
Hi,
 
I'm facing a problem that my old javascript file no longer works properly
with constructions like instanceof, getClass(), throw.   Can someone point
me out how to do this?
 
try {
} catch (ex) {
if (ex  instanceof Packages...) {
//Do something 1
} else if (ex.getClass().getName().equals()) {
//Do something 2
}  else {
//Do something 3
throw(ex);
}
}
 
Cheers,
Robby Pelssers



Re: Aggregate fields

2007-01-09 Thread Peter Flynn

Mark Lundquist wrote:


On Jan 8, 2007, at 5:44 AM, Peter Flynn wrote:

[..snip] it understandably complains that there is no widget 
organiser. What have I misunderstood?


Do this:

ft:aggregate-widget id=organiser
ft:widget id=forename/
ft:widget id=surname/
/ft:aggregate-widget


Thanks very much.

///Peter

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



Pb on depedencies in cocoon2.2 with maven

2007-01-09 Thread Sébastien Geindre

Hello everybody,

I've tried the tutorial /Your first Cocoon application using Maven 2 
/http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g2/1159.html


The web application does not well package.
It seems that several dependencies are wrong.

Did anybody succeed with this tutorial ?
DO i have to change the dependencies ? Or re-create a local maven 
repository ?


mvn package
...
Downloading: 
http://mirrors.dotsrc.org/maven2/jakarta-bcel/jakarta-bcel/20040329/jakarta-bcel-20040329.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/excalibur/containerkit/logger/excalibur-logger/2.1/excalibur-logger-2.1.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/excalibur/components/sourceresolve/excalibur-sourceresolve/2.1/excalibur-sourceresolve-2.1.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/excalibur/components/xmlutil/excalibur-xmlutil/2.1/excalibur-xmlutil-2.1.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/excalibur/components/store/excalibur-store/2.1/excalibur-store-2.1.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/excalibur/components/pool/excalibur-pool-api/2.1/excalibur-pool-api-2.1.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
Downloading: 
http://mirrors.dotsrc.org/maven2/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)

...

And, then mvn jetty:run could not complete :

2007-01-09 17:30:06.047::WARN:  Could not instantiate listener 
org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: 
org.springframework.web.context.ContextLoaderListener

...




Re: Forcing reload of XSL files

2007-01-09 Thread Grzegorz Kossakowski

Mikael Olenfalk napisał(a):

Now I want to change demo.xsl slightly and see the results without
having to restart jetty.

Is this possible?

Yes, with reloading classloader plugin[1]

[1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g4/g1/1297.html

--
Grzegorz Kossakowski

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



Re: Pb on depedencies in cocoon2.2 with maven

2007-01-09 Thread Grzegorz Kossakowski

Sébastien Geindre napisał(a):

Hello everybody,

I've tried the tutorial /Your first Cocoon application using Maven 2 
/http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g2/1159.html


The web application does not well package.
It seems that several dependencies are wrong.

Did anybody succeed with this tutorial ?
DO i have to change the dependencies ? Or re-create a local maven 
repository ?


I've encountered some problems trying M2, see [1]. For me, the solution 
was to put additional repository information (for apache.snapshot) in 
poms. But your problem seems to be different, anyway try to remove whole 
m2 local repository. If still no success, run maven with -X parameter 
and paste the output (or see yourself what's going on).


[1] https://issues.apache.org/jira/browse/COCOON-1975


--
Grzegorz Kossakowski

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



Authentication puzzle

2007-01-09 Thread Peter Flynn

I am trying to get simple authentication to work for a single document,
using local files for the authentication step, but I can't get it to 
return an authentication success.


The following works fine when run using Saxon from the commandline,
with userid=peter and password=GHYTFVN.map4h (ie it returns the expected 
authentication XML:

authenticationIDabcd/IDrole*/roledataauthok:peter/data/authentication
and when run with other data it returns the failure:
authenticationdataauthfail:peter/data/authentication
as described in
http://cocoon.apache.org/2.1/developing/webapps/authentication.html

But run via Cocoon it only fails. Does Cocoon automatically perform the 
required crypt(3) on the password string from the form before passing 
the parameter_password into the handler authentication URI?


///Peter

XML:
users
  user id=peter authority=abcd
namePeter Flynn/name
branchuri*/branchuri
cryptGHYTFVN.map4h/crypt
  /user
/users

XSLT:
?xml version=1.0?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0

  xsl:output method=xml/
  xsl:param name=userid/
  xsl:param name=password/

  xsl:template match=/
authentication
  xsl:choose
xsl:when test=users/user/@id=$userid and
users/[EMAIL PROTECTED]/crypt=$password
  ID
xsl:value-of select=users/[EMAIL PROTECTED]/@authority/
  /ID
  role
xsl:value-of select=users/[EMAIL PROTECTED]/branchuri
  /role
  data
xsl:textauthok:/xsl:text
xsl:value-of select=users/[EMAIL PROTECTED]/@id/
  /data
/xsl:when
xsl:otherwise
  data
xsl:textauthfail:/xsl:text
xsl:value-of select=users/[EMAIL PROTECTED]/@id/
  /data
/xsl:otherwise
  /xsl:choose
/authentication
  /xsl:template

/xsl:stylesheet

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



Re: unparsed-entity-uri()

2007-01-09 Thread Steven D. Majewski


On Jan 5, 2007, at 11:38 AM, Peter Flynn wrote:

Does anyone know when or if the unparsed-entity-uri() function will  
be implemented in distributions of Cocoon? It's becoming very hard  
to do

serious document publishing without proper entity resolution.




I don't know but this is also a big problem for us.

I started trying to follow the code flow in cocoon and soon got lost.

Someone suggested a workaround ( which I haven't yet tried):

  Write a cocoon reader which does the xslt transform itself rather
  than running it thru the pipeline. Use the transform mainly for
  replacing unparsed entities with something that cocoon can handle.
  Then call that pipeline as a source in another pipeline to do the
  rest of the processing.


-- Steve Majewski / UVA Alderman Library


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



Re: Authentication puzzle

2007-01-09 Thread Steven D. Majewski


On Jan 9, 2007, at 11:57 AM, Peter Flynn wrote:

I am trying to get simple authentication to work for a single  
document,
using local files for the authentication step, but I can't get it  
to return an authentication success.


The following works fine when run using Saxon from the commandline,
with userid=peter and password=GHYTFVN.map4h (ie it returns the  
expected authentication XML:
authenticationIDabcd/IDrole*/roledataauthok:peter/ 
data/authentication

and when run with other data it returns the failure:
authenticationdataauthfail:peter/data/authentication
as described in
http://cocoon.apache.org/2.1/developing/webapps/authentication.html

But run via Cocoon it only fails. Does Cocoon automatically perform  
the required crypt(3) on the password string from the form before  
passing the parameter_password into the handler authentication URI?



I'm a beginner here (cocoon) myself, and I'm not sure I understand  
your problem/question, but:


My understanding is that the Authentication Framework is just a  
framework -- it doesn't itself
do any authentication or encryption/decryption of passwords. It   
manages protected resources
and restricts them to authenticated users.  ( Because typically sites  
will want to plug in different

authentication mechanisms. )

I'm not clear on what you're trying to do. Are you doing trying to do  
HTTP Basic Authentication ?
And I'm not sure what you mean by required crypt(3) - required by  
whom ?
HTTP  Basic Authentication sends  the bas64 encoding of  
user:password  They aren't encrypted.


( But if you're trying to port users from an Apache .htpasswd file ,  
then THOSE entries are encrypted
  with crypt(3). That was my problem and I found and adapted a  
javascript version of crypt. )



-- Steve Majewski / UVA Alderman Library





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



Re: Forcing reload of XSL files

2007-01-09 Thread Mikael Olenfalk

I had already enabled cocoon-rcl in my config.

Do I need to run any maven command after editing the XSL files?

/Mikael


On 1/9/07, Grzegorz Kossakowski [EMAIL PROTECTED] wrote:

Mikael Olenfalk napisał(a):
 Now I want to change demo.xsl slightly and see the results without
 having to restart jetty.

 Is this possible?
Yes, with reloading classloader plugin[1]

[1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g4/g1/1297.html

--
Grzegorz Kossakowski

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




namespace removed from xml

2007-01-09 Thread Roel Croonenberghs
Hello,

I use 
SAXParser parser(org.apache.excalibur.xml.sax.SAXParser)
parser.parse(input, webServiceHandler);

to treat the info I got from webservices in xml format.
I receive somethig like 
?xml version=1.0 encoding=UTF-8?Envelope 
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance;dataDriverid 
xsi:nil=false805330/id/Driver/data/Envelope

but after i send it through the parser, i get 
SofEnvelope dataMWSDriverid xsi:nil=false805330/id
/Driver/data/Envelope

so the xmlns namsespace definition has disappeared.

What can I do to  prevent this? I read something about 
parser.setNamespaceAware(true); but that is not a valid method of the 
parser I use.


Greetings,


Roel Croonenberghs


Re: Formtdefinition and -template from a org.w3c.dom.Document stream

2007-01-09 Thread Jason Johnston

ZongoZongo wrote:

Hi

Inside the flow I get the formtemplate and the formdefinition from a
javamethod as an org.w3c.dom.Document stream. How can I use this streams to:
-  generate the form


I believe you can pass a DOM element to the Form flowscript constructor:

var form = new Form(myFormDocument.getDocumentElement());


-  call the formtemplate


What you need here is a way to use the DOM Document as input to the JX 
generator.  The xmodule source allows you to stream a DOM from an input 
module, for instance using the flow-attribute module:


(flowscript:)
form.showForm(display-pipeline, {dom : myJXDocument});

(sitemap:)
map:match pattern=display-pipeline
  map:generate type=jx src=xmodule:flow-attr:dom /
  ...


Now, you should be aware that while this sort of setup is certainly 
possible, there will be a performance penalty.  First of all, using a 
DOM object to build the form definition prevents the caching of that 
definition that usually takes place.  Similarly, the JX template cannot 
be precompiled and cached so it has to recompile the template each time. 
 You'll have to determine if that performance penalty is worth it for 
your particular case.


Hope that helps
--Jason

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



Re: how to catch and throw exceptions in cocoon2.1.10 (javascript)

2007-01-09 Thread Jason Johnston

Robby Pelssers, AGP wrote:

Hi,
 
I'm facing a problem that my old javascript file no longer works 
properly with constructions like instanceof, getClass(), throw.   Can 
someone point me out how to do this?
 
try {

} catch (ex) {
if (ex  instanceof Packages...) {
//Do something 1
} else if (ex.getClass().getName().equals()) {
//Do something 2
}  else {
//Do something 3
throw(ex);
}
}



If I recall, the new version of Rhino treats exceptions from the Java 
layer differently than it used to.  It used to pass them up to the JS 
catch statement directly, whereas now it wraps them in a 
org.mozilla.javascript.WrappedException.  You should be able to get 
access to your original Java exception by unwrapping it with 
ex.getWrappedException().


See 
http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/WrappedException.html


--Jason


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



Cforms: set output value with i18n

2007-01-09 Thread Ady Person
Hi,

is there a way, how to set a value of output widget with i18n message?

Something like widget.setValue(new I18NMessage(key, catalogue)) ?

Thanks
Ady


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