Re: about Xindice

2003-06-29 Thread Josema Alonso
Hi, Yury.

It could be due to a number of reasons. It could depend on JDK version
you're using, if you're using DOM or SAX, the XPath expression you're using,
if you're validating data or not...or even a bug...you have provided very
little info.

Anyway, I suggest you should try at [EMAIL PROTECTED] which is
more suitable for this kind of questions. And maybe you could try to search
its archives (http://marc.theaimsgroup.com/?l=xindice-users). I remember
questions like these surfaced recently.

Best.


- Original Message -
From: Yury Mikhienko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 4:35 PM
Subject: about Xindice


 Hi cocooners!

 I implements the news system on my Web-site based on xindice 1.1b, but
time of time
 database works is very slow :(( (big timeout on response ) .
 It's strange behaviour, because in collection I stored no more 150
documents.
 Can I make the work of xindice database more faster?
 Any solutions for tuning?

 Thanks all for advise!

 --

 Best regards,
 Yury Mikhienko.
 IT engineer, ZAO Mobicom-Kavkaz

 -
 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: XMLForm: how to retrieve URL parameter?

2003-03-31 Thread Josema Alonso
If i remember correctly, the Request is held in the objectModel, so in your
act method you can do:
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);

And get the desired paramater from there.

Best.


-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 31 de marzo de 2003 9:38
Para: [EMAIL PROTECTED]
Asunto: XMLForm: how to retrieve URL parameter?


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]



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



RE: XMLForm: how to retrieve URL parameter?

2003-03-31 Thread Josema Alonso
Yes, if you go this way.
You can call its parent act method if needed at the beginning anyway.

When I used that code, my first line in the action was:
Map resultMap = super.act(redirector, resolver, objectModel, source,
params);

Anyway, maybe going the other way suggested in this thread would be easier.

Best.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 31 de marzo de 2003 13:18
Para: [EMAIL PROTECTED]
Asunto: RE: XMLForm: how to retrieve URL parameter?


Hi Josema,

Do I need to override the act() method in the Action?

Regards
Sylvain

-Message d'origine-
De: Josema Alonso [mailto:[EMAIL PROTECTED]
Date: lundi, 31. mars 2003 11:58
À: [EMAIL PROTECTED]
Objet: RE: XMLForm: how to retrieve URL parameter?


If i remember correctly, the Request is held in the objectModel, so in your
act method you can do:
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);

And get the desired paramater from there.

Best.


-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 31 de marzo de 2003 9:38
Para: [EMAIL PROTECTED]
Asunto: XMLForm: how to retrieve URL parameter?


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]



-
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: XMLForm: how to retrieve URL parameter?

2003-03-31 Thread Josema Alonso
Sure:

public Map act (Redirector redirector, SourceResolver resolver,
Map objectModel, String source, Parameters params) throws
java.lang.Exception {
Map resultMap = super.act(redirector, resolver, objectModel, source,
params);
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
//I think you can also write the above line this way:
//Request request = ObjectModelHelper.getRequest(objectModel);
String the_parameter = request.getParameter(the_parameter);
...

I do not know if easier ways exist but this worked for me.
Hope it helps.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 2:07 PM
Subject: RE: XMLForm: how to retrieve URL parameter?


 Hi again,

 Could you give an example of your code?

 Thanks
 Sylvain




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



[OT] sunBow-like licenses

2003-03-26 Thread Josema Alonso
Dear all,

Just a quick question.
What do I need to generate licenses like the sunBow one for my own product?
We're developing some widgets for Flash using Java, XML and Cocoon and my
company would like to distribute it with a XML license like the sunBow one,
for a given period of time, for example.

Any pointers would be very very much appreciated.

Maybe Martin or anybody else with the right knowledge can help me.
Thanks in advance.



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



Re: Xindice related query..

2003-03-25 Thread Josema Alonso
Hello.

Try:
xindiceadmin ac -c /db -n Artist

Anyway, I usually use some of the GUI tools available for Xindice. Take a
look at http://xml.apache.org/xindice/related.html

Btw, the wiki how-to was accepted as a official how-to some weeks ago, and I
polished it a bit before submitting it. See
http://xml.apache.org/cocoon/howto/howto-xindice-xmlform.html
Both should do the job anyway.

Hope it helps.


- Original Message -
From: Gautam Ganguly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 12:28 AM
Subject: Xindice related query..


 hi all,
I don't know wether this query is suitable for this site or not..but
 hope someone might be able to help me out on this.

 I just now installed Xindice1.0 binary release version.As per the
 instruction for xindice docs,i started up the database and i can see the
 'db' instance also.

 When i do a list of all collections that are present through the DOS
 command line:
 c:\xindicexindice lc -c /db
 i see system..which is ok.

 Going by the setup documents for setting up a new collection under db
 instance..when i run these command...i just see this getting thrown at
 me.
 c:\xindice xindice ac -c /db -n Artist

 ---
 Format: xindice action [switch] [parameter]

 Where:  [switch]  implements:
 -c   Collection context (must always be specified)
 -e   File extension for multiple documents
 -f   File path for document retrieval and storage
 -i   Implementing Class for XMLObjects
 -n   Name
 -o   URI String for invocation of XMLObject
 -p   Index pattern
 -q   Query string
 -u   Database URI
 -y   Force Deletion process
 -t   Specify the data type in collection index
 --pagesize   Page size for file pages (default: 4096)
 --maxkeysize The maximum size for file keys (default: 0=none)


 Actions:

 xindice [parameter], etc...

 ad   Adds a document
 addmultiple  Adds multiple documents
 dd   Deletes a document
 lc   Retrieves a collection/nested collection list
 rd   Retrieves a document for storage elsewhere
 ld   Retrieves a list of documents in a particular
 collection
 invoke   Invokes an XML Object on a collection
 lo   Retrieves an XMLObject list from a collection
 xpathQueries a Collection using XPath
 export   Exports a collection/document from a directory tree

 Examples:

 xindice ad -c /db/test -f /tmp/xmldocument -n myxmldocument
 xindice dd -c /db/test -n myxmldocument
 xindice rd -c /db/test/ocs -f a:\file.xml -n file.xml
 xindice xpath -c /db/test/ocs -q test

 For more information, please read the Xindice - Tools Reference Guide
 ---
 ...its as if xindice can't understand the action for add_collection.

 I did notice in the Xindice docs that the current binary release might
 not work with JDK1.4...is it something to do with that???I have also
 placed all the .jar files that came in \xindice\java\lib dir in the
 CLASSPATH.

 I am trying to test the Wiki Howto:
 http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice

 any help or suggestion would be very much appreciated..

 regards,
 Gautam


 -
 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: cocoon xindice update xml content

2003-03-24 Thread Josema Alonso
Hi, there.

If you prefer to go the XML way, you can take a look at XUpdate and its
transformer, available in 2.1 CVS. This thread can help you a bit:
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=104714942428556w=2

If you prefer to go the Java way, this how-to can make a good starting point
and you could extend it to suit your needs:
http://xml.apache.org/cocoon/howto/howto-xindice-xmlform.html

Best.


- Original Message -
From: Stavros Kounis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 2:19 PM
Subject: cocoon  xindice update xml content


 hi

 is there any example how to update the content of documents stored
 in xindice collections using cocoon?

 i have found examples how to make xqueries and get data from xindici using
 cocoon but i want to be able to put data or put new nodes in a XML
 document stored into xindici

 thanks



 --
 Stavros S. Kounis
 Development  Research Department
 Osmosis - networks  consulting services

 web: http://www.osmosis.gr
 email: [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: calling Cocoon servlet from a external one

2003-03-17 Thread Josema Alonso
Vadim,

 result of the Cocoon processing in my JSP + Response already
 committed -- you are trying to call Cocoon too late in the game; it
 must be before you commit your response, i.e., call Cocoon before you
 have any other content generated by JSP.
I thought so. I tried it at the beginning and it works there, but that's not
where I want to put the data generated by Cocoon. I should investigate more.

 Take a look at new CocoonBean - programmatic access to the Cocoon. May
 be it will help.
This sounds like something I could use for the task. Unfortunately I'm tied
to 2.0.4 for this project :-(

Thanks for your help.



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



calling Cocoon servlet from a external one

2003-03-16 Thread Josema Alonso
Hi, all.

I've found some documents at Wiki and some threads in the mailing list about
integrating servlets in Cocoon, but not the other way round. And that's what
I need.

I have a webapp in JSP and Servlets and I need to integrate some
URLs processed by Cocoon for a news system I've built.
I realize I need to make a cross context call, from my context to Cocoon's.
I've tried with Tomcat and Websphere. I could make the Cocoon context
accesible by my app but could not include the result of the Cocoon
processing in my JSP.

Has anybody tried this? I have tried using a RequestDispatcher but it fails
throwing a 'Cannot add header. Response already committed.:
java.lang.IllegalStateException'. Any pointers would be much appreciated.

Thanks.

ps: I'm copying both lists cause I honestly don't know which one is best
suited for this question. Sorry for any inconvenience.






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



integrating cocoon with websphere developer studio, is possible?

2003-03-14 Thread Josema Alonso
Hi, all.

My company is using Websphere Developer Studio 4.0.3 (WASD4.0.3) for project
development and WAS as the container.
Since I'm more and more inlvolved in projects, and I've been using Cocoon
for almost a couple years now, I finally had the chance to use it in a real
project for my companyyes! :-)

The thing is I should need to make it work within the WASD testing framework
and I'm not sure if importing the WAR would be enough since I have tried and
I couldn't make it work out of the box.
So before starting to investigate, I thought I could ask around here just in
case someone is already working this way. Any help would be very much
appreciated.

On a side note, I would also like to know if anybody could make Cocoon work
from another WAS application. I have an application running for a corporate
website and I have made a news system completely in Cocoon, and before
making everything in Cocoon, during a transition time, I would like to be
able to keep the java application running and dispatching to the Cocoon
servlet the requests to the news system. Anybody cross contexting or
something like that?

Thanks for reading.

ps: I'm talking about Cocoon 2.0.4 here, we would switch to 2.1 when
switching to WAS5.



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



RE: integrating cocoon with websphere developer studio, is possible?

2003-03-14 Thread Josema Alonso
Thanks for your help.

Stupid me, I forgot to attach the Cocoon app to the Server instance...oh,
my...
Now it's working.

On the second question, please, could you tell me what you needed to make it
work?
I'm still trying to figure out how to send requests (I'm thinking about the
request dispatcher), from the Servlets or JSPs in my Java app to the Cocoon
Servlet context.

Thanks again.


-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de marzo de 2003 13:48
Para: [EMAIL PROTECTED]
Asunto: RE: integrating cocoon with websphere developer studio, is
possible?


We run WAS 4 and develop in WSAD 4 and Cocoon runs fine on both (was
even able to get it running on WAS 3.5.4).  We were able to get it up
and running simply by installing the WAR file as described on the
Cocoon website (WAS 4 installation is at the very end of the
installation instructions).

As to your second question, yes...we originally had an account status
app running on WAS and we added Cocoon to the server and access it just
fine from the account status app.  We use it to generate PDF versions
of Bills of Lading on the fly.

Bob Hitchins
Senior IT Business Analyst
Cargill Crop Nutrition


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 6:55 AM
To: [EMAIL PROTECTED]
Subject: integrating cocoon with websphere developer studio, is
possible?


Hi, all.

My company is using Websphere Developer Studio 4.0.3 (WASD4.0.3) for
project
development and WAS as the container.
Since I'm more and more inlvolved in projects, and I've been using
Cocoon
for almost a couple years now, I finally had the chance to use it in a
real
project for my companyyes! :-)

The thing is I should need to make it work within the WASD testing
framework
and I'm not sure if importing the WAR would be enough since I have
tried and
I couldn't make it work out of the box.
So before starting to investigate, I thought I could ask around here
just in
case someone is already working this way. Any help would be very much
appreciated.

On a side note, I would also like to know if anybody could make Cocoon
work
from another WAS application. I have an application running for a
corporate
website and I have made a news system completely in Cocoon, and before
making everything in Cocoon, during a transition time, I would like to
be
able to keep the java application running and dispatching to the Cocoon
servlet the requests to the news system. Anybody cross contexting or
something like that?

Thanks for reading.

ps: I'm talking about Cocoon 2.0.4 here, we would switch to 2.1 when
switching to WAS5.



-
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: integrating cocoon with websphere developer studio, is possible?

2003-03-14 Thread Josema Alonso
Ok. Thanks anyway.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de marzo de 2003 19:58
Para: [EMAIL PROTECTED]
Asunto: RE: integrating cocoon with websphere developer studio, is
possible?


Sorry...we don't implement Cocoon as an application framework...all I 
do is use a sitemap to route PDF requests through the servlet to 
generate PDFs on the fly...I'm sure someone else here will be able to 
help you though :-)

Good Luck!

Bob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 1:02 PM
To: [EMAIL PROTECTED]
Subject: RE: integrating cocoon with websphere developer studio, is
possible?


Thanks for your help.

Stupid me, I forgot to attach the Cocoon app to the Server 
instance...oh,
my...
Now it's working.

On the second question, please, could you tell me what you needed to 
make it
work?
I'm still trying to figure out how to send requests (I'm thinking about 
the
request dispatcher), from the Servlets or JSPs in my Java app to the 
Cocoon
Servlet context.

Thanks again.


-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de marzo de 2003 13:48
Para: [EMAIL PROTECTED]
Asunto: RE: integrating cocoon with websphere developer studio, is
possible?


We run WAS 4 and develop in WSAD 4 and Cocoon runs fine on both (was
even able to get it running on WAS 3.5.4).  We were able to get it up
and running simply by installing the WAR file as described on the
Cocoon website (WAS 4 installation is at the very end of the
installation instructions).

As to your second question, yes...we originally had an account status
app running on WAS and we added Cocoon to the server and access it just
fine from the account status app.  We use it to generate PDF versions
of Bills of Lading on the fly.

Bob Hitchins
Senior IT Business Analyst
Cargill Crop Nutrition


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 6:55 AM
To: [EMAIL PROTECTED]
Subject: integrating cocoon with websphere developer studio, is
possible?


Hi, all.

My company is using Websphere Developer Studio 4.0.3 (WASD4.0.3) for
project
development and WAS as the container.
Since I'm more and more inlvolved in projects, and I've been using
Cocoon
for almost a couple years now, I finally had the chance to use it in a
real
project for my companyyes! :-)

The thing is I should need to make it work within the WASD testing
framework
and I'm not sure if importing the WAR would be enough since I have
tried and
I couldn't make it work out of the box.
So before starting to investigate, I thought I could ask around here
just in
case someone is already working this way. Any help would be very much
appreciated.

On a side note, I would also like to know if anybody could make Cocoon
work
from another WAS application. I have an application running for a
corporate
website and I have made a news system completely in Cocoon, and before
making everything in Cocoon, during a transition time, I would like to
be
able to keep the java application running and dispatching to the Cocoon
servlet the requests to the news system. Anybody cross contexting or
something like that?

Thanks for reading.

ps: I'm talking about Cocoon 2.0.4 here, we would switch to 2.1 when
switching to WAS5.



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



RE: integrating cocoon with websphere developer studio, is possible?

2003-03-14 Thread Josema Alonso
Ok. Thanks anyway.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de marzo de 2003 19:58
Para: [EMAIL PROTECTED]
Asunto: RE: integrating cocoon with websphere developer studio, is
possible?


Sorry...we don't implement Cocoon as an application framework...all I 
do is use a sitemap to route PDF requests through the servlet to 
generate PDFs on the fly...I'm sure someone else here will be able to 
help you though :-)

Good Luck!

Bob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 1:02 PM
To: [EMAIL PROTECTED]
Subject: RE: integrating cocoon with websphere developer studio, is
possible?


Thanks for your help.

Stupid me, I forgot to attach the Cocoon app to the Server 
instance...oh,
my...
Now it's working.

On the second question, please, could you tell me what you needed to 
make it
work?
I'm still trying to figure out how to send requests (I'm thinking about 
the
request dispatcher), from the Servlets or JSPs in my Java app to the 
Cocoon
Servlet context.

Thanks again.


-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de marzo de 2003 13:48
Para: [EMAIL PROTECTED]
Asunto: RE: integrating cocoon with websphere developer studio, is
possible?


We run WAS 4 and develop in WSAD 4 and Cocoon runs fine on both (was
even able to get it running on WAS 3.5.4).  We were able to get it up
and running simply by installing the WAR file as described on the
Cocoon website (WAS 4 installation is at the very end of the
installation instructions).

As to your second question, yes...we originally had an account status
app running on WAS and we added Cocoon to the server and access it just
fine from the account status app.  We use it to generate PDF versions
of Bills of Lading on the fly.

Bob Hitchins
Senior IT Business Analyst
Cargill Crop Nutrition


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 6:55 AM
To: [EMAIL PROTECTED]
Subject: integrating cocoon with websphere developer studio, is
possible?


Hi, all.

My company is using Websphere Developer Studio 4.0.3 (WASD4.0.3) for
project
development and WAS as the container.
Since I'm more and more inlvolved in projects, and I've been using
Cocoon
for almost a couple years now, I finally had the chance to use it in a
real
project for my companyyes! :-)

The thing is I should need to make it work within the WASD testing
framework
and I'm not sure if importing the WAR would be enough since I have
tried and
I couldn't make it work out of the box.
So before starting to investigate, I thought I could ask around here
just in
case someone is already working this way. Any help would be very much
appreciated.

On a side note, I would also like to know if anybody could make Cocoon
work
from another WAS application. I have an application running for a
corporate
website and I have made a news system completely in Cocoon, and before
making everything in Cocoon, during a transition time, I would like to
be
able to keep the java application running and dispatching to the Cocoon
servlet the requests to the news system. Anybody cross contexting or
something like that?

Thanks for reading.

ps: I'm talking about Cocoon 2.0.4 here, we would switch to 2.1 when
switching to WAS5.



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



Re: XUpdate

2003-03-12 Thread Josema Alonso
The oid is the unique identifier asigned to the document when you inserted
in in the DB.
I guess you have to make a search before updating it and get the oid. Then
you could use it in your XUpdate query.

Of course, you can also use the transformer for the former query.

Best.

ps: I only used the XMLDBTransformer with Xindice and haven't tried with 1.1
yet. If you're using that one, maybe you error could be due to another
cause.


- Original Message -
From: Irv Salisbury III [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 8:52 PM
Subject: Re: XUpdate


 When running this, I get Failed to update resource xmldb-object-id: 1
  The sitemap log file says it cannot compile the query.  What is the oid
 supposed to be?  I don't have anything that seems to match up, or does
 that even matter?

 Irv

 Josema Alonso wrote:

 Irv,
 I remember I built the javadoc that came with the transformer and it was
 pretty easy to use starting there. I suggest you do the same.
 Anyway if you want a snippet I can give you this.
 
 The transformer is declared in the sitemap this way:
map:transformer name=xmldb
 src=org.apache.cocoon.transformation.XMLDBTransformer
 driverorg.apache.xindice.client.xmldb.DatabaseImpl/driver
 basexmldb:xindice:///db/base
/map:transformer
 
 Then is used on a pipeline like any other transformer. The syntax it uses
 for XUpdate queries for example is:
 xindice:query type=update oid=xmldb-object-id
   xu:modifications version=1.0
xmlns:xu=http://www.xmldb.org/xupdate;
 xu:remove select=/person/[EMAIL PROTECTED] = 'home']/
 xu:update select=/person/[EMAIL PROTECTED] = 'work']
   480-300-3003
 /xu:update
 /xu:modifications
 /xindice:query
 
 As I said is pretty straightforward.
 
 Hope it helps.
 
 - Original Message -
 From: Irving Salisbury
 To: [EMAIL PROTECTED]
 Sent: Sunday, March 09, 2003 5:38 AM
 Subject: Re: XUpdate
 
 
 This is great news.  I don't suppose there are any preliminary docs on
this
 as far as what type of XML it is looking for, etc?  I can go rooting
around
 in the source, but any docs or even any examples that make use of it
would
 be a huge help.
 
 Thanks,
 
 Irv
 
 Josema Alonso wrote:
 
 Hey, Irv
 
 There's a XMLDBTransformer available. It was in Scratchpad but it was
moved
 to a new xmldb block in the CVS repository.
 Please, checkout a fresh 2.1 from CVS and you'll foun it there or at its
 block: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/blocks/xmldb/
 
 I have used it succesfully quite a while ago.
 
 Best,
 Josema.
 
 - Original Message -
 From: Irving Salisbury [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, March 08, 2003 7:54 PM
 Subject: XUpdate
 
 
 
 I am interested in using xupdate commands to xindice from within Cocoon.
  First, is there something like an XUpdateTransformer that would allow
 me to do this within a pipeline?  If not, are there any actions, etc
 that help out?  If anyone has any links that would be helpful, that
 would be great.
 
 Thanks,
 
 Irv
 
 
 -
 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]



Re: XUpdate

2003-03-09 Thread Josema Alonso
Irv,
I remember I built the javadoc that came with the transformer and it was
pretty easy to use starting there. I suggest you do the same.
Anyway if you want a snippet I can give you this.

The transformer is declared in the sitemap this way:
   map:transformer name=xmldb
src=org.apache.cocoon.transformation.XMLDBTransformer
driverorg.apache.xindice.client.xmldb.DatabaseImpl/driver
basexmldb:xindice:///db/base
   /map:transformer

Then is used on a pipeline like any other transformer. The syntax it uses
for XUpdate queries for example is:
xindice:query type=update oid=xmldb-object-id
  xu:modifications version=1.0 xmlns:xu=http://www.xmldb.org/xupdate;
xu:remove select=/person/[EMAIL PROTECTED] = 'home']/
xu:update select=/person/[EMAIL PROTECTED] = 'work']
  480-300-3003
/xu:update
/xu:modifications
/xindice:query

As I said is pretty straightforward.

Hope it helps.

- Original Message -
From: Irving Salisbury
To: [EMAIL PROTECTED]
Sent: Sunday, March 09, 2003 5:38 AM
Subject: Re: XUpdate


This is great news.  I don't suppose there are any preliminary docs on this
as far as what type of XML it is looking for, etc?  I can go rooting around
in the source, but any docs or even any examples that make use of it would
be a huge help.

Thanks,

Irv

Josema Alonso wrote:

Hey, Irv

There's a XMLDBTransformer available. It was in Scratchpad but it was moved
to a new xmldb block in the CVS repository.
Please, checkout a fresh 2.1 from CVS and you'll foun it there or at its
block: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/blocks/xmldb/

I have used it succesfully quite a while ago.

Best,
Josema.

- Original Message -
From: Irving Salisbury [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 7:54 PM
Subject: XUpdate



I am interested in using xupdate commands to xindice from within Cocoon.
 First, is there something like an XUpdateTransformer that would allow
me to do this within a pipeline?  If not, are there any actions, etc
that help out?  If anyone has any links that would be helpful, that
would be great.

Thanks,

Irv


-
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: XUpdate

2003-03-08 Thread Josema Alonso
Hey, Irv

There's a XMLDBTransformer available. It was in Scratchpad but it was moved
to a new xmldb block in the CVS repository.
Please, checkout a fresh 2.1 from CVS and you'll foun it there or at its
block: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/blocks/xmldb/

I have used it succesfully quite a while ago.

Best,
Josema.

- Original Message -
From: Irving Salisbury [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 7:54 PM
Subject: XUpdate


 I am interested in using xupdate commands to xindice from within Cocoon.
  First, is there something like an XUpdateTransformer that would allow
 me to do this within a pipeline?  If not, are there any actions, etc
 that help out?  If anyone has any links that would be helpful, that
 would be great.

 Thanks,

 Irv


 -
 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: Cocoon 2.1 and W3C XForms

2003-03-07 Thread Josema Alonso
I don't know if you're aware of XMLForms:
http://xml.apache.org/cocoon/userdocs/concepts/xmlform.html

Best,
Josema

- Original Message -
From: Andrew Watt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 07, 2003 8:56 PM
Subject: Cocoon 2.1 and W3C XForms


 I am interested to establish what the future plans are about incorporating
 (or not) the W3C XForms technology (currently at Candidate Recommendation
 status - http://www.w3.org/TR/2002/CR-xforms-20021112/) either in Cocoon
 2.1 or a later version of Cocoon.

 Many thanks.

 Andrew Watt



 -
 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: XmlForm Validation Problem: Where Am I Going Wrong?

2003-03-07 Thread Josema Alonso
Hello,

I couldn't solve your problem but maybe I can give you more ideas...
In you rule:
rule context=/repeatedPassword
  report test=(string-length(/password) gt; 0) and (string-length(.) =
0)
Please confirm your password.
  /report
/rule

I would say you are setting the context to /repeatedPassword, so
/password won't work. I think you should use ../password in there. I
coudn't make this work either...ummm...but if I put any text in the
/repeatedPassword field, form does not pass validation and it does if I
leave it blank...weird...

Anyway, if you got it working you should consider writing a more consistent
rule for password confirming. Something like:
rule context=/repeatedPassword
  assert test=string(.) = string(../password)
Please confirm your password.
  /assert
/rule

I can think of another way of making this, through some java code in the
perform() method (making validation programatically), but I hope it won't be
necessary cause I believe there must be a Schematron way of doing this. Hope
someone could help you (us) more :-)

Best,
Josema



- Original Message -
From: Richard In Public [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 07, 2003 1:48 AM
Subject: XmlForm Validation Problem: Where Am I Going Wrong?


 Hi

 I think I'm pretty close to having things up and running with XMLForms.
I'm
 having some problems with the validation though.  I'm trying to achieve
 conditional validation:  I have two password fields and the second should
 only be effected if a password has been entered in the first.  I don't
want
 to do this in the '/' content as I want any violations to be associated
with
 the second field.  I've tried everything that I can think of.  Here is one
 of the attempts. Everything works except the validation of the second
 password field.  No violations are reported when I fill in only the first
 field.  Where am I going wrong?

 My my dead lines are turning pale blue and gasping for breath.  Please
 please help me!

 Richard

  Validation Schema(tron) -
 ?xml version=1.0 ?
 schema ns=http://xml.apache.cocoon/xmlform;
 xmlns=http://www.ascc.net/xml/schematron;
 titleAccount Registration Schema/title
 phase id=registration
 pFor user identity information./p
 active pattern=reg/
 /phase
 pattern name=User Info Validation Pattern id=reg
 rule context=/emailAddress
 assert test=contains( string(.),'@')
 Email format is invalid.
 /assert
 /rule
 rule context=/password
 assert test=string-length(.) gt; 7
 Password should be at least 8 characters.
 /assert
 assert test=string-length(.) lt; 20
 Password should be less than 20 characters.
 /assert
 /rule
 rule context=/repeatedPassword
 report test=(string-length(/password) gt; 0) and (string-length(.) =
0)
 Please confirm your password.
 /report
 /rule
 /pattern
 /schema
 
 XMLForm 
 ?xml version=1.0 ?
 xf:form xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;
 id=form-feedback view=registration action=new-account.xml
 xmlns:site=http://designedandmanaged.net/cocoon/site/1.0;
 error
 xf:violations class=error/
 /error
 xf:textbox ref=/emailAddress
 xf:captionEmail Address/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:password ref=/password
 xf:captionPassword/xf:caption
 xf:violations class=error /
 /xf:password
 xf:password ref=/repeatedPassword
 xf:captionPassword (Confirm)/xf:caption
 xf:violations class=error /
 /xf:password
 xf:textbox ref=/firstName
 xf:captionFirst Name/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/lastName
 xf:captionLast Name/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/phoneNumber
 xf:captionPhone Number/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/address1
 xf:captionLine 1/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/address2
 xf:captionLine 2/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/address3
 xf:captionLine 3/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/city
 xf:captionCity/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/postCode
 xf:captionPost Code/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:textbox ref=/countryID
 xf:captionCountry/xf:caption
 xf:violations class=error /
 /xf:textbox
 xf:submit id=next class=button
 xf:captionCreate My Account/xf:caption
 xf:hintGo to next page/xf:hint
 /xf:submit
 /xf:form


 -
 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: cinclude transformer VERY slow

2003-02-26 Thread Josema Alonso
Dear Martin,

You were absolutely right. The DTDs were not being resolved locally. Once I
updated the catalog adding the Docbook stuff, everything went back to
normal.

Sometimes I still feel Cocoon is too big... there are some components I
haven't used yet... and I've been using Cocoon for almost a couple years
now...

Thank you very much for your help :-)


- Original Message -
From: Martin Holz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:16 AM
Subject: Re: cinclude transformer VERY slow


 How long does the FileGenerator need for each of the  documents?
 I guess the cinclude generator needs slightly longer than the sum
 of the FileGenerators execution times. A xml parser will read
 all of the DTD, even if it is not validating. Are you sure, you are
 reading a local copy of the DTD?
 Have a look at org.apache.cocoon.components.resolver.ResolverImpl.
 Did you add the Docbook to the catalog? Proper entity resolving can really
 boost cocoon performance.
 How large is the Docbook-DTD? Maybe a caching EntityResolver helps.

 Martin




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



Re: cinclude transformer VERY slow

2003-02-25 Thread Josema Alonso
Hello, again.

Replying to myself but still haven't found a good explanation...

The *.news.xml docs I mentioned in my previous message are Docbook articles.
All of them have the doctype declaration for the Docbook article DTD:
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.2//EN
http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd;

I removed the declaration and everything went fine.

I thought that maybe it was trying to validate the articles and retrieving
the DTD remotely, but I switched to a local copy of the DTD and the problem
is still the same.

By now, I have removed the doctype declarations, but this is just a quick
workaround. I do not know what's going on...still investigating...

Any help is appreciated.


- Original Message -
From: Josema Alonso [EMAIL PROTECTED]
To: Cocoon-Users [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 1:43 AM
Subject: cinclude transformer VERY slow


 Dear all,

 I'm playing around with the CInclude transformer and the Directory
generator
 for aggregation in latest 2.1(within the included Jetty engine). I've
chosen
 this way and not the Aggregate one cause I want the included files to be
 dynamically select.

 Anyway, each time I request the URL, the pipeline gets executed correctly
 but it takes ages to render the result. I only have three very very small
 files (700 bytes) in the directory. When I run my pipleine I first get the
 list of files using the Directory Generator, then make an XSL
trasnformation
 so I get something like this:

 ?xml version=1.0 encoding=UTF-8 ?
   page xmlns:cinclude=http://apache.org/cocoon/include/1.0;
 cinclude:include src=n_2003_02_24.news.xml element=included /
 cinclude:include src=n_2003_02_23_1.news.xml element=included /
 cinclude:include src=n_2003_02_23_0.news.xml element=included /
   /page

 Next step in my pipeline is to apply the CInclude transformer. As I said,
it
 renders but it takes some 1m30s. Of course, this is not acceptable.

 I tried switching to the CachingCIncludeTransformer and also to the
 XIncludeTransformer but unfortunately I had the same results.

 Does anybody had this problem?

 Thanks for reading.




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



cinclude transformer VERY slow

2003-02-24 Thread Josema Alonso
Dear all,

I'm playing around with the CInclude transformer and the Directory generator
for aggregation in latest 2.1(within the included Jetty engine). I've chosen
this way and not the Aggregate one cause I want the included files to be
dynamically select.

Anyway, each time I request the URL, the pipeline gets executed correctly
but it takes ages to render the result. I only have three very very small
files (700 bytes) in the directory. When I run my pipleine I first get the
list of files using the Directory Generator, then make an XSL trasnformation
so I get something like this:

?xml version=1.0 encoding=UTF-8 ?
  page xmlns:cinclude=http://apache.org/cocoon/include/1.0;
cinclude:include src=n_2003_02_24.news.xml element=included /
cinclude:include src=n_2003_02_23_1.news.xml element=included /
cinclude:include src=n_2003_02_23_0.news.xml element=included /
  /page

Next step in my pipeline is to apply the CInclude transformer. As I said, it
renders but it takes some 1m30s. Of course, this is not acceptable.

I tried switching to the CachingCIncludeTransformer and also to the
XIncludeTransformer but unfortunately I had the same results.

Does anybody had this problem?

Thanks for reading.




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



Re: extending XMLForms for different kinds of models...opinions?

2003-02-17 Thread Josema Alonso
Hello, Chris.

 I wonder if it would be easier and cleaner to have different actions
 depending on the model (e.g. bean / dom) like you demonstrate on the
 wiki page or at least two different parameters for specifying the
 model. Automagic is fine but hiding the information whether it is a
 class to instantiate or a source to read seems to be wrong IMO.

Well, I'd go further, I just don't like automagic. In fact, I had a working
form where you should not write any Java code but the perform() method.
Connection to the Xindice DB was done by the XMLDBTransformer. I was
thinking about extending it more to some mechanism that would create the
Action, too so you won't need to write the Java code, but I gave up cause I
didn't like it. You end up coding complex logic in XML (XSP and such), and I
don't want XML for that. I like Java for that.

But why do you think the proposed way is hiding the model?
The model parameter is clearly coded in the sitemap, so the contract between
model and form is declared clearly there.
If you mean the SourceResolver would hide where the model really is, well,
we just take advantage of the Cocoon protocols for locating the model, and I
think that's good and very flexible. You can use this mechanism to do bad
things...maybe, but just don't do it  ;-)

If you like more than one parameter for the model can you tell us what for?
Would you like to have more than one model per form or just different
representations of the same model, i.e., javabean and xml file?
I'm curious cause someone already mentioned this feature previously about
the W3C forms.
Anyway, this point could be a step beyond the change I proposed.

I like the discussion going on in this thread, you are all sending in nice
ideas and I'm learning a lot.

Best.


ps: OT: I'm not getting some of the messages from the list while I get some
of them twice or more, anybody else?



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: extending XMLForms for different kinds of models...opinions?

2003-02-17 Thread Josema Alonso
 Tastes differ and both have their use. I'd like to second Sylvain on this.

Regarding Sylvain's opinion, please forgive me on this cause it seems I lost
the thread somewhere, but I guess you're talking about this:

snip
 Sylvain Wallez wrote:

  This is a good idea when you need to use the JavaBean for some
  business logic. But there are many cases where you just want to
  populate a database after successful validation, and the average
  Cocoon user quickly becomes reluctant to writing Java code, even for
  storing data in a database ;-)
 
  Sylvain
/snip

I'm with Ivelin that the 'average' Cocoon user knows how to write that piece
of code efficently.
Anyway, as you say, maybe this is a matter of taste.
When I tried not to use Java, the hard part was not the CRUD one but the
validation against the DB. Mixing both was a nightmare when not using Java.
When using Java code and the helper class I only had to write very few lines
and everything was working.

 How would that work? You either filter the java: pseudo protocol from
 the parameter or extend the source resolver. If the latter, in what
 other context would that make sense? If the former, why lure the user
 into the belief that java: is a valid pseudo protocol that could be
 used anywhere?

It's the first case the one I'm considering.
I don't think the user would think it could be used anywhere if it's well
documented. If you think so, we could go for another type of prefix.
I was not thinking on a pseudo protocol and don't think about extending the
SourceResolver either.
Do you feel this would be clearer if using two different parameters? One for
the java model and the other for the SourceResolver models?
I do not think those are necessary, that's why we thought about a prefix.

 Additionally, the behaviour differs: In case of a class, it is loaded,
 instantiated, initialized c. In case of a DOM, it is retrieved. Does it
 make sense to attach a listener to each model? (Should the class
 instance be automatically registered as listener if it implements the
 right interface?)

Good point. I'm not sure about what to think about it yet. Do you have a use
for the Listener already?

 These are just thoughts without further reflection. They create the BT
 (thanks Steven for this new acronym for belly thought ;-) that in the
 heart of things a DOM model and a java model differ too much.

Yes, they differ. But remember we're just trying to support both easily.
Current implementation of xmlforms only allows java models, we propose
adding a new kind of models, the pure XML models, that could be solved by
the SourceResolver. That was the original idea.

I finally got to get the thread in the dev list and see your Input Modules
approach. It happens to me the same that happens to Sylvain. It seems cool
but too complicated for me right now. I have to learn more about Input
Modules and I really hope better documentation about them would exist...

Again this seems to try avoiding unnecessary steps, and I think we all would
like that. Note that I think we could make some kind of auto-modeling sooner
or later but I think validation for that auto-models will be harder to
accomplish.

  ps: OT: I'm not getting some of the messages from the list while I get
some
  of them twice or more, anybody else?
 Nope. Only when CC'ed additionally. Mind you that ivelin CC'ed
 cocoon-users and cocoon-dev.

Thanks. Maybe that's the case. I should be subscribing to the dev list the
sooner the better...




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: extending XMLForms for different kinds of models...opinions?

2003-02-15 Thread Josema Alonso
Jeremy,

I posted here cause I wanted to know if the users would like that feature to
be added. I thought the dev list would be more suitable in case of
discussing the way of implementing it.

Since I'm not currently subscribed to the dev list, feel free to cc the
message there if you want to.

Btw, glad you like it.

Thanks.


- Original Message -
From: Jeremy Quinn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 15, 2003 11:24 AM
Subject: Re: extending XMLForms for different kinds of models...opinions?



 On Friday, February 14, 2003, at 01:07 PM, Josema Alonso wrote:

  Dear all,
 
  I need your suggestions and opinions in extending the current XMLForm
  model
  approach. If you use XMLForm or are thinking about using it soon, I'd
  suggest youy to read this message and send some feedback to the list.
 

 snip/

 Would it not be best to discuss this on Cocoon-Dev?

 Very nice idea, BTW!

 regards Jeremy


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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








-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: extending XMLForms for different kinds of models...opinions?

2003-02-15 Thread Josema Alonso
Ivelin,

That sounds very very good. I was not sure about all the possibilities when
using the SourceResolver. If all of that can be accomplished using the
SourceResolver, it's more powerful than I expected and we should take the
java: as the only way for Javabeans.



But...



Since I started with Cocoon, one of the features I don't like is this kind
of abruptly changes. If we go for the prefix way, forms currently working
should be coded again (at least their sitemap snippets).



I think the best solution would be:

- Go with the java: prefix for beans

- Any other prefix - solved by the SourceResolver

- Implicitly assume java, so no prefix means model bean (only by now)

At a later stage (maybe for 2.1beta), we could change it so the java models
should be called only explicitly and all of the other resources would be
solved by the SourceResolver.



This way, the transition would be easier to accomplish for users with
working xmlforms.

 Ivelin, I think we talked about something like this?



Hope all of you like this approach. I'd like to go ahead and try to patch
the AbstractXMLFormAction.




Best.




- Original Message -
From: ivelin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, February 15, 2003 5:53 PM
Subject: Re: extending XMLForms for different kinds of models...opinions?



 This sounds good.
 As you suggest the java: prefix can be used for instantiating JavaBeans.
 For all other cases though, I was hoping to reuse the standard
 SourceResolver.
 This will immediately allow support for a lot of different sources.
 Here is a snippet from the Sitemap document.
 http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
 (I wish there was one discussing just SourceResolvers.)

 a.. Use http://foo/bar to merge in xml content via http protocol, received
 from machine foo.
 a.. Use context://servlet-context-path/foo/bar to merge in xml content
from
 the servlet context.
 a.. Use cocoon:/current-sitmap-pipeline/foo/bar to merge in xml content
from
 the current sitemap. The appropriate pipeline is selected matching
 current-sitemap-pipeline.
 a.. Use cocoon://root-sitmap-pipeline/foo/bar to merge in xml content from
 the root sitemap. The appropriate pipeline is selected matching
 root-sitemap-pipeline.
 a.. Use resource://class-path-context/foo/bar to merge in xml content from
 the classpath.
 a.. Use jar:http://www.foo.com/bar/jar.jar!/foo/bar to merge in xml
content
 coming from a jar via http connection.
 a.. Use file:///foo/bar to merge in xml content from the filesystem.
 a.. Use xmldb:your driver here://your.xmldb.host/db/foo/bar to merge in
 xml content from a XML:DB compliant database.
 a.. Depending on your setup you may use nfs:, jndi: protocols, too.




 -=Ivelin=-

 - Original Message -
 From: Josema Alonso [EMAIL PROTECTED]
 To: Cocoon-Users [EMAIL PROTECTED]
 Sent: Friday, February 14, 2003 7:07 AM
 Subject: extending XMLForms for different kinds of models...opinions?


  Dear all,
 
  I need your suggestions and opinions in extending the current XMLForm
 model
  approach. If you use XMLForm or are thinking about using it soon, I'd
  suggest youy to read this message and send some feedback to the list.
 
  Some days ago, and with some ideas I exchanged with Ivelin, I made a
 how-to
  that should help users on using XMLForm with Xindice for storing XML
 models.
  It is at Wiki (http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice)
and
  made its way into the CVS a few days ago.
 
  In this how-to I explored new ways of storing the form model. This new
way
  the XML model is stored in a file in the system with an empty structure.
  Then it is loaded into a JXPath Container and manipulated from there.
The
  getFormModel() is overriden so you don't need a Bean, but just the file.
 
  Ivelin thought this could be a great addition to the framework, so we
were
  discussing how to make this available for the end user.
 
  We exchanged some ideas and they led us to incorporating some mechanism
to
  the sitemap. We were thinking about a prefix. This way, passing the
model
  parameter to the form would be like this:
  map:parameter name=xmlform-model value=java:MyBean/
 
  The 'java:' prefix would be used for java models. If you would like to
use
  the pure XML model approach you could do something like:
  map:parameter name=xmlform-model value=xml:MyDocument/
 
  Of course, one of the approaches could be made the default one so this
 could
  make life easier for most used models declaring them implicit:
  map:parameter name=xmlform-model value=MyModel/
 
  I hope I explained it clearly. Now I need your feedback. I'd like to
know
 if
  this make sense to you and if so, we should decide which of the two
  approaches should be the implicit one, so the AbstractXMLFormAction
would
 be
  modified accordingly.
  Maybe some of you would prefer to see it implemented but having the java
  models as the implicit ones, so you won't need

extending XMLForms for different kinds of models...opinions?

2003-02-14 Thread Josema Alonso
Dear all,

I need your suggestions and opinions in extending the current XMLForm model
approach. If you use XMLForm or are thinking about using it soon, I'd
suggest youy to read this message and send some feedback to the list.

Some days ago, and with some ideas I exchanged with Ivelin, I made a how-to
that should help users on using XMLForm with Xindice for storing XML models.
It is at Wiki (http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice) and
made its way into the CVS a few days ago.

In this how-to I explored new ways of storing the form model. This new way
the XML model is stored in a file in the system with an empty structure.
Then it is loaded into a JXPath Container and manipulated from there. The
getFormModel() is overriden so you don't need a Bean, but just the file.

Ivelin thought this could be a great addition to the framework, so we were
discussing how to make this available for the end user.

We exchanged some ideas and they led us to incorporating some mechanism to
the sitemap. We were thinking about a prefix. This way, passing the model
parameter to the form would be like this:
map:parameter name=xmlform-model value=java:MyBean/

The 'java:' prefix would be used for java models. If you would like to use
the pure XML model approach you could do something like:
map:parameter name=xmlform-model value=xml:MyDocument/

Of course, one of the approaches could be made the default one so this could
make life easier for most used models declaring them implicit:
map:parameter name=xmlform-model value=MyModel/

I hope I explained it clearly. Now I need your feedback. I'd like to know if
this make sense to you and if so, we should decide which of the two
approaches should be the implicit one, so the AbstractXMLFormAction would be
modified accordingly.
Maybe some of you would prefer to see it implemented but having the java
models as the implicit ones, so you won't need to change your working
xmlforms in order to use it in the future 2.1. If you feel that way, please
say so.

Best,
Josema.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: extending XMLForms for different kinds of models...opinions?

2003-02-14 Thread Josema Alonso
Hello, Sylvain.

The old forms would work as they already do, but it would be a better
approach when the model is a pure XML model. You won't need to convert XML
elements and attributes to Java properties and back. You won't need to store
your XML model in a DOM property in the bean. In fact, you won't need a
model bean, just a model document. This document would be usually a file but
this would be solved by the SourceResolver so it can be any URI.

If you need more info, please let me know what you want to know about it
specifically. You can also see the full code approach at the wiki page I
mentioned.

Best,
Josema.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 4:25 PM
Subject: RE: extending XMLForms for different kinds of models...opinions?


 Hi Josema,

 Could you describe the advantages and the possible application of this new
feature.

 Regards
 Sylvain






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Jumping within sitemap?

2003-02-12 Thread Josema Alonso
Sure. You just need to use the cocoon:/ protocol.
See info about Protocols at:
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html

Best.


-Mensaje original-
De: Sonny Sukumar [mailto:[EMAIL PROTECTED]]
Enviado el: miercoles, 12 de febrero de 2003 8:59
Para: [EMAIL PROTECTED]
Asunto: Jumping within sitemap?



Hi guys,

I'm wondering if it's possible to jump from one place
in the sitemap to another.  I made up the following
code, but it's basically what I'm aiming to do:

map:match pattern=checkout
  map:act type=is-logged-in/
!-- Customer is logged in, so proceed to first 
 checkout step --
map:jump jumpto=customer-info-entry/
  /map:act

  !-- Customer isn't logged in, so jump to login
page. --
  map:jump jumpto=customer-login/
/map:match

map:match pattern=customer-info-entry
  map:generate src=customerInfoEntry.xsp/
  map:transform src=someTransform.xsl/
  map:serialize type=html/
/map:match

map:match pattern=customer-login
  map:read src=customerLogin.html/
/map:match

It's like calling a function/method in a programming
language, and it thus supports reuse of factored out
code.

Does it make sense?

Please let me know how we can do it! :-)

Thanks,

Sonny

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice howto at Wiki refactored and ready

2003-02-01 Thread Josema Alonso
 Please modify it to /Artist/@id, do not leave it as //
That's what I meant. Sorry if I didn't write it clearly.

Best.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice howto at Wiki refactored and ready

2003-01-31 Thread Josema Alonso
Hello again, Ivelin.

 The new revision is excelent.
Thank you very much.

 Please follow the instructions to submit an official HOWTO
 http://xml.apache.org/cocoon/howto/howto-author-howto.html

 Diana will take it from there.
I'll do once solved the doubts below. Thanks.

 In the fragment below, why use //. Is it a typo?
 /info and /@id are probably more appropriate.
 The ref in the textbox case should always resolve to a single node. //
may
 return a nodeset.

  xf:textbox ref=//@id
   xf:captionArtist identifier:/xf:caption
 /xf:textbox
 xf:textbox ref=//Name
I see, but let me explain it.
I should not use //, that's ok, but I think /@id for example is not
enough.
If I'm right, using / gives the Document Root but not the Root Element and
I can't access from there the id attribute. Also, making it that way I get
the exception at the end of this message, which seems to confirm my theory.

So, what I think it could be a good solution is to use '/Artist/@id' and
'Artist/Name'. What do you think? Am I wrong?

 same applies for

 String artistName = (String)getForm().getValue(//@id);
 ...
 v.setPath(//@id);
Same observations as above can be applied here.

 Do you even need // for
 Node result = xi.find(xindiceSubCol, //Artist[@id='+ artistName +'],
 Artist);
Nope, don't need it here. I'm changing this asap.

 this looks like stale code

   //v.setPath(/artistName);
It is. Thank you.

 You can remove the reset() method.
 Checkboxes are automatically handled for session scope beans.
I see. Thank you.

 My experience shows that when representing plain value objects, session
 beans are never a memory concern
 with the modern app servers.
 I would prefer them almost always over request scope.
 Much easier to code, which results in less code and less maintanance.
I'm with you on this. I'm using session beans in my web apps. I always try
not to heavy load the session but some data in there doesn't hurt at all and
makes life much easier.

 On a different note, I thinkg that your code can be used in the
 AbstractXMLFormAction.

 For example when the map parameter is prefixed with java:, like in
 java:org.my.TestBean,
 then the existing JavaBean instantiation logic can be used.
 In all other cases, the model can be resolved via the SourceResolver.
 This will allow benefiting from the InputModules to access xml files from
 different sources: file system, xindice, remote URL, etc.
  map:parameter name=xmlform-model value=artist/artist-model.xml/

 If you think this makes sense, please consider submitting a patch to that
 effect.
I like very much this approach. Unfortunately I do not think I'm expert
enough to accomplish this yet and I do not want to touch things that are
working. I'm afraid I could make some mistakes.
I also should learn more about Input Modules, I still haven't used them at
all.
Anyway, if nobody's doing it, I should try it sooner or later...it would be
a good addition.

 Congratulations for the great job once again.
Thank you very much again, too :-)

--
ERROR TRACE WHEN USING '/@id':
type fatal

message Cannot setValue of an object that is not some other object's
property/child

description java.lang.UnsupportedOperationException: Cannot setValue of an
object that is not some other object's property/child

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/xmtrader/xmldb/xforms/Artist.xform

path-info

xmtrader/xmldb/xforms/Artist.xform

stack-trace

java.lang.UnsupportedOperationException: Cannot setValue of an object that
is not some other object's property/child
at
org.apache.commons.jxpath.ri.model.beans.NullPointer.setValue(NullPointer.ja
va:110)
at org.apache.cocoon.components.xmlform.Form.setValue(Form.java:273)
at org.apache.cocoon.components.xmlform.Form.populate(Form.java:436)
at
org.apache.cocoon.acting.AbstractXMLFormAction.act(AbstractXMLFormAction.jav
a:287)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
eNode.java:139)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:143)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
at

Re: XMLForm Xindice howto at Wiki refactored and ready

2003-01-31 Thread Josema Alonso
 I think you are correct.
 The point is to identify the exact xpath to the @id attribute.
Ok, so I let it that way then.

 If you get it started, I can review the changes and we should be able to
 wrap it up in a few iterations.
Well, first I'll see what to do regarding the howto. I mean, I'll read the
howto submit a howto and all and get it touch with Dianna and make it
available in the docs...
After that I'll try to learn something about Input Modules. And then maybe
I'll take the challenge and try to make it. I'll drop you a line then.

Best.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm problem: PLEASE HELP (att. XMLForm architects and specialists)

2003-01-29 Thread Josema Alonso
Hello Sylvain,

I see you have still some problems with the XMLForms...

I have investigated them more and more and wrote a new howto at Wiki about
using XMLForm with Xindice. I do not remember if you were using a relational
database or a native XML one. If the latter, you could find some new ideas
in there.

Anyway, I could try and test your code if you send me your form page,
action, pipeline and everything you think I should need. We have to make it
work! :-)

Best.

pd: are you using the same XSLTs provided with the howto sample or have you
created new ones?


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 29, 2003 5:02 PM
Subject: XMLForm problem: PLEASE HELP (att. XMLForm architects and
specialists)


 Hello,

 Is there someone in the list that could help me to find a XMLForm problem
that I have for few weeks!
 I have read all the XMLForm doc and source code but I really don't
understand what is this problem.
 I don't have enough experience to find the solution.
 My project is totally based on Cocoon and XMLForm and I can't move forward
for days in it.

 The problem happens when I try to display a Node or a List with a repeat
tag.
 The first time I load the view, the page is empty (but the List or Node
contains data).
 If now I refresh my browser, the page is full and all is OK!


 Here is part of the xmlform.log (cleaned):

 DEBUG   Thread-5/AbstractSAXTransformer: BEGIN setup
resolver=org.apache.cocoon.environment.http.HttpEnvironment@2f4309,
objectModel={httpresponse=org.apache.coyote.tomcat4.CoyoteResponseFacade@5a2
dc4, response=org.apache.cocoon.environment.http.HttpResponse@72c47b,
context=org.apache.cocoon.environment.http.HttpContext@d4f27,
source-resolver=org.apache.cocoon.environment.http.HttpEnvironment@2f4309,
request=org.apache.cocoon.environment.http.HttpRequest@4187c8,
httprequest=org.apache.coyote.tomcat4.CoyoteRequestFacade@395f72,
httpservletcontext=org.apache.catalina.core.ApplicationContextFacade@22c9df}
, src=null,
parameters=org.apache.avalon.framework.parameters.Parameters@73552f
 DEBUG   Thread-5/AbstractSAXTransformer: END setup
 DEBUG   Thread-5/AbstractSAXTransformer: BEGIN setupTransforming
 DEBUG   Thread-5/AbstractSAXTransformer: END setupTransforming
 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=form, raw=xf:form,
attr=org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy@3104d7)
 DEBUG   Thread-5/XMLFormTransformer: END startTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=caption, raw=xf:caption,
attr=org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy@3104d7)
 DEBUG   Thread-5/XMLFormTransformer: END startTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN endTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=caption, raw=xf:caption)
 DEBUG   Thread-5/XMLFormTransformer: END endTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=repeat, raw=xf:repeat,
attr=org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy@3104d7)
 DEBUG   Thread-5/AbstractSAXTransformer: BEGIN startRecording
 DEBUG   Thread-5/AbstractSAXTransformer: END startRecording
 DEBUG   Thread-5/XMLFormTransformer: END startTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=output, raw=xf:output,
attr=org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy@3104d7)
 DEBUG   Thread-5/XMLFormTransformer: END startTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=caption, raw=xf:caption,
attr=org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy@3104d7)
 DEBUG   Thread-5/XMLFormTransformer: END startTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN endTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=caption, raw=xf:caption)
 DEBUG   Thread-5/XMLFormTransformer: END endTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN endTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=output, raw=xf:output)
 DEBUG   Thread-5/XMLFormTransformer: END endTransformingElement
 DEBUG   Thread-5/XMLFormTransformer: BEGIN endTransformingElement
uri=http://xml.apache.org/cocoon/xmlform/2002, name=repeat, raw=xf:repeat)
 DEBUG   Thread-5/AbstractSAXTransformer: BEGIN endRecording
 DEBUG   Thread-5/AbstractSAXTransformer: END endRecording fragment=?xml
version=1.0 encoding=ISO-8859-1?
 xf:output xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;
ref=salut
 xf:captionWorkstation: /xf:caption
   /xf:output

 DEBUG   Thread-5/XMLFormTransformer: BEGIN startTransformingElement

XMLForm Xindice howto at Wiki refactored and ready

2003-01-28 Thread Josema Alonso
Ivelin and all,

I finally had the time to refactor the example. Following the ideas we
exchanged these past days, I put it altogether at Wiki and I think we have
now a much better sample :-)
http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice

Please, review it if you want to and inform me of any faults you can find so
i could fix them. I hope i wrote a clear explanation.

If you feel this can be a good addittion to the official how-tos feel free
of adding it yourself of let me know who I should contact (Diana, maybe?) or
where I should start. I still have not contributed anything to the official
docs and I'm somewhat lost...

Thanks.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-27 Thread Josema Alonso
Hello again,

Ivelin, I have coded the changes and finally got it working.
The part I don't like too much is where I need to get the model in order to
add the document to the DB. Until that part everything seems to fit quite
nicely.
Remember I got the model stored in a XMLDocumentContainer and now I need the
whole model in a DOM Node or XML String in order to add it to Xindice.

This is what I did:
/**
* Add the document to the database
*/
public void addDocument() throws Exception {
  try {
//add the document to the database
XindiceManager xi = new XindiceManager();
//needs the DocumentRoot of the container
xi.add(xindiceSubCol,
((Document)(((XMLDocumentContainer)(getForm().getModel())).getValue())).getD
ocumentElement(), null);
  }
  catch (Exception e) {
getLogger().error(DOM Document could not be created, e);
throw e;
  }
}

Yeah, what a casting experience! ;-)
Maybe I'm missing somehting and there's an easier way in order to get what I
need...

I prefer to send thi to the list for review by you or anybody else and then
I'll update the Wiki howto. Once reviewed and finished maybe this will be a
candidate for the official how-to docs, what do you think?

Thanks for your help, I'm learning a lot.



- Original Message -
From: Ivelin Ivanov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 26, 2003 3:24 AM
Subject: Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]


 
   3) Override the getForm() method in the action
  Wouldn't it be enough to override the getFormModel() method?

 Yes. Your code looks good.

  Something like this:
protected Object getFormModel() {
   //to load the XML model
   Container DOMModel = null;
   Source modelSrc = null;
 //this parameter holds the name of the xml file with the empty XML
  structure
  String modelFileName = getParameters().getParameter(xmlform-model,
  null);
  if(modelFileName==null) return null;
  try {
   modelSrc = getSourceResolver().resolveURI(modelFileName);
DOMModel = new XMLDocumentContainer(new
  StreamSource(modelSrc.getInputStream()));
  return DOMModel;
}
catch ( Exception e) {
  throw new CascadingRuntimeException(  Failed instantiating form
  model , e );
}
finally {
  getSourceResolver().release(modelSrc);
}
}
 
   4) Use the JXPath DOMContainer to load the xml file(constant)
  I have used XMLDocumentContainer. I see there's a DocumentContainer but
 only
  present in JXPath 1.1 alpha and the jar file is still not included in
  Cocoon, so I used the soon to be deprecated mentioned.
  Btw, how could I extract a DOMNode from the root or an XML String so I
 could
  store the whole structure afterwards? I see in 1.1alpha I could do
 something
  like 'DocumentContainer.MODEL_DOM' but I guess in 1.0 I should get a
  JXPathContext and search for the root node so I can get the String I
need.
  Am I right?

 Absolutely. On all counts.

 
   5) Use the DOMContainer object as the Form model
  Ok. But where should I store it? In a separate file like the ArtistBean
I
  got before?
  Or maybe would be enough to declare it and initialize it in the
getForm()
 or
  getFormModel() method?

 Should do.

 
   6) When you need to reference a node in the model, instead of using
the
  DOM
   API, you can directly use XPath,
   like this: getForm().getValue(/@id)
  At this stage I can only see the form and when trying to access the
model
 I
  get the following exception: 'Cannot setValue of an object that is not
 some
  other object's property/child'

 I am not sure why that is. Look at the source of the XMLFormTransformer
and
 see how it uses the Form.getValue() to access properties referenced via
 ref attributes in an XMLForm source document.

 
  Sorry about all the questions but this is totally new for me and it is
not
  easy.

 Not a problem at all. I have been looking for a good XML data model  db
 example for a long time.
 You are getting up to speed very fast.



 Cheers,


 Ivelin




 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-27 Thread Josema Alonso
 I understand. It looks like you've been in a really good mood to get this
 casting to work ;)
Yeah! ;-)

 I suggest emailing the JXPath lead Dmirti for ideas, his email is
 [EMAIL PROTECTED]
I'm sending email to him.

 Go ahead. This will be a nice addition to the samples and how-tos.
Great. Since I'm not sure of what to do, I'll read the docs on how to submit
first, but it'd be easier for me if I could update the wiki page and let you
or other to commit it. I'm more or less comfortable using the wiki but not
quite when it comes to Forrest...

Well, I'll see what Dimitri has to say and I'll post again.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-27 Thread Josema Alonso
Ivelin,

I got reply from Dmitri. I'm copying it below. Unfortunately I was right and
there's not better way of making it with Containers other that the casting I
proposed. Maybe when updating to 1.1.

I'll rewrite the how-to tomorrow if I can find a couple hours and put it in
the Wiki so you could see it all. If you feel it's ok, then we'll talk about
how to make it available for the official docs, ok?

Thanks for your help.


- Original Message -
From: Dmitri Plotnikov
To: Josema Alonso
Sent: Monday, January 27, 2003 11:19 PM
Subject: Re: please help about a problem using JXPath Containers in Cocoon


 Josema,

 I think your solution is fine with JXPath 1.0, despite all the type
 casts.

 With JXPath 1.1 I could recommend this to extract the document element:

 Element root = (Element)context.getPointer(/*).getNode();

 Unfortunately the getNode() method was not introduced until after 1.0
 was released.  If you call getValue(), the Element is converted to
 string by stripping all tags and keeping all textual contents - that's
 not what you need.

 - Dmitri



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-24 Thread Josema Alonso
Ivelin,

I'm trying to code your suggestions but I have problems and some doubts.

 1) You can remove ArtistBean altogether
Done.

 2) Store the empty id structure in a static file or local constant
Done.

 3) Override the getForm() method in the action
Wouldn't it be enough to override the getFormModel() method?
Something like this:
  protected Object getFormModel() {
 //to load the XML model
 Container DOMModel = null;
 Source modelSrc = null;
   //this parameter holds the name of the xml file with the empty XML
structure
String modelFileName = getParameters().getParameter(xmlform-model,
null);
if(modelFileName==null) return null;
try {
 modelSrc = getSourceResolver().resolveURI(modelFileName);
  DOMModel = new XMLDocumentContainer(new
StreamSource(modelSrc.getInputStream()));
return DOMModel;
  }
  catch ( Exception e) {
throw new CascadingRuntimeException(  Failed instantiating form
model , e );
  }
  finally {
getSourceResolver().release(modelSrc);
  }
  }

 4) Use the JXPath DOMContainer to load the xml file(constant)
I have used XMLDocumentContainer. I see there's a DocumentContainer but only
present in JXPath 1.1 alpha and the jar file is still not included in
Cocoon, so I used the soon to be deprecated mentioned.
Btw, how could I extract a DOMNode from the root or an XML String so I could
store the whole structure afterwards? I see in 1.1alpha I could do something
like 'DocumentContainer.MODEL_DOM' but I guess in 1.0 I should get a
JXPathContext and search for the root node so I can get the String I need.
Am I right?

 5) Use the DOMContainer object as the Form model
Ok. But where should I store it? In a separate file like the ArtistBean I
got before?
Or maybe would be enough to declare it and initialize it in the getForm() or
getFormModel() method?

 6) When you need to reference a node in the model, instead of using the
DOM
 API, you can directly use XPath,
 like this: getForm().getValue(/@id)
At this stage I can only see the form and when trying to access the model I
get the following exception: 'Cannot setValue of an object that is not some
other object's property/child'

Sorry about all the questions but this is totally new for me and it is not
easy.

Best.





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-23 Thread Josema Alonso
Ouch...I forgot to include the URL. I'm sorry.

http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice

Thanks :)

-Mensaje original-
De: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 23 de enero de 2003 4:24
Para: [EMAIL PROTECTED]
Asunto: Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]



What is the URL?

-=Ivelin=-


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-23 Thread Josema Alonso
Hello.

First of all, thanks for commenting on this.
Comments inline...


I strongly believe in XForms, but the sample you pointed show that the use
with Java Beans for DB connectivity and data validation is currently too
complex. I am thinking in what will happen if every form will be code like
the example in a huge application? What about changes in the large DB
application?
I know. I'm with you. It is a pain to code everything like this, but I
really prefer to code logic in Java and not in XML. After all you finally
build a MVC miniapp this way.

Can a generator build the Java Beans automatically what about the Action
automatically generated? Maybe we can find the answer in this area.
I think that's the way to go. There was some talk on this list a while ago
but we need more work on this.

Please dont take this email in the wrong sense. I know this is a very new
technology and you are doing your best effort to get it run under Cocoon.
Of course, I do not :-)
It's very instructive.

But maybe we can find another way to make it easier.
I hope so.

I think many people will stay at the current model:
XML Form + stylesheet + validation form + DB modular actions.
I proposed different approaches in my conclusions. Another one would be to
have modular DB actions for Xindice-like databases. But that would not solve
the problem.
Maybe a totally different approach would be needed.

I do not like my solution that much, but this is the simple one I've found
by now. I think we need to start working on it putting things out of the
Action and maybe later out of the model.
I've been thinking about some XML descriptors that could build the Action
and Bean autmatically and/or maybe a transformation phase after that for the
DB actions...I'm not sure...I should learn more to accomplish something like
that...

Again, thanks for your comments. I really appreciate them.

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Xindice in Cocoon

2003-01-23 Thread Josema Alonso
I'd say current docs on eXist are better than the ones on Xindice.
Anyway, I'd also say Xindice is much more powerful. For example, I think
eXist does not have XUpdate support yet.

In case you want to use Xindice in XSPs, I adapted the logicsheet so you can
use it with Xindice. you can find a HowTo at Cocoon Wiki.

Best.


-Mensaje original-
De: Boris Althaus [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 23 de enero de 2003 10:46
Para: [EMAIL PROTECTED]
Asunto: Re: Xindice in Cocoon


Hallo Leona,

you could try to use eXist, which is based on Xindice and has a logicsheet
für inserting and retrieving xml-documents and there is a quit good
documentation, how to integrate into cocoon.

Boris
- Original Message -
From: leona s
To: [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 3:03 AM
Subject: Xindice in Cocoon


Hi All,

I have a Cocoon application using several XML files that
I would like to put into Xindice. I asked on the XSL list about
calling Xindice directly from XSL statements, but that doesn't
appear to be possible.

I know that people have made Cocoon and Xindice work
together, but all the examples I have seen (cocooncenter,org,
cocoonwiki) may be using older versions of Cocoon, because the
changes to the sitemap don't reflect the version of the sitemap I have.
I am using C 2.0.4/Tomcat 4.1.12/JDK 1.3.1/WinXP Pro.

As a simple example, I have:

  map:match pattern=gs
map:generate src=gs.xml/
map:transform src=gs.xsl/
map:transform src=html.xsl/
map:serialize type=html/
  /map:match

gs.xml contains some basic application XML, such as pages and menus.
gs.xsl contains the business rules of the application, that cause
different
   data to be displayed, depending on the current user, current page, etc.
There
  also may be other transforms following this one.
html.xsl transforms the XML data into HTML for output.

Currently, I read in my XML data in gs.xsl using the XSL document()
function, and
would like to be reading from Xindice instead.
Can anyone tell me how to call Xindice from this pipeline? I would like to
do something
like get /db/project/project1001 and set it to a parameter to be passed
into gs.xsl.

Thanks very much for any help.
Leona Slepetis





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-23 Thread Josema Alonso
 Excelent document.
Thank you.

 I would like to suggest a slight improvement.
 The Model part can be improved quite a bit if you use a DOM object
directly
 instead of a JavaBean wrapper.
 more specificly:
 ...
Wow. It sounds very very good. I really need to learn much more about
JXPath.
I'll try to code it this weekend or early next week and update the Wiki
accordingly.

I'll post my results and/or doubts here, too.

Thanks a lot for your help.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




XMLForm Xindice Howto added to Wiki [please, att. Ivelin]

2003-01-22 Thread Josema Alonso
Hi, all.

Ivelin, I should have done it a long while ago, but it was not possible for
me until this day.
I added a HowTo on using Xindice with XMLForms. I tried to use the easiest
possible way. I hope I had not too many faults.
Please review it and comment it if you want.

Hope it could be useful.

Best.

ps: I used the Wiki since it was a lot easier for me, but you can put it
wherever you think is better.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Parameters in XMLForm example

2002-12-24 Thread Josema Alonso
I do not know if there's a better way, but I usually get them in the act
method as in:
http://xml.apache.org/cocoon/userdocs/concepts/actions.html

Best.

Josema Alonso
AAFunky Software

- Original Message -
From: A. Geluk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 24, 2002 11:24 AM
Subject: Parameters in XMLForm example


 Does anybody known if there's an example of getting query-string
 parameters out of an request. Or does anyone have such an example for
 me.

 I want to pass some variables to the first page of an XMLForm,
 so that i can access the variables in the Action class where i decide the
 next page to choose.

 Thnx for your help.

 Arnold

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: xmlform and different output formats

2002-12-20 Thread Josema Alonso
Hello,

I assume the user can choose between the formats at the last page of the
form, right?

If so, I think you could use a sitemap parameter. You could then make this:
First, you get the value in the model at that page step.

Second, you could make the value available to the sitemap via a parameter.
I usually get the sitemap parameters in the act method. You could get the
data submitted by the user from the model there and send it to the sitemap.
I usually follow what is said at
http://xml.apache.org/cocoon/userdocs/concepts/actions.html

Finally you have the pipeline defined with a parameter selector, so you
could serialize or transform the data accordingly.

I'm not that expert at this, but hope it helps.

Josema.
AAFunky Software.


-Mensaje original-
De: Kirchhoff, Lars [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 20 de diciembre de 2002 8:50
Para: Cocoon-Users (E-Mail)
Asunto: xmlform and different output formats


hello,

I need some help for the xmlform. I would like to create a
application that runs multiple forms and at the end outputs
some data to the user. at these stage the user should have
the possibility to get the outputted data in different
formats.
how can this approach be done. I thought about giving some
parameters to the page, but first how to add parameters and
second how to get theme in the action and apply the appropraite
stylesheet?

any suggestions are welcome.

ciao Lars

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: FORMS

2002-12-18 Thread Josema Alonso
Sure. I have tried different ways but using it directly from the Action with
a helper class seems to be the easiest solution by now.

I'm too busy this week, please give me a few days and I'll prepare and send
something to Wiki for example.

Btw, I read your message about loading content into a Node a few days ago.
You recommended using a Container. Since I didn't know about them I'm using
DOM Nodes  directly and it's working just fine. Would it be a better
approach to use the container?

Best.


-Mensaje original-
De: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 18 de diciembre de 2002 5:01
Para: [EMAIL PROTECTED]
Asunto: Re: FORMS



Josema,

Many people requested an example of XMLForm with Xindice.
Can you submit some source code or even better a HOW-TO doc?

Thank you,

Ivelin



- Original Message -
From: Josema Alonso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 9:59 AM
Subject: Re: FORMS


FORMSHello,
Yes, you must download 2.1 from CVS and build it. Information on how to get
it and build it step by step is available at:
http://xml.apache.org/cocoon/installing/index.html

Then you could test the XMLForm samples. I've been succesfully using them
for a few months backed by a Xindice respository.

Best.

ps: please, not HTML next time, thanks.


- Original Message -
From: Carlos González
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 3:34 PM
Subject: FORMS


Hi All,
I am very interested in something that would let me fill some forms, and
bind these form data to xml.
I am evaluating products like Altova's Authentic Web Edition (very
expensive, 30k USD per 50 concurrent users), but the functionality, except
the client behavior that allows to edit the whole xml before sending it to
the server, is near from what I'm looking for.
I have seen Cocoon Forms, and it seems that is what I need.
Could you give me some suggestions, hints, ..., whatever.
Also, Cocoon forms page says that Cocoon 2.1 must be downloaded in order to
test the example at url http://localhost:8080/cocoon/samples/xmlform/, but I
am unable to get this version neither in the download page nor in the cvs.
Where could I find this package?. Is it present in other releases, or only
in 2.1?
Thank you very much in advance.
Carlos.


Carlos Gonzalez-Cadenas
Software Architect
e-xtendnow



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: FORMS

2002-12-17 Thread Josema Alonso
FORMSHello,
Yes, you must download 2.1 from CVS and build it. Information on how to get
it and build it step by step is available at:
http://xml.apache.org/cocoon/installing/index.html

Then you could test the XMLForm samples. I've been succesfully using them
for a few months backed by a Xindice respository.

Best.

ps: please, not HTML next time, thanks.


- Original Message -
From: Carlos González
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 3:34 PM
Subject: FORMS


Hi All,
I am very interested in something that would let me fill some forms, and
bind these form data to xml.
I am evaluating products like Altova's Authentic Web Edition (very
expensive, 30k USD per 50 concurrent users), but the functionality, except
the client behavior that allows to edit the whole xml before sending it to
the server, is near from what I'm looking for.
I have seen Cocoon Forms, and it seems that is what I need.
Could you give me some suggestions, hints, ..., whatever.
Also, Cocoon forms page says that Cocoon 2.1 must be downloaded in order to
test the example at url http://localhost:8080/cocoon/samples/xmlform/, but I
am unable to get this version neither in the download page nor in the cvs.
Where could I find this package?. Is it present in other releases, or only
in 2.1?
Thank you very much in advance.
Carlos.


Carlos Gonzalez-Cadenas
Software Architect
e-xtendnow



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n and XMLForm declaration in sitemap

2002-12-09 Thread Josema Alonso
i18n and XMLForm declaration in
sitemaphttp://xml.apache.org/cocoon/howto/howto-i18n-xmlform.html

ps: please, no HTML email next time, thanks.

- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 8:19 AM
Subject: i18n and XMLForm declaration in sitemap


hello
can somebody show me how to declare XMLForm using i18n by calling action
(both are actions) in sitemap?
thanks a lot much
GD



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: xmlForm on update

2002-12-08 Thread Josema Alonso
 I am trying to use xmlForm on my DB actions (enter, update).
 With enter I understood, but questions on update:
 I have general actions some like DatabaseAddAction, DatabaseUpdateAction
and
 use these on my actions.
 So after retrieve data from DB by ID (use DatabaseSelectAction), what the
 next? How to set attributes of Bean?

What about making a method and call it in the perform action in one of the
steps, or use the setters there directly?
I do not know how your actions work but, for example, if your
DatabaseSelectAction returns a ResultSet with just one record, iterate
through it and use the setter methods of the Model Bean for each of the
wanted columns. Making controls in the XML pages referencing the model bean
properties should be enough then. Manipulate the data in the form editing
the required fields, and then use your DatabaseUpdateAction (again in the
perform action, for example after checking the button that was pressed in
the form). I only tried this with Xindice and loading query results in DOM
Nodes, but I'm sure it'll work with a relational database, too.

Hope it helps.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm: dynamic content listbox

2002-11-22 Thread Josema Alonso
Hi,

For what I know, the access to the properties by JXPath relies on the getter
and setter methods. So if you read the code in UserBean.java you'll see:
  public String[] getHobby()
  {
return hobbies;
  }

  public void setHobby( String[] newHobbies )
  {
hobbies = newHobbies;
  }

And that's why is accesssed via /hobby.

Please, Ivelin or anyone else, correct me if I'm wrong.

Hope it helps.


-Mensaje original-
De: Kirchhoff, Lars [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 22 de noviembre de 2002 7:20
Para: '[EMAIL PROTECTED]'
Asunto: AW: XMLForm: dynamic content listbox


Hello,

I'm trying the same and did manage to create a dynamic list
of checkboxes from a database. But I still don't get it completely.
Where is the ref=/hobby defined? I looked in the UserBean and the
userIdentity.xml, but found nothing. Can somebody give me a hint.
I would like to change this to one of my own variable names.

regards Lars



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm: dynamic content listbox

2002-11-22 Thread Josema Alonso
When you say 'So, but how is the xmlform framework determining the name?' I
do not know exactly what you mean.

Maybe you need the help of someone more expert than me in the framework. As
I told you in my previous message I think is JXPath making the mappings, but
haven't investigate this point too much...maybe we should take a closer look
at http://jakarta.apache.org/commons/jxpath/...


-Mensaje original-
De: Kirchhoff, Lars [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 22 de noviembre de 2002 9:59
Para: '[EMAIL PROTECTED]'
Asunto: AW: XMLForm: dynamic content listbox


thanks Josema,

after playing a while I found it as well, but still find it a bit
confusing, because there is now direct reference. What I did was
the following:

!-- == code == --
 public UserBean () {
initCustomers();
 }

 public String[] getName() {
return names;
 }

 public void setName( String[] newNames ) {
names = newNames;
 }

 public Set getCustomerNames() {
return customerNames.entrySet();
 }

 public void initCustomers() {
names  = new String[] {};
customerNames  = new HashMap();

...
  fill with database entries
...
 }
!-- == /code == --

after this was done in the java bean, I could acces the elements
by using /name as ref value in the xml file.

!-- == code == --
 xf:selectMany ref=/name selectUIType=checkbox
  xf:captionCustomer/xf:caption
  xf:itemset nodeset=customerNames
   xf:caption ref=value/
   xf:value ref=key/
  /xf:itemset
 /xf:selectMany
!-- == /code == --

So, but how is the xmlform framework determining the name?

best regards
Lars Kirchhoff



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm: dynamic content listbox

2002-11-21 Thread Josema Alonso
If I have well understood, I could replace the hard-coded values of
allHobbies by a query to a database. isn't it?
Yes. Just fill the appropriate Java structure of your choice with the
database values after querying it.

What would be the solution if I want to retrieve the allHobbies values from
an external xml file?
Is there an example?
Well, I'm using Xindice as the backend DB. I'm using DOM nodes to load the
content from the DB and then map those nodes to the form (there's an example
in the wizard with DOM nodes, too). It took me some time to make it work but
I know I get it. I do not have the code right here, but could send you a
complete example later today if you're interested.

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: XMLForm: dynamic content listbox

2002-11-21 Thread Josema Alonso
Yes I'm interested for your complete example!
Ok, I'll send the example later this evening.

I think that the access to Xindice or to a XML file are nearly the same?!?
Well, mostly...let's say you can get XML documents from Xindice. Think about
it as a XML documents repository that are stored in collections.

Thank you very much
You're welcome.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: pipeline result through SOAP?

2002-11-21 Thread Josema Alonso
Hello.

Ok, the AxisRPCReader essentially wraps an Axis SOAP server, and
makes it available in the sitemap to handle incoming requests.
...
Ok, I understand this.


You should also be able to access pipelines from within an Axis
webservice by making an internal request via the cocoon:/ protocol.
This sounds very good.

Note, I haven't yet done this, but all that should be required is to
write a component that implements Composable, lookup the source
resolver, and resolve a uri containing the pipeline you want to
resolve.
...
Ouch...Avalon again. When I try to do this kind of 'advanced' things with
Cocoon I always find the Avalon wall. I think I should get into it the
sooner the better if I want to develop powerful things.

You can send a SOAP request by using the XSP SOAP tag library in
Cocoon,the Axis SOAP client library, or any other SOAP client.
The input and output XML fragments are IIRC logged to the
sitemap.log, so you should be able to see everything that is going on.
Great, but couldn't make the reader work. All I get are SOAP errors from it
when making any call. What I've doe is to develop a Axis service. This one
is served directly from Axis. It makes a request to the Cocoon URL and gets
the XML document, then returns this document after serializing it in a DOM
Element. I have it working though I know this is just a quick workaround and
not the best approach. Hope I could amke the reader work soon. I'd like
experimenting with it.

Hope that helps mate! :)
It does. Thank you very much.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: pipeline result through SOAP?

2002-11-21 Thread Josema Alonso
 I'd recommend getting the soap-server sample working in the Cocoon
 webapp (remember to use the -Dinclude.scratchpad.libs=yes directive)
 and then start modifying it to do what you need.
Ok, I'll try it.

 I need to think about writing a CocoonProvider or similar for the
 AxisRPCReader to allow one to specify a pipeline in the deployment
 descriptor for creating the SOAP service content hmmm...
Yummm...this sounds really interesting :-)

 You can always send in the error messages you're getting and we
 can look at them,
Don't mind about them. I'm having a hard time at work currently and
unfortunately don't have the time to test this properly...
Anyway, once I get a little time, I'll try to build the scratchpad samples
and see what happens. I'll post my comments then.

Thank you very much.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm: dynamic content listbox

2002-11-20 Thread Josema Alonso
Hello.

I had a very similar problem a few days ago. The way to go is the itemset
tag as used in the wizard demo. Take a look at the 'userIdentity.xml' file
where the Hobbies get listed:
xf:selectMany ref=/hobby selectUIType=checkbox
xf:captionHobbies/xf:caption
xf:itemset nodeset=allHobbies
xf:caption ref=value/
xf:value ref=key/
/xf:itemset
/xf:selectMany

All you have to do is to change the UIType to the one desired and fill the
items with values taken from the DB, for example from the action.

Hope it helps,
Josema.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:56 PM
Subject: XMLForm: dynamic content listbox


 Hello,

 I'm using listbox in XMLForm (with tag xf:selectOne
selectUIType=listbox). The content of the listbox (the items listed) is
hard-coded in the xml document (view) like that:

 xf:selectOne selectUIType=listbox
  xf:item id=unix
   xf:captionUnix/xf:caption
   xf:valueUnix/xf:value
  /xf:item
  xf:item id=windows
   xf:captionWindows/xf:caption
   xf:valueWindows/xf:value
  /xf:item
 /xf:selectOne

 Is there a possibility to retrieve dynamically these items from a database
instead of using the hard-coded items in xml document??

 Thank you
 Sylvain

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: pipeline result through SOAP?

2002-11-19 Thread Josema Alonso
I've just took a look.
It is using the AxisRPCReader. I thought a reader was something like a
complete pipeline. I mean, it gets the request, and makes the needed steps
to generate, transform and serialze.

I'm using a transformer that already generates the wanted XML response. How
could I embed the result in that reader?

Btw, any step by step example on how to use that reader? I can see the XSL
and XSP but can't figure out how to feed it with a SOAP request and get a
SOAP response from it.




-Mensaje original-
De: Reinhard Poetz [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 19 de noviembre de 2002 11:17
Para: [EMAIL PROTECTED]
Asunto: RE: pipeline result through SOAP?


In the scratchpad there are some examples with Axis. I have never looked
into them but maybe the can help you.

Regards,
Reinhard



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamic select boxes in XMLForms?

2002-11-16 Thread Josema Alonso
 Look closer at the demo and examine the itemset elements under the select
 elements.
I see.  I'm sorry I didn't notice them before.

It's working, thank you very much.


 - Original Message -
 From: Josema Alonso [EMAIL PROTECTED]
 To: Cocoon-Users [EMAIL PROTECTED]
 Sent: Thursday, November 14, 2002 12:35 PM
 Subject: dynamic select boxes in XMLForms?


  Hi, all.
 
  I tried the XMLForm wizard demo where I see some select boxes created
for
  processor, ram, servlet engine and java version elements in ths system
  information page.
 
  I see the values for those are hard coded in 'system.xml' and I want to
  create a select box from a DOM Node. I got the following:
  EquipmentTypes
   EquipmentType id=player
DescriptionDescription of the player type/Description
   /EquipmentType
   EquipmentType id=recorder
DescriptionDescription of the recorder type/Description
   /EquipmentType
  /EquipmentTypes
 
  I would like to create a select box (one of the dropdown type) and have:
  1.- value of every option element as the EquipmentType/@id
  2.- text displayed of every option as the EquipmentType/Description
 
  I've tried with a xf:repeat with no luck. I also tried with just one
 element
  but no luck either. I guess is something with the stylesheet. The
  'xmlform2html.xsl' doesn't seem to check 'ref' attributes on option
  elements. I guess the solution will be the customization of that
 stylesheet
  to my needs...am I right?
 
  Thanks.
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: developing/installing custom actions without restarting app server?

2002-11-15 Thread Josema Alonso
Hey, thanks for the info. i'll try it.

Thanks to all who replied :-)


-Mensaje original-
De: Werner Guttmann [mailto:Werner.Guttmann;morganstanley.com]
Enviado el: viernes, 15 de noviembre de 2002 11:56
Para: [EMAIL PROTECTED]
Asunto: Re: developing/installing custom actions without restarting app
server?


On top of this, Tomcat 4.x can be configured to allow a web app's
classloader
to reload the complete web app if a class file or a JAR has changed. Which I
believe is quite handy when developing ...

Werner

Charles Brewster wrote:

 Josema Alonso wrote:

 Hi, all.
 
 I'm writing some actions for XMLForms. Everytime I modify the file to
make
 some tests, I have to stop Tomcat, copy the action to the correct
 subdirectory under WEB-INF/classes and start it again. If not, Tomcat
uses
 the old action.
 
 I'm wondering, is being cached somewhere? Is there a way to install the
 action and make it work without restarting the server?
 
 If you are using tomcat 4.1.12 there is a nice GUI ../manager/html/list
 which allows you to start/stop the applications without taking down the
 main tomcat server.

 The compiled files (cache) are in directories that look something like
 /work/Standard Engine/localhost/ appname.
 I have stopped an app cleared the work' directories and restarted the
app.

 The package with manager is tomcat4-admin-webapps-4.1.12

 (I may not be exact because I switched to another release)

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




developing/installing custom actions without restarting app server?

2002-11-14 Thread Josema Alonso
Hi, all.

I'm writing some actions for XMLForms. Everytime I modify the file to make
some tests, I have to stop Tomcat, copy the action to the correct
subdirectory under WEB-INF/classes and start it again. If not, Tomcat uses
the old action.

I'm wondering, is being cached somewhere? Is there a way to install the
action and make it work without restarting the server?

Thanks.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: developing/installing custom actions without restarting app server?

2002-11-14 Thread Josema Alonso
Ouch...

Thanks, Reinhard.

- Original Message -
From: Reinhard Poetz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 5:47 PM
Subject: RE: developing/installing custom actions without restarting app
server?


  I'm wondering, is being cached somewhere? Is there a way to install the
  action and make it work without restarting the server?

 No, as far as I know there is no way

 Regards,
 Reinhard


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




dynamic select boxes in XMLForms?

2002-11-14 Thread Josema Alonso
Hi, all.

I tried the XMLForm wizard demo where I see some select boxes created for
processor, ram, servlet engine and java version elements in ths system
information page.

I see the values for those are hard coded in 'system.xml' and I want to
create a select box from a DOM Node. I got the following:
EquipmentTypes
 EquipmentType id=player
  DescriptionDescription of the player type/Description
 /EquipmentType
 EquipmentType id=recorder
  DescriptionDescription of the recorder type/Description
 /EquipmentType
/EquipmentTypes

I would like to create a select box (one of the dropdown type) and have:
1.- value of every option element as the EquipmentType/@id
2.- text displayed of every option as the EquipmentType/Description

I've tried with a xf:repeat with no luck. I also tried with just one element
but no luck either. I guess is something with the stylesheet. The
'xmlform2html.xsl' doesn't seem to check 'ref' attributes on option
elements. I guess the solution will be the customization of that stylesheet
to my needs...am I right?

Thanks.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Dynamic models in XMLForms - was: Re: XMLForm - xf:repeat tag onDOM Nodes?

2002-11-12 Thread Josema Alonso
It needs further clarification before we can start design.
Hopefully other people who asked for this feature will add a few more use
cases.

I know, thank you.

Btw, what about filling a DOM node in the model from outside?
For example, I'm using Xindice, and there's that nice pseudo protocol
working on Cocoon.

I would like to query the DB using the pseudo protocol. It returns me a
collection. Now I want to feed the Form with this collection. A first
approach would be to load the collection in a DOM node for example. But I
can't see how I could do it, maybe with a sitemap parameter? May I load that
result there and then get it in the action in the act method?
The alternative is to query the DB directly inside the model or the action
and load the values, but I think it is a worse approach.

Well, that would be a first step. The second would be to have the model
empty. Then, after loading the coleection, properties would be 'created at
runtime' for every element. I do not know if it would be possible, but it
sounds too hard to me. Just a random idea...

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Dynamic models in XMLForms - was: Re: XMLForm - xf:repeat tag on DOM Nodes?

2002-11-11 Thread Josema Alonso
 Yes. This has been requested multiple times.
 Please open a feature request ticket in Bugzilla and describe with a few
 detailed use cases, what is it exactly that you would like to have.
 Others will add their thoughts to the ticket and someone (maybe I) will
 eventually implement it.

I've done it. I hope I did it well.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14450

Thank you very much for your help.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)

2002-11-11 Thread Josema Alonso
 Just open org.apache.cocoon.samples.xmlform.WizardAction.java
 then look more carefully in webapp/samples/xmlform

I did but haven't found anything new...any tips?
I see in the sitemap the WizardAction and the UsageFeedbackAction declared
and a hardcoded pipeline for each one. I would not like to hardcode dozens
of pipelines for everyone of my forms...I'll try any of the suggestions you
gave me when I have some time. Thanks.




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XMLForm - xf:repeat tag on DOM Nodes?

2002-11-09 Thread Josema Alonso
Stupid me, I sent the code snippet before fix it. That's what I meant
exactly, and it's working good. I just had some incorrect mappings in the
model.

You know? It took me a lot of time to understand this whole XMLForms thingie
of you. Now that it seems I know what I'm doing I must say I really like
this approach to forms. Thanks you very much for providing it :-)

Btw, some people are missing a dynamic model, I mean, they say you must
create it before hand. It would be pretty nice to see it in a next version,
sometime, but I can say to those, that using DOM nodes and documents and
manipulating them inside the action, can give a lot of power to make things
dynamic :-)

Thanks again.

- Original Message -
From: Ivelin Ivanov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 09, 2002 8:15 PM
Subject: Re: XMLForm - xf:repeat tag on DOM Nodes?



 You probably meant to use:


  xf:repeat nodeset=/productNode/product/description
   xf:textbox ref=@lang
xf:captionLanguage (code):/xf:caption
xf:violations class=error/
   /xf:textbox
   xf:textbox ref=.
xf:captionDescription:/xf:caption
xf:violations class=error/
   /xf:textbox
  /xf:repeat

 I would also recommend that you use the standard xml:lang attribute
instead
 of a non-qualified one.



 Ivelin




 - Original Message -
 From: Josema Alonso [EMAIL PROTECTED]
 To: Cocoon-Users [EMAIL PROTECTED]
 Sent: Saturday, November 09, 2002 12:40 PM
 Subject: XMLForm - xf:repeat tag on DOM Nodes?


  Dear all,
 
  I see in thw wizrd demo how the repeat tag is used like this:
  xf:repeat nodeset=favorite[position() lt;= 3] id=favorites
   xf:textbox ref=. class=info
xf:captionURL: /xf:caption
   /xf:textbox
  /xf:repeat
 
  In the model bean the favorite is implemented as an array list, so you
can
  iterate through it using the position function and specifying how many
 items
  to display.
 
  Well, now I got a part of my model implmented as a DOM Node. It seems
it'w
  working right but I can't make the repeat tag to work with it. Let's say
I
  have something like this:
  product
  description lang=ennice table/description
  description lang=esmesa bonita/description
  /product
 
  I want to display as many textboxes as descriptions, ok? I have tried
 this,
  but unfortunately it is not working. :
  xf:repeat nodeset=/productNode/product
   xf:textbox ref=description/@lang
xf:captionLanguage (code):/xf:caption
xf:violations class=error/
   /xf:textbox
   xf:textbox ref=description
xf:captionDescription:/xf:caption
xf:violations class=error/
   /xf:textbox
  /xf:repeat
 
  If I try to access just one description node outside the repeat tag, I
get
  the info correctly. Any ideas?
 
  Thanks.
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)

2002-11-09 Thread Josema Alonso
 I am not sure if I would do this like you did.
 There are is a certain lifecycle contract between every Cocoon component
and
 the container.
 By invoking directly you may be violating this contract.
 I would probably let the sitemap do the forwarding to actions.
 In your case action sets might be good.
 http://xml.apache.org/cocoon/userdocs/concepts/actions.html
I considered them and maybe I'll use them. I'm trying to make a good
decision.

 Alternatively you can use one dispatcher action which inherits from
 AbstractXMLFormAction and works directly with the backend based on the
 requested command.
I see. Someone pointed this one, too, but I'm that Avalon savvy to implement
something like this currently.

 Yet another alternative is for the extending action to return an
objectmodel
 parameter which is matched later in the sitemap.
 map:action type=myxmlformaction
   ...
   map:call src=cocoon:{whichaction}
This one sounds new, interesting and easy to code. I'll give it a try :-)

Thank you very much.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: nested map:select type=parameter in sitemap are not working

2002-11-08 Thread Josema Alonso
Thanks for your reply,

The parameter comes from the action. I tried accesing it as {../page} as you
suggests but it doesn't help either. Anyway i can see in the log the
parameter has the 'end' value when requesting the last page of the XMLForm
and it goes through the otherewise section while it shouldn't :-(

I'm starting to think I can make that select there. Maybe it is not possible
to nest two select or maybe it is not possible to test against the page
parameter 'til outside the action, but this can't be the case, cause when it
goes through the otherwise section (it is always as I said) the right page
is rendered, and if you see the snippet it uses the page parameter for
choosing the page...oh, dear I'm desperate...

Best.


-Mensaje original-
De: Sternath Elmar [mailto:elmar.sternath;siemens.com]
Enviado el: viernes, 08 de noviembre de 2002 8:21
Para: '[EMAIL PROTECTED]'
Asunto: AW: nested map:select type=parameter in sitemap are not
working


Hi Josema,

where does the 'page' parameter come from? Don't forget that you're inside
an action when accessing it. So if it is a request parameter, you have to
access it using {../page}.

-Ursprüngliche Nachricht-
Von: Josema Alonso [mailto:alonso;aafunky.com]
Gesendet: Donnerstag, 7. November 2002 21:16
An: Cocoon-Users
Betreff: nested map:select type=parameter in sitemap are not working


Hello, all.

This is driving me crazy...
In the following sitemap snippet the second select goes ALWAYS for the
otherwise section. I have checked the sitemap.log and the value of the page
attribute is, in the last stage of my XMLForm processing, equal to 'end'.
Well, it doesn't go for the when clause either :-(

Don't know what else to do. I hope it's not a bug...

Thanks.

-
map:pipeline
 map:match pattern=**/*.xform
  map:select type=parameter
   map:parameter name=parameter-selector-test value={2}/
   map:when test=EquipmentType
map:act type=EquipmentTypeAction
 map:parameter name=actionName value={2}Action/
 !-- XMLForm parameters for the AbstractXMLFormAction --
 map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
 map:parameter name=xmlform-validator-schema
value={1}/{2}/schematron/equipment-type-validator.xml/
 map:parameter name=xmlform-id value=form-insert/
 map:parameter name=xmlform-scope value=session/
 map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{2}Bean/
 map:select type=parameter
  map:parameter name=paramend value={page}/
  map:when test=end
   !-- generate the XSP and insert into DB using XMLDBTransformer --
   map:generate src={../1}/{../2}/{page}.xsp/
   !--
   map:transform type=cinclude/
   map:transform type=xmldb
map:parameter name=base value=xmldb:xindice:///db/xmtrader//
   /map:transform
   --
   map:serialize type=xml/
  /map:when
  map:otherwise
   !-- original XMLForm document --
   map:generate src={../1}/{../2}/{page}.xml/
  /map:otherwise
 /map:select
/map:act
   /map:when
  /map:select
  !-- common part for the XMLForms --
  !-- populating the document with model instance data --
  map:transform type=xmlform label=debug, xml/
  !-- personalizing the look and feel of the form controls  --
  map:transform src=styles/wizard2html.xsl/
  !-- Transforming the XMLForm controls to HTML controls --
  map:transform src=styles/xmlform2html.xsl/
  !-- sending the HTML back to the browser --
  map:serialize type=html/
 /map:match
/map:pipeline



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: nested map:select type=parameter in sitemap are not working

2002-11-08 Thread Josema Alonso
Because that one give me access to a request parameter and I need to get the
{page} value returned by my action to do the selection.

Best.

-Mensaje original-
De: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com]
Enviado el: viernes, 08 de noviembre de 2002 11:01
Para: [EMAIL PROTECTED]
Asunto: Re: nested map:select type=parameter in sitemap are not
working


Why don't you use in you second test the 'parameter-selector-test' attribute
?

map:parameter name=parameter-selector-test value={page}/

Ludovic


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: how to manage several XMLForms in a sitemap? (it was: dynamicallychoosing an action at runtime)

2002-11-08 Thread Josema Alonso
[snip]
   //get the Action
   if(actionName.equalsIgnoreCase(EquipmentTypeAction)) {
EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction();

//add this action to the manager
equipmentTypeAction.compose(this.manager);

This is incorrect. It allows the equipmentTypeAction access the
component manager. Not the other way around.
I see. Thanks.

Please don't invent the wheel a second time. Have a read of the great
introduction to the Apache Avalon Framework.
I don't want to.
I tried but it is too hard for me right now. Anyway, I know is the way to
go.

Thanks.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: nested map:select type=parameter in sitemap are not working

2002-11-08 Thread Josema Alonso
 Ludovic is right, ParameterSelector only works if you use
name=parameter-selector-test as parameter. Take a look at the source code!
What you could do to solve the problem is writing the action return value by
use of SessionPropagatorAction into session and then use
SessionAttributeSelector to reevaluate it.

I'm sorry. Absolutely my fault. didn't know the name was hardcoded there.
Thanks for the tip, it works! :-)

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)

2002-11-07 Thread Josema Alonso
Well, this is a followup to my previous message regarding this subject.
I coded the Dispatcher, but I must say I didn't know what I was doing
exactly. Surprisingly, it works but only from time to time...the behaviour
is really weird...
I'm copying the code below and hope someone could review it. I'm afraid I'm
breaking something somewhere in my cocoon...

Thanks.

ps: remember that I was trying to code a Action that could dispatch other
actions, so I could call it for as many XMLForms as needed with a parameter
and it would choose the right action. Some kind of factory method...

---
package net.josema.xmtrader.forms;

import java.util.HashMap;
import java.util.Map;

import
net.josema.xmtrader.forms.xmldb.recordings.equipment.EquipmentTypeAction;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.acting.ConfigurableComposerAction;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.environment.SourceResolver;


/**
 * This action let decide which action to use at runtime based on
 * a sitemap parameter with the name of the action to load.
 *
 */
public class ActionDispatcher extends ConfigurableComposerAction implements
ThreadSafe {

public Map act(Redirector redirector, SourceResolver resolver, Map
objectModel,
String source, Parameters parameters)
  throws Exception {

   String actionName = parameters.getParameter(actionName);
   Map resultMap = new HashMap();

  //get the Action
  if(actionName.equalsIgnoreCase(EquipmentTypeAction)) {
   EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction();
   //add this action to the manager
   equipmentTypeAction.compose(this.manager);
   resultMap = equipmentTypeAction.act(redirector, resolver, objectModel,
source, parameters);
  }
  //place for the rest of the if clauses for more actions

  //return the map gotten from the chosen action
  return resultMap;
}
}




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




nested map:select type=parameter in sitemap are not working

2002-11-07 Thread Josema Alonso
Hello, all.

This is driving me crazy...
In the following sitemap snippet the second select goes ALWAYS for the
otherwise section. I have checked the sitemap.log and the value of the page
attribute is, in the last stage of my XMLForm processing, equal to 'end'.
Well, it doesn't go for the when clause either :-(

Don't know what else to do. I hope it's not a bug...

Thanks.

-
map:pipeline
 map:match pattern=**/*.xform
  map:select type=parameter
   map:parameter name=parameter-selector-test value={2}/
   map:when test=EquipmentType
map:act type=EquipmentTypeAction
 map:parameter name=actionName value={2}Action/
 !-- XMLForm parameters for the AbstractXMLFormAction --
 map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
 map:parameter name=xmlform-validator-schema
value={1}/{2}/schematron/equipment-type-validator.xml/
 map:parameter name=xmlform-id value=form-insert/
 map:parameter name=xmlform-scope value=session/
 map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{2}Bean/
 map:select type=parameter
  map:parameter name=paramend value={page}/
  map:when test=end
   !-- generate the XSP and insert into DB using XMLDBTransformer --
   map:generate src={../1}/{../2}/{page}.xsp/
   !--
   map:transform type=cinclude/
   map:transform type=xmldb
map:parameter name=base value=xmldb:xindice:///db/xmtrader//
   /map:transform
   --
   map:serialize type=xml/
  /map:when
  map:otherwise
   !-- original XMLForm document --
   map:generate src={../1}/{../2}/{page}.xml/
  /map:otherwise
 /map:select
/map:act
   /map:when
  /map:select
  !-- common part for the XMLForms --
  !-- populating the document with model instance data --
  map:transform type=xmlform label=debug, xml/
  !-- personalizing the look and feel of the form controls  --
  map:transform src=styles/wizard2html.xsl/
  !-- Transforming the XMLForm controls to HTML controls --
  map:transform src=styles/xmlform2html.xsl/
  !-- sending the HTML back to the browser --
  map:serialize type=html/
 /map:match
/map:pipeline



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)

2002-11-05 Thread Josema Alonso
Well, after reading replies to my emails I have a better idea of wht to do
and unfortunately not a chance to do it.
I explain it.

A quick summary. I would like to manage many XMLForms in my sitemap. I would
like to declare a pipeline like this:
  !-- XMLForms pipeline --
  map:pipeline
   map:match pattern=*
map:act type={1}Action
 !-- XMLForm parameters for the AbstractXMLFormAction --
 map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
 map:parameter name=xmlform-validator-schema
value=schematron/equipment-type-sch-report.xml/
 map:parameter name=xmlform-id value=form-insert/
 map:parameter name=xmlform-scope value=session/
 map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean/
 !-- original XMLForm document --
 map:generate src={page}.xml/
 !-- populating the document with model instance data --
 map:transform type=xmlform label=debug, xml/
 !-- personalizing the look and feel of the form controls  --
 map:transform src=styles/wizard2html.xsl/
 !-- Transforming the XMLForm controls to HTML controls --
 map:transform src=styles/xmlform2html.xsl/
 !-- sending the HTML back to the browser --
 map:serialize type=html/
/map:act
   /map:match
  /map:pipeline

For individual hard coded actions I have it working, but I do not want to
repeat those lines for every form I must configure. The conflicting line is
this one:
map:act type={1}Action

It is not possible to specify the Action at runtime.

I searched through the mail archives and got some replies yesterday and
everything points into the direction mentioned at this message:
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102870549825076w=2

So, an Action Dispatcher (or call it Proxy Action or whatever) is needed so
the action could be choosed at runtime. Unfortunately this involves working
with Avalon components and I have no idea about them. I tried their white
paper at their website but it is too hard for me to understand at this
point...

So, the thing is, has anybody developed a component like this? If so,
please, could you share it?
I believe it's very easy to make one for someone with a good knowledge of
Avalon, hope someone could help me on this. I'm almost there with my
XMLForms-Xindice application and I'd love to share my experiences once
finished.

Thanks you very much to all.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)

2002-11-05 Thread Josema Alonso
Hi, Mark.

Thanks for writing. After reading your message I can only say...wow!
I think it is very interesting the way you made things work and I really
would love to see it.

More than that, I'm with you when you say you're doing things from a very
different approach when comparing to the average cocoon users do. So, I
encourage you to document it well, take your time, and make it public on a
website. IMHO, it is something that will help people like me to see Cocoon
with a more open mind.

Anyway, there are too many new concepts for me in your message, I can't try
to understand them all at this stage in my project. So, I should look for
another solution quickly. But I hope I could take a look at your work and
take your approach into consideration for future projects.

Thank you very much.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 05, 2002 6:56 PM
Subject: Re: how to manage several XMLForms in a sitemap? (it was:
dynamically choosing an action at runtime)


 Well I can explain what I've done which matches your requirements but the
implementation I suspect is quite different.

 First some issues I had.
 1.) I like the XFORMS concept but... didn't like the fact that I couldn't
represent non-forms widgets, e.g. page banners, table of contents, footers,
buttons that didn't submit data, e.g. were simply URL's etc.  so I created a
schema (for my own purposes) much like XFORMS but then added a few things
like url's, etc.  I removed the concept of the model and the bindings and
what I'm left with is a schema that describes a UI so I called it XUI.  I
have separate XUI files for the portlets within my page, e.g. banner, toc,
footer, 1-n body portlets.
 2.) Cocoon's portal concept.  In my world every page is a portal page (not
just the home page) in that I break it up into banner, toc, footer, body
sections.  since the banner, toc, footer rarely change (perhaps due to the
user's locale or due to security permissions for various features) I can
cache this and improve overall page performance as only the body portlet(s)
is really be generated.  Back to cocoon's portal concept.  There's four
config/layout files and you need to do it per portal and then there's alot
of sitemap configuration per portal and this isn't my idea of fun.

 So I created yet another schema called XPORTAL (again for my own uses)
which declares validation file to be used, the portlets, the pagebuilder
which should assemble all of the portlets into one nice page, etc.

 So to wrap this up.  What I've done is create a portalAction that takes an
actionID request parameter (not a url).  The actionID corresponds to an
XPORTAL file.  The portalAction reads the XPORTAL file and then populates
the sitemap parameters and/or the httpRequest object with the necessary
parameters to drive the sitemap.

 Therefore my sitemap is more like a programming language rather than a set
of url filters.  XML Metadata files read by actions feed the sitemap with
parameters.  So there's no hardcoding of a specific URL do this...

 The XPORTAL file goes so far as to say should we use SSL for a set of
pages, should the page(s) be authenticated and if so what handler, what UI
look and feel skins to use, should we validate the form data
(form-validator-action) and if so what descriptor file, what set, what
actions to redirect to for successful validation versus unsuccessful
validation, etc.

 Each portlet then is described using the WSUI schema from www.wsui.org.
This allows me to call out SOAP services or wherever.  I've extended the
wsui schema to handle cocoon services (XSP).  WSUI files (for me) show
what XSP page to use for the model/db IO, and what XUI file (implemented in
XSL) to use to transform generated model XML into a UI form of XML.  The XUI
files implemented as XSL (therefore I get XPATH and language constructs like
for-loops, choose, etc for free) acts like cocoon's XMLFORMS action.

 I then do a second XSL transform to do the look and feel (skin).  (skin's
are know within the portal file as the skin should be applied across the
entire page.)

 Basically I'm creating a web application framework out of cocoon rather
than what (I believe) most people are using cocoon for e.g. web publishing.

 So I'm more than happy to share the XML schemas with the list as well as
sample XML files to illustrate their usage.  Beyond that... I've followed an
iterative approach in developing this and the visual aspects were done
first, e.g. pagebuilders assemblign HTML fragments hardcoded into a sitemap,
then pagebuilders assemblign HTML fragments retrieved from an XPORTAL file
driving the sitemap, then to XSP pages instead of the HTML fragments

 So if you'd like code too... I'd probably just give you the first
iterations (as I've saved them off) or so otherwise it would be too
confusing if I gave you what I have now.  Let's just say it's very different
although in the end it takes many familar concepts to the cocoon 

dynamically choosing an action at runtime

2002-11-04 Thread Josema Alonso
Hello, all.

Is it possible to choose what an action perform at runtime based on sitemap
parameters? I have the pipeline below for processing XMLForms. It is working
just nice for one form if I do not use the {1} param but hard code the
Action name. I would like to make it work as described so I could
dynamically choose what actions to apply to every form based on parameter.

Any ideas?

thanks

--
  !-- XMLForms pipeline --
  map:pipeline
   map:match pattern=*
map:act type={1}Action
 !-- XMLForm parameters for the AbstractXMLFormAction --
 map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
 map:parameter name=xmlform-validator-schema
value=schematron/equipment-type-sch-report.xml/
 map:parameter name=xmlform-id value=form-insert/
 map:parameter name=xmlform-scope value=session/
 map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean/
 !-- original XMLForm document --
 map:generate src={page}.xml/
 !-- populating the document with model instance data --
 map:transform type=xmlform label=debug, xml/
 !-- personalizing the look and feel of the form controls  --
 map:transform src=styles/wizard2html.xsl/
 !-- Transforming the XMLForm controls to HTML controls --
 map:transform src=styles/xmlform2html.xsl/
 !-- sending the HTML back to the browser --
 map:serialize type=html/
/map:act
   /map:match
  /map:pipeline



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamically choosing an action at runtime

2002-11-04 Thread Josema Alonso
 Just use appropriate selector:
 http://xml.apache.org/cocoon/userdocs/selectors/selectors.html

I already tried but haven't found a nice way of using them for this purpose.
I can make something like the pipeline below, but i have dozens of similar
cases and it doesn't seem like a good approach. Maybe I haven't understood
selectors well...


--
  !-- XMLForms pipeline --
  map:pipeline
   map:match pattern=*
map:select type=parameter
 map:parameter name=parameter-selector-test value={1}/
 !-- Case #1 --
 map:when test=EquipmentType
  map:act type=EquipmentTypeAction
   !-- XMLForm parameters for the AbstractXMLFormAction --
   map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
   map:parameter name=xmlform-validator-schema
value={1}/schematron/{1}-validator.xml/
   map:parameter name=xmlform-id value=form-insert/
   map:parameter name=xmlform-scope value=session/
   map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean/
   !-- original XMLForm document --
   map:generate src={../1}/{page}.xml/
   !-- populating the document with model instance data --
   map:transform type=xmlform label=debug, xml/
   !-- personalizing the look and feel of the form controls  --
   map:transform src=styles/wizard2html.xsl/
   !-- Transforming the XMLForm controls to HTML controls --
   map:transform src=styles/xmlform2html.xsl/
   !-- sending the HTML back to the browser --
   map:serialize type=html/
  /map:act
 /map:when
 !-- Case #2, very very similar to the first one, it should be a better
way to choose between both --
 map:when test=RecordingType
  map:act type=RecordingTypeAction
   !-- XMLForm parameters for the AbstractXMLFormAction --
   map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
   map:parameter name=xmlform-validator-schema
value={1}/schematron/{1}-validator.xml/
   map:parameter name=xmlform-id value=form-insert/
   map:parameter name=xmlform-scope value=session/
   map:parameter name=xmlform-model
value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean/
   !-- original XMLForm document --
   map:generate src={../1}/{page}.xml/
   !-- populating the document with model instance data --
   map:transform type=xmlform label=debug, xml/
   !-- personalizing the look and feel of the form controls  --
   map:transform src=styles/wizard2html.xsl/
   !-- Transforming the XMLForm controls to HTML controls --
   map:transform src=styles/xmlform2html.xsl/
   !-- sending the HTML back to the browser --
   map:serialize type=html/
  /map:act
 /map:when
/map:select
   /map:match
  /map:pipeline



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamically choosing an action at runtime

2002-11-04 Thread Josema Alonso
 It's also possible to only have the map:generate/ as child of
 map:select/ and map:act/ and the rest comes after map:select/:
...
I see, thanks.

 But for my eyes still everything seems to be the same except the action
 interna. Maybe it's better to use only one action and choosing there
 internally what to do?
Yes! That's what I'm trying to do, but I still couldn't. I can't think of a
way of coding that. Maybe I should know something about the Avalon
components and try to make something like an ActionDispatcher...but
unfortunately I don't know how to do it :-(

Thanks anyway :-)


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamically choosing an action at runtime

2002-11-04 Thread Josema Alonso
You don't have to include the parts of your pipeline that are the
 same in the map:when elements. You can just include the map:act
 element, since it appears that you're not returning any parameters from
 your action, and then you won't have to duplicate the part that doesn't
 vary.
I'm returning the {page} parameter from the action. I'll try it the way you
describe anyway and I'll see if I can get some results.

An even better way would be to have a proxy Action class that
 dynamically loads a particular helps class depending on a parameter
 passed to it. Cocoon already includes something like this with
 ServerPagesAction, and you write the action in XSP.
Yes! But I don't know how to code it. I'll take a look at the Action you
mention.

Thanks :-)



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




using XMLForms with Xindice (through XMLDB Transformer) - ideas?

2002-11-01 Thread Josema Alonso
Hello.

I have a working XMLForm. I want to add the generated data in the last step
to a Xindice database.
I also have the XMLDBTransformer configured and working just fine.

In case you haven't heard of the XMLDBTransformer, it takes a XML file or
string and works with it. For example, the insert action expects something
like this:
   xindice:query type=create oid=user-id
 person
usernamejohndoe/username
email[EMAIL PROTECTED]/email
 /person
   /xindice:query

Where the information for the person is added to the database.

Now, how can I link those?
I can think of some possibilities:
1.- Use java code in my custom action, so in the confirm step I could open
the connection to Xindice and store the data.
2.- Make the confirm page not a XML page but a XSP one. I could add logic to
retrieve the model bean data there and add it to Xindice.
3.- Similar to #2 but I only produce there the needed XML entry for the
XMLDB transformer and feed it after processing the XSP.
4.- Develop a new custom transformer. It would get the form data and format
it according to the format expected by the XMLDB transformer so it could
feed it.
5.- Forget the previous possibilities. Just make a custom XSLT. This will be
in the sitemap right after the xmlform transformation. And after that it
will feed the XMLDBTransformer.

I have serious doubts on what approach I should take. I don't like #1 too
much, cause it ties the Form to Xindice implementation. I like #2 or #3
more, cause right now I think #4 is too difficult for me. I tried to code
the XSP in #2 and #3 but there's an obvious problem when using the
getObjectModel() method, so I should look for a way to retrieve the my form
object from the session so this approach is getting complicated.more.

I also coded #4, I feel it separates concerns better and it's a good
approach from a sitemap's perspective. It does a good job, I can send the
code snippet if needed. But I'm not completely satisfied with it. In the
example above, I want to validate if the username already exists in the DB
and add a violation to the XMLForm if it does, so the user should choose
another one.

Well, after reading dozens of XMLForm related messages in the archive I
think I can understand better when Ivelin says he prefers Java for complex
logic and not XSP. I'm thinking of taking #1 approach after all, making a
helper bean to query the Xindice database and use it in my action, but
though it will make XMLForm- Xindice interactions way easier, I don't like
the idea pretty much. I'd be using a transformer into an action and it won't
be any clear in the sitemap. Now, with approach #4 you can see clearly
you're just chaining transformations and my custom action is DB independent
too, and I like it.

What do you all think? Would it be so bad? Maybe I'm just being very picky
at this...stupid me...I need some sleep...

Thanks for reading.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamic XMLForm taking inout data from previous steps?

2002-10-31 Thread Josema Alonso
...
 How many boxes do you expect to render?
 One solution is to change the getter method for the languages property, so
 that it pads the array with blank entries to match the value of
 descriptionsNumber if the array's current size() is less than that of
 descriptionsNumber .

It seems you were reading my mind ;-)
I just coded that a few hours ago and it works.

Thanks a lot.

ps: I'm starting a new thread about my concerns using XMLForm with
Xindice...I'm almost there, but would need a but of help :-)



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




dynamic XMLForm taking inout data from previous steps?

2002-10-29 Thread Josema Alonso
Hi, all.

This is what I'm trying to do:
1.- I want to have a form similar to the wizard sample. In the first page I
want to have a input box that can hold a number and another for a name.
Something like this:
?xml version=1.0?
document xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;
xf:form id=form-insert view=product action=insert
method=POST
xf:captionNew Product/xf:caption
error
xf:violations class=error/
/error
xf:textbox ref=/productName
xf:captionProduct Name:/xf:caption
xf:violations class=error/
/xf:textbox
xf:textbox ref=/descriptions
xf:captionNumber of Descriptions/xf:caption
xf:help (one for each language you'll choose later)/xf:help
xf:violations class=error/
/xf:textbox
xf:submit id=prev class=button
xf:captionPrev/xf:caption
xf:hintGo to previous page/xf:hint
/xf:submit
xf:submit id=next class=button
xf:captionNext/xf:caption
xf:hintGo to next page/xf:hint
/xf:submit
/xf:form
/document

2.- Now I want to query the form so I can get the number the user put in the
'descriptions' field. Then I could show him the number of boxes she
requested at the previous page, so she could fill descriptions for a product
for the number of languages she wanted in step 1.

I tried to figure how the xf:repeat and xf:group tags work, maybe that's the
way to go. Still not much info about it anyway.

Ivelin, anyone...is this possible? If so, how could I make it work?
I'm having a VERY hard time making XMLForms work, I'm still unsure if they
derserve the time. Please, convince me, I really want to keep on trying, but
I'm sooo tired...
I know Javascript validation is not that good, but I have a strong
Javascript background and I think I could code something similar quicker.

Thanks in advance.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: dynamic XMLForm taking inout data from previous steps?

2002-10-29 Thread Josema Alonso
 I tried to figure how the xf:repeat and xf:group tags work, maybe that's
the
 way to go. Still not much info about it anyway.
I think I've almost got it:
xf:repeat nodeset=languages[position() lt;= /descriptionsNumber]
id=descriptionLangs
xf:textbox ref=. class=info
xf:captionLanguage (code):/xf:caption
/xf:textbox
/xf:repeat

And I have in the model bean:
...
private int descriptionsNumber = 1;
private List languages = new ArrayList();
...
public InsertBean () {
initLanguages();
}

public void initLanguages() {
languages.add(en);
languages.add(es);
}
...

And the 'descriptionsNumber' is filled on a previous step in the form
wizard.
But...oh yes, there's a but, I can only generate in the repeat as many input
boxes as elements the 'languages' ArrayList have. It seems that it doesn't
show more than two of them no matter the number I put to fill the
'descriptionsNumber' field. If I put 1, it shows just one field, if I put 2,
it shows two fields, if I put three or more, it only shows two anyway. I
guess that's because the ArrayList only have two elements and the rest of
the calls return null.
Is there a workaround?
I think I'll try looking at the source code of the transformer...

Best.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




desperate with XMLForms invalida data message

2002-10-28 Thread Josema Alonso
Hello, all.

It's been all day long and I'm still stuck with this.
I can make the XMLForms Wizard demo to work nicely, but everytime I try to
change just one property to test a custom solution, the 'invalid for data'
message appears. I guess this is because of some mapping problems between
forms and model bean.

I tried initializing one of the variables in the bean to see if the value
shows in the form, but no luck. Don't know what else I can try. I also
remove most of the fields and forms on the wizard, keeping just one form
with one name field. It doesn't work either...oh, god...

Well, just a very very simple question. If I take the XMLForm Wizard and I
do a minimal change:
1.- Change the name of the 'firstName' field in the 'userIdentity.xml' file
to, for example 'theName'. I keep the initial value to 'Donald'.
2.- Change the getter and setter method in the model bean so I now have
'setTheName' and 'getTheName' methods.
3.- Change for validation in the schematron file, in the 'firstName'
pattern, I change it for 'theName' too.

Why now the Wizard is not working? Did I miss something? I'm pretty sure
this has to be a mapping issue, but don't know how to fix it.

Thanks in advance.

ps: I could attach files or code if needed


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




SimpleFormTransformer problem - not working in 2.1-dev?

2002-10-23 Thread Josema Alonso
Dear all,
I'm trying to use the transformer but it seems something's going wrong. I've
searched through all the sitemaps and couldn't find it in any of them. I
checked the API and the .jar and I see it's still there, so I defined it
like this:
map:transform logger=sitemap.transformer.simpleform name=simple-form
src=org.apache.cocoon.transformation.SimpleFormTransformer/

Then I tried to use it in a pipeline like this:

map:transform type=simple-form/

But I get an exception in the sitemap.

I removed the pipeline and the exception is still there. It's very clear and
it is something about Avalon not founding the transformer component, and as
I told you before, it's sitting there in the .jar with the rest of the
transformers...

What to do to make it work? Any ideas?

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: XIndice inside XSP (using eXist logicsheet), how?

2002-10-12 Thread Josema Alonso

Sure, here it is straight from my main sitemap, but it's the same as the
cocooncenter.org article:

!--== XMLDB ==--
map:pipeline
map:match pattern=xmldb/**
map:match type=request-parameter pattern=xpath
map:generate
src=xmldb:xindice://localhost:4080/db/{../1}#{1}/
map:serialize type=xml/
/map:match
map:generate src=xmldb:xindice://localhost:4080/db/{1}/
map:serialize type=xml/
/map:match
/map:pipeline

Have you tried to make queries usind the command line tools? Have you
installed the Xindice examples or created a collection?

- Original Message -
From: Chuck Amadi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 11:41 AM
Subject: Re: XIndice inside XSP (using eXist logicsheet), how?


 Sorry to be cheek but Plz could you send a snippet of your sitemap.xmap
 relating to your xmldb entry I have also followed the set path but I'm
 experiencing problems
 cos Cocoon won't talk to Xindice - Resource not found error.Tried
 iteration and more of the same .

 Cheers in advance if possible just to double check .

 Vadim Gritsenko wrote:

  Josema Alonso wrote:
 
  Hello.
 
  I have XIndice working with Cocoon. I followed the directions at
  Cocooncenter and everything is going fine when requesting XMLDB URIs.
  Now
  I'd want to have a XSP querying the database so I could encapsulate
  the DB
  calls and pass parameters easily.
 
 
  Why don't you use cinclude?
 
  Vadim
 
 
 
  I searched trough the archives and found
  posts about the use of eXist logicsheet with XIndice inside Cocoon,
  but none
  of them say anything about how to configure it.
 
  I'm trying it but can't make it work. Has anybody tried and suceeded?
 
  Oh, if you have any other solution or idea on how to make XIndice work
  inside XSP, please let me know. I hope I could finally make it and
  write a
  How-To. I really miss it.
 
  Thanks.
 
 
 
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 

 --
 Regards
 Chuck Robert Amadi
 ICT Dept Systems Programmer.
 Rhaglenydd Systemau Adran ICT.
 Roll on Linux Power too deliver.
 Rholiwch ar Linux Y gallu i y Dosbarthu.

 Before you criticize someone,
 you should walk a mile in their shoes.
 That way, when you criticize them,
 you're a mile away, and you have their shoes.






 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Xindice logicsheet - initial success

2002-10-12 Thread Josema Alonso

 Anyway, I have read some of your previous replies regarding this subject.
 Have tried the util logicsheet and it's working out of the box, even for
 XPath queries. Great feature, thanks!
 But what I would like to do is to edit, remove, update...documents in
 Xindice.
 
 Try also XMLDBTransformer. It is located in the scratchpad, and can
 create / delete resources in the xindice. xupdate is also supported but
 I had no time to hunt all the bugs out of it.

Thank you very much. I'll try it. I know XUpdate implementation is buggy in
Xindice, but I'll try it.




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Xindice logicsheet - initial success

2002-10-10 Thread Josema Alonso

 I've sent email. Why do you need xsp logicsheet and why don't you use
 xmldb protocol with cinclude? This works out of the box, with no effort.

I'm sorry Vadim, I've just browsed through the archives and I saw your
reply. I do not know why I haven't got it. It seems I have some problem with
my email box, cause now I'm getting today's messages from the list twice...

Anyway, I have read some of your previous replies regarding this subject.
Have tried the util logicsheet and it's working out of the box, even for
XPath queries. Great feature, thanks!
But what I would like to do is to edit, remove, update...documents in
Xindice. Since I'm still not so good at Java, I see very difficult to me to
write the proper action or generator needed to do it. So, I found the eXist
logicsheet documentation:
http://exist.sourceforge.net/xmldb.xsl.html

and I thought it was the best for me. Everything in a logicsheet. And it
lets me remove and add documents and collections, great. I couldn't test it
more but at least the get-collection and get-document are working for me
nicely.

Btw, where should I start looking if I want to create a new action or
generator for XUpdate as you suggested? Maybe at 'XMLDBGenerator.java' or
'XMLDBTransformer.java' better?

Oh, and currently I refer to my Xindice collections in the XSP like this:
xmldb:collection uri=xmldb:xindice://localhost:4080/db/addressbook/

But I'm not completely satisfied, cause it depends on my setup. What
if someone doesn't have Xindice running on port 4080, for example? So, is
there any way of referring to them through the pipeline matcher? Something
like: cocoon://xmldb/addressbook/

I've tried the later and it doesn't work for me.

Thank you very much.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Xindice logicsheet - initial success (howto written)

2002-10-10 Thread Josema Alonso

It sounds good to me. I was using it that way. But what about removing and
updating? The logicsheet lets you remove collections and documents.
Unfortunately it does not update.

Anybody knows where to start for some XUpdate transformer?

Oh, I put together all my efforts with the logicsheet at
http://outerthought.net/wiki/Wiki.jsp?page=XindiceLogicsheet

Best.


- Original Message -
From: Perry Molendijk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 1:25 AM
Subject: Re: Xindice logicsheet - initial success


 I have successfully used this to query Xindice through Cocoon. The first
 block is in sitemap.xmap of the cocoon distribution.

 map:match pattern=xpath type=request-parameter
  map:generate src=xmldb:xindice://localhost:4080/db/{../1}#{1}/
  map:serialize type=xml/
 /map:match



map:match pattern=mac-find
 map:act type=request
  map:parameter name=parameters value=true/
  map:generate src=cocoon:/xmldb/shakespear/?xpath={findThis}/
  map:serialize type=xml/
 /map:act
/map:match

 Perhaps this may not be the best way but it works a treat.

 Perry


 - Original Message -
 From: Vadim Gritsenko [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, October 10, 2002 7:02 AM
 Subject: Re: Xindice logicsheet - initial success


  Josema Alonso wrote:
 
  Dear Friends,
  
  Since I got no response to my previous email message,
  
 
  I've sent email. Why do you need xsp logicsheet and why don't you use
  xmldb protocol with cinclude? This works out of the box, with no effort.
 
  Vadim
 
 
   I tried it hard and I
  finally could make a xmldb logicsheet to work with Cocoon. It's the
eXist
  logicsheet. I could only try it for retrieving documents by now but it
 works
  as expected.
  I'm too tired now. It's been a lot of hours to make Xindice and the
  logicsheet work with Cocoon and I need some rest. I'll test more
tomorrow
  and I'll try to make a How-To. Now that Isee it running I must say it
  shoudn't be so hard...
  I hope I could understand better the whole Cocon Wiki thing and make it
  available there...if someone can help me a bit here...
  
  Best.
  
  ps: I've browsed carefully the archives and I read the mailing list
  frequently. I know there are still some people who can't make Xindice
 work
  with Cocoon. I understand you all... and I must say to all of you...it
 can
  be done! Don't give up! :-)
  
  
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Xindice logicsheet - initial success

2002-10-09 Thread Josema Alonso

Dear Friends,

Since I got no response to my previous email message, I tried it hard and I
finally could make a xmldb logicsheet to work with Cocoon. It's the eXist
logicsheet. I could only try it for retrieving documents by now but it works
as expected.
I'm too tired now. It's been a lot of hours to make Xindice and the
logicsheet work with Cocoon and I need some rest. I'll test more tomorrow
and I'll try to make a How-To. Now that Isee it running I must say it
shoudn't be so hard...
I hope I could understand better the whole Cocon Wiki thing and make it
available there...if someone can help me a bit here...

Best.

ps: I've browsed carefully the archives and I read the mailing list
frequently. I know there are still some people who can't make Xindice work
with Cocoon. I understand you all... and I must say to all of you...it can
be done! Don't give up! :-)




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




XIndice inside XSP (using eXist logicsheet), how?

2002-10-07 Thread Josema Alonso

Hello.

I have XIndice working with Cocoon. I followed the directions at
Cocooncenter and everything is going fine when requesting XMLDB URIs. Now
I'd want to have a XSP querying the database so I could encapsulate the DB
calls and pass parameters easily. I searched trough the archives and found
posts about the use of eXist logicsheet with XIndice inside Cocoon, but none
of them say anything about how to configure it.

I'm trying it but can't make it work. Has anybody tried and suceeded?

Oh, if you have any other solution or idea on how to make XIndice work
inside XSP, please let me know. I hope I could finally make it and write a
How-To. I really miss it.

Thanks.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: portal example doesn't work in current CVS?

2002-08-26 Thread Josema Alonso

Don't know what was wrong, maybe something went wrong when updating to
latest CVS, but it's working again after checking out today's head.

Best.

- Original Message -
From: Josema Alonso [EMAIL PROTECTED]
To: Cocoon-Users [EMAIL PROTECTED]
Sent: Sunday, August 25, 2002 1:45 AM
Subject: portal example doesn't work in current CVS?


 Hi, all.

 I'm using JDK 1.4, Tomcat 4.1.9, Windows XP.

 I downloaded the 2.1 CVS and built it a week ago. Everything worked fine.
 Since I believe it's better updating it frequently when working with these
 versions, today I updated via CVS, rebuilt it and the portal example does
 not work. The authentication one works ok.
 This is the error message I see:
 ---
 The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
notifies
 that java.lang.NullPointerException says:
 XMLUtil.getNodeListFromPath() did catch a NullPointerException.This might
be
 due to a missconfigured XML parser which does not use DOM Level 2.Make
sure
 that you use the XML parser shipped with Cocoon.

 More precisely:
 java.lang.NullPointerException: XMLUtil.getNodeListFromPath() did catch a
 NullPointerException.This might be due to a missconfigured XML parser
which
 does not use DOM Level 2.Make sure that you use the XML parser shipped
with
 Cocoon.
 ---

 I've read the archives and copied the xalan, xerces and xml-apis to the
 lib/endorsed directory on my JDK 1.4 with no luck. I do not know if it has
 something to do with it cause it worked previously without those jars
copied
 there...

 May anybody help me?

 Thanks.


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: sexy open source

2002-08-15 Thread Josema Alonso

Hi, All.
...
 * Regression Testing:
   JUnit (http://www.junit.org/)
   JXUnit (http://jxunit.sourceforge.net/)
   JMeter (http://jakarta.apache.org/jmeter)
...

I haven't seen testing frameworks for web applications mentioned, and maybe
it would be good to add these too:
Canoo Web Test (http://webtest.canoo.com/)
Anteater (http://aft.sourceforge.net/)
Cactus (http://jakarta.apache.org/cactus/)

Best.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




need advice on beginning a new Cocoon based project called XMTrader

2002-07-16 Thread Josema Alonso

Dear all,

Finally I could start a 100% Cocoon based project. I've been developing web
applications using scripting languages, mainly ASP on the server and
Javascript on the client, for some 4 years now. I always try to use them the
cleanest possible way; unfortunately it's always a mess at then end of the
project. Being the XML fan I am I should change to Cocoon or any other XML
framework someday :-)

This project is known as XMTrader - eXcellent Music Trader. This is not any
kind of P2P software.
I'm a music fan and I'm lately involved with some fan communities which want
to share legal music in a lossless format. The music sharing is done by way
of FTP servers maintained by individuals, where kind people store the files.
They are very concerned about security issues so these servers and some
communities are closed to the general public. FTP servers are usually
filtered by IP, user name and other variables, and accounts are only given
to people who have been introduced by some member of the community; though
anyone can ask for an account on any server. The contents or the server are
displayed on web pages that FTP admins must update by hand on a week by week
basis.

And here comes myself with a solution to automate those tasks. So these are
the goals this project should accomplish and how I think I could do them,
and this is where I need some expert advice:
1.- A portal for FTP admins, members of the community and general public.
This will let users communicate, ask FTP admins for accounts and see
listings of the content of FTP servers. The latter is the most important
feature of the project and is explained more in details below.
I think I could use the Portal  Authentication components and XMLForms for
this task. Since some parts of the web site should be protected and I'd need
to develop many pages with forms for the users to configure the site the way
they want.
2.- A look account will be created for all the servers. This account can
only see the contents of a server. Some kind of indexer should iterate
through all the servers and get their contents in a daily basis to show them
on the portal. So, members of the community could see there the contents,
even the contents of servers where they do not have an account created. But
his should be configured by every FTP admin in the portal.
My intention is to make a collection of XML files conforming to a XML
Schema. Every XML file should have the contents of one of the servers. I'll
query all of the servers once by day, maybe using some servlet and extending
the DirectoryGenerator (can I query remote directories?) and creating the
XML files locally, we are almost agreeing on a naming convention for the
directories and files. Then I should give users the chance of querying this
structure by server, artists, songs, etc. What should I use? XIndice,
Lucene???

This is just the beginning. After that I hope I could add more modules to
the application. We have tons of ideas on how to improve the day by day
community experience.

Well, that's all. Oh, what a long message...I'm sorry. I tried to explain it
in short...hope you could understand it and if not, please let me know what
I should explain more in detail.

Thank you very very much for reading.




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: need advice on beginning a new Cocoon based project called XMTrader

2002-07-16 Thread Josema Alonso

Dear all,

Please, excuse my double post. I do not what I did but it seems I sent it
twice from two different accounts. I'm sorry.

Best.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Feedback form for release comments

2002-07-13 Thread Josema Alonso

 Thanks to Konstantin Piroumian, we now have a form for
 release comments on the web site. You can access it via:

http://xml.apache.org/cocoon/feedback.html


It seems the form doesn't work properly. It seems it is using a mailto
action to an unknown address.
Error message I've just received:
---
Hi. This is the qmail-send program at apache.org.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

[EMAIL PROTECTED]:
Sorry, no mailbox here by that name. (#5.1.1)
---


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: Looking for help in the upcomming release - (i've tested it)

2002-07-11 Thread Josema Alonso

Dear Friends,

My name is Josema Alonso and I'm from Spain. Please, excuse my english if
sometimes I do not write something properly, but I always try to do my best.
I'm a Cocoon newbie. Well, not so. I used version 1.8 for some time and
learned a lot with it. Now I've been following this list for some three
months and finally I'm going to start a Cocoon project in a few days. You'll
hear from me about it...

I read Carsten message about the new release and I thought I could send my
first post, playing the beta tester role.
Though I see Konstantin is writing a form, I'm posting this here for you to
know, but will fill the form once ready, too.

I have installed:
- Windows XP Professional
- Tomcat 4.0.4
- Cocoon 2.0.3 CVS branch as stated in Carsten's message

THE GOOD
-
- I built it and installed in Tomcat without problems.
- I tried all the samples using IE6.0.2600.000 except the DELI ones and the
portal  authentication ones. Everything went fine excep the ones noted
below.

THE (NOT SO) BAD
---
- A couple things I would like to see fixed are just a couple links. I do
not remember if they were the same in previous versions.
After clicking the XSP examples or the Internationalization ones I have to
go back to the samples using the back button in my browser. Annoying in the
cacheable examples when you have to go back 5 times after testing all of
them. The 'back to samples' link is present in the JSP Reader sample, but
this one doen't work properly since it takes you to the
http://localhost:8080/cocoon page (assuming default installation, of
course).

- I reached an exception in the Python Generator. Probably I missed some
.jar cause I'e never used Python. Error trace at the end of the message.

- The 'Yahoo Screen Scrape' under Dynamic Content Examples did not work for
me. I just got a blank page.

- I did not test the portal and authentication samples since I only built
Cocoon using the 'clean' option. Should I try using
the -Dinclude.scratchpad.libs' option?


I think that's all. Hope it helps.

Best.





*** Python Generator Sample Error Trace ***

  An error occurred
  The org.apache.cocoon.www.sitemap_xmap notifies that
org.apache.cocoon.ProcessingException says:

  Exception in ScriptGenerator.generate()

  More precisely:

  org.apache.cocoon.ProcessingException: Exception in
ScriptGenerator.generate(): com.ibm.bsf.BSFException: unable to load
language: jpython


  extra info
  full exception chain stacktrace show
  Original exception : com.ibm.bsf.BSFException: unable to load
language: jpython
  at com.ibm.bsf.BSFManager.loadScriptingEngine(BSFManager.java:324)
  at com.ibm.bsf.BSFManager.exec(BSFManager.java:478)
  at
org.apache.cocoon.generation.ScriptGenerator.generate(ScriptGenerator.java:1
93)
  at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
  at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
  at
org.apache.cocoon.www.sitemap_xmap.matchN104D9(D:\Java\tomcat4.0.4\work\Stan
dalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java
:6184)
  at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\tomcat4.0.4\work\Standalo
ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:293
9)
  at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\tomcat4.0.4\work\Standalo
ne\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:250
4)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
  at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
  at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
  at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
org.apache.catalina.core.StandardContext.invoke