Re: cocoon.xconf error

2003-03-30 Thread Jeremy Quinn
On Wednesday, March 19, 2003, at 04:45 PM, Lionel Crine wrote:

Hello,

I use cocoon 2.0.3 :
I tried to add some new components-instance in cocoon.xconf  as 
Jeremy Quinn wrote it in 
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=104490756424028w=2 
 :

...
component-instance 
class=org.apache.cocoon.components.modules.input.XMLFileModule 
logger=core.modules.xml name=RLR-conf
file src=WEB-INF/RLR.xconf/


file src=context://WEB-INF/RLR.xconf/
   ^^
hope this helps

regards Jeremy

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


Newbie: Ok I've got it installed but can't get a new stand alone application to run

2003-03-30 Thread Phil Coultard
Hi All,

Big thanks to Geoff Howard for his swift and fruitful reply to my last post.

I am just starting with Cocoon and I'm sorry to ask yet more what I'm sure
are stupid questions but...

Following Geoff's advice I have read the enclosed documentation and looked
on http://wiki.cocoondev.org. However both sources seem to concentrate on
the concepts and skip the more basic set-up procedures... Using these two
sources I have set up work as a sub-dir of mount and put in it two files:
sitemap.xmap and home.html, the source for which is shown below. When I
browse to http://localhost:8080/cocoon/mount/work/ I receive the following
message:

Cocoon 2 - Resource not found


type resource-not-found
message Resource not found
description The requested URI /cocoon/mount/work/home.html was not found.
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
/cocoon/mount/work/home.html
path-info
mount/work/home.html

I can see that it clearly is getting as far as looking for the file
home.html in the root folder of the app but I don't understand why it
doesn't find it: it is there! Clearly I'm missing a point somewhere...

I am running:
Win 98
JDK 1.3.1
Tomcat 4.1.24
Cocoon 2.0.4

Cocoon runs ok: the examples work just fine.

Thanks in advance,

Kind Regards,

Phil Coultard





sitemap.xmap


?xml version=1.0?
map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;

  map:components
map:generators   default=file/
map:transformers default=xslt/
map:readers  default=resource/
map:serializers  default=html/
map:matchers default=wildcard/
  /map:components

  map:pipelines
  map:pipeline
   map:match pattern=
 map:redirect-to uri=home.html/
   /map:match

/map:pipeline

  /map:pipelines
/map:sitemap



home.html


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

html
head
titleUntitled/title
/head

body
Hi There!


/body
/html
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/03


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



RE: Shipping compiled translets rather than XSL files in plain text format

2003-03-30 Thread Geoff Howard
A great question I'd be interested in.  I've not heard anyone doing this, so
if you
don't get an answer you'll need to dig into it yourself.  The first thing
I'd try is
to see how xsltc (I assume you're using that) handles precomiled
stylesheets.  What
does it expect as its source?  A classname?  It may be as simple as setting
up
cocoon to use xsltc (see archives and wiki) and passing the classname in the
src
attribute of the transformer.

Please report back what you find and I (or others) can help evaluate what
internal
changes would be necessary to accomodate this if it doesn't just work
automagically.

Are you using 2.1dev or 2.0.4?

Geoff Howard

-Original Message-
From: jcplerm [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 11:02 PM
To: [EMAIL PROTECTED]
Subject: Shipping compiled translets rather than XSL files in plain text
format


Is it possible to deploy Cocoon applications at customer sites just by
installing compiled versions of XSL stylesheets (translets) rather than
supplying them in plain text format?

Thanks,

Julio Lerm
Chicago, IL


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



RE: Newbie: Ok I've got it installed but can't get a new stand alone application to run

2003-03-30 Thread Geoff Howard
 -Original Message-
 From: Phil Coultard [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 7:04 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie: Ok I've got it installed but can't get a new stand
 alone application to run


snip/

 Following Geoff's advice I have read the enclosed documentation and looked
 on http://wiki.cocoondev.org. However both sources seem to concentrate on
 the concepts and skip the more basic set-up procedures... Using these two
 sources I have set up work as a sub-dir of mount and put in it
 two files:
 sitemap.xmap and home.html, the source for which is shown below. When I
 browse to http://localhost:8080/cocoon/mount/work/ I receive the following
 message:

Ok, good way to get started playing around.


 Cocoon 2 - Resource not found
 --
 type resource-not-found
 message Resource not found
 description The requested URI /cocoon/mount/work/home.html was
 not found.
 sender org.apache.cocoon.servlet.CocoonServlet
 source Cocoon servlet
 request-uri
 /cocoon/mount/work/home.html
 path-info
 mount/work/home.html

 I can see that it clearly is getting as far as looking for the file
 home.html in the root folder of the app but I don't understand why it
 doesn't find it: it is there! Clearly I'm missing a point somewhere...

Yes, see below.

 --
 sitemap.xmap
 --
 ?xml version=1.0?
 map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;

   map:components
 map:generators   default=file/
 map:transformers default=xslt/
 map:readers  default=resource/
 map:serializers  default=html/
 map:matchers default=wildcard/
   /map:components

   map:pipelines
   map:pipeline
map:match pattern=
  map:redirect-to uri=home.html/
/map:match

!-- You need a match for pattern=home.html.  Cocoon never automatically
maps uris to actual resources on disk without an appropriate matcher. --

 !-- read html and stream it directly, bypassing cocoon's sax
pipeline --
 map:match pattern=home.html
map:read mime-type=text/html src=home.html
 /map:match

!-- OR --

!-- parse html as xml using the file generator.  you can add
transformer(s) and
serializer as you like here, but if your html is not well-formed xml,
the processing will fail --
 map:match pattern=home.html
  map:generate src=home.html/
  !--map:transform src=your_transform.xsl/--
map:serialize/
 /map:match

!-- OR --
!-- use Tidy to parse html and make it well-formed xml --
 map:match pattern=home.html
  map:generate type=html src=home.html/
  !--map:transform src=your_transform.xsl/--
map:serialize/
 /map:match

!-- Note: to use pattern matching to serve all html in that dir in the same
way,
change the match to pattern=*.html and use src={1}.html in your
generator/reader. --

 /map:pipeline

   /map:pipelines
 /map:sitemap

Hope that helps,

Geoff


 --
 home.html
 --
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

 html
 head
   titleUntitled/title
 /head

 body
 Hi There!


 /body
 /html
 ---


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



Xpath translate...

2003-03-30 Thread João César
Hi, after trying this {request:translate(query, '+', ' ')}, I don't get any
result from my search... I've tried to see if translate was working but with
no sucess..

What I'm trying to do is, parsing this querystring:

search?query=transgenic+rice

to:

map:generate type=file
src=http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmedamp;te
rm={request:translate(query, '+', ' ')}amp;retmax=200/

to match:

http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmedterm=transg
enic%20riceretmax=200

TIA

Joao Cesar
[EMAIL PROTECTED]





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



expires pipeline parameter

2003-03-30 Thread Ryan Heise
Can we use the expires pipeline parameter in cocoon 2.0, or should I
upgrade to 2.1?

Thanks,

Ryan

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



Re: Shipping compiled translets rather than XSL files in plain text format

2003-03-30 Thread jcplerm
Taking a look at XSLTC-related source files, it appears that
there is a limitation on XSLTC's side in terms of requiring
a DOM object as argument to the method transform of
class org.apache.xalan.xsltc.Translet.

This is the Translet interface definition:

package org.apache.xalan.xsltc;
public interface Translet {
public void transform(DOM document, TransletOutputHandler handler)
 throws TransletException;
public void transform(DOM document, TransletOutputHandler[] handlers)
 throws TransletException;
public void transform(DOM document, NodeIterator iterator,
 TransletOutputHandler handler)
 throws TransletException;
public Object addParameter(String name, Object value);
public void buildKeys(DOM document, NodeIterator iterator,
 TransletOutputHandler handler, int root)
 throws TransletException;
public void addAuxiliaryClass(Class auxClass);
public Class getAuxiliaryClass(String className);
public String[] getNamesArray();
public String[] getNamespaceArray();
}

The fact that a DOM object is required limits its
applicability to the Cocoon framework, since one of the
biggest strengths of Cocoon is the SAX-based processing.
In order to take advantage of a Translet in a Cocoon pipeline,
a sitemap component would then have to first build a DOM tree from
the stream of SAX events and then invoke the translet.
Looks feasible, but a Translet should be able to handle SAX
events, in addition to a DOM document anyway.

Then I guess there are two ways of moving ahead.
Please correct me if I'm wrong:

1) Have XSLTC's Translet implementation changed,
so it is able to deal with SAX-based processing;

2) Cocoon provides a way of compiling, or at least
serializing the stylesheets. This compiled or serialized
image of the pipeline transformations could then be
deployed at customer sites. This would then mean
Cocoon would be doing similar to XSLTC, but then
comes the question to Cocoon's developers: what is the
feasibility?

Thanks,

Julio

- Original Message -
From: Geoff Howard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 6:42 AM
Subject: RE: Shipping compiled translets rather than XSL files in plain text
format


 A great question I'd be interested in.  I've not heard anyone doing this,
so
 if you
 don't get an answer you'll need to dig into it yourself.  The first thing
 I'd try is
 to see how xsltc (I assume you're using that) handles precomiled
 stylesheets.  What
 does it expect as its source?  A classname?  It may be as simple as
setting
 up
 cocoon to use xsltc (see archives and wiki) and passing the classname in
the
 src
 attribute of the transformer.

 Please report back what you find and I (or others) can help evaluate what
 internal
 changes would be necessary to accomodate this if it doesn't just work
 automagically.

 Are you using 2.1dev or 2.0.4?

 Geoff Howard

 -Original Message-
 From: jcplerm [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 29, 2003 11:02 PM
 To: [EMAIL PROTECTED]
 Subject: Shipping compiled translets rather than XSL files in plain text
 format


 Is it possible to deploy Cocoon applications at customer sites just by
 installing compiled versions of XSL stylesheets (translets) rather than
 supplying them in plain text format?

 Thanks,

 Julio Lerm
 Chicago, IL


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



problems with first web app

2003-03-30 Thread Yuriy Zubarev
Hello everyone,

On my way to create hello world application with Cocoon
I hit the wall and I would like to describe my set up to
get any advice (tomcat 4.1.18; cocoon 2.0.4; and just
in case - cocoon.war was deployed and run successfully):

webapps
  test
WEB-INF
  lib (contains all jars came with cocoon.war)
  web.xml (The main Cocoon2 servlet is added like in cocoon.war)
  cocoon.xconf
  logkit.xconf
sitemap.xmap
helloworld.xml
helloworld2html.xsl

Now when I try to access http://127.0.0.1:8080/test/helloworld I
get the following:

type- fatal
message - UnnamedSelector: ComponentSelector could not find the
component for hint [file]
description - org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the component for hint
[file]
sender  - org.apache.cocoon.servlet.CocoonServlet
source  - Cocoon servlet


sitemap.xmap is very simple:

map:components

  map:generators default=file
map:generate name=file
src=org.apache.cocoon.generation.FileGenerator/
  /map:generators
  map:transformers default=xslt
map:transformer name=xslt
src=org.apache.cocoon.transformation.TraxTransformer/
  /map:transformers
  map:serializers default=html
map:serializer name=html
src=org.apache.cocoon.serialization.HTMLSerializer mime-type=text/html/
  /map:serializers
  map:matchers default=wildcard
map:matcher name=wildcard
src=org.apache.cocoon.matching.WildcardURIMatcherFactory/
  /map:matchers

/map:components

map:pipelines

  map:pipeline
map:match pattern=helloworld
  map:generate src=helloworld.xml/
  map:transform src=helloworld2html.xsl/
  map:serialize/
/map:match
  /map:pipeline

/map:pipelines


Any help is very appreciated.

Thank you for your time,
Yuriy ZUbarev





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



RE: problems with first web app

2003-03-30 Thread Yuriy Zubarev
Thank you, that was the exact reason for failure.
I blindly copied that portion of config file from
Cocoon: Building XML Applications book and it
seems to have a misprint then.

Yuriy ZUbarev

-Original Message-
From: Geoff Howard [mailto:[EMAIL PROTECTED]
Sent: March 30, 2003 5:25 PM
To: [EMAIL PROTECTED]
Subject: RE: problems with first web app


 -Original Message-
 From: Yuriy Zubarev [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 6:38 PM
 To: [EMAIL PROTECTED]
 Subject: problems with first web app
 
 
 Hello everyone,
 

snip/

 sitemap.xmap is very simple:
 
 map:components
 
   map:generators default=file
 map:generate name=file
 src=org.apache.cocoon.generation.FileGenerator/

It's map:generator here, map:generate below in the pipeline.

HTH,
Geoff Howard

 

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



XMLForm: how to retrieve URL parameter?

2003-03-30 Thread Sylvain.Thevoz
Hello,

I'm using an URL like below to access to a XMLForm application:

http://myServer:8080/myApp?id=2500

I need to retrieve this parameter (id) from within the XMLForm Action class.

The purpose is to populate the Bean with an object (id=2500) coming from the database.

What is the best solution to retrieve the URL?


Thanks
Sylvain (T)

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