Re: Building a DOM Model with XMLForms

2002-10-13 Thread Ivelin Ivanov

Scott,

Your thoughts are quite logical.
The initial implementation of XMLForm looked very similar to what you
describe.
If you go back in CVS to February-March this year, you will see that
version.

Over time I was convinced by Torsten and Konstantin, that form processing
can involve a lot of business logic and access to multiple resources. This
usually involves non-trivial code which is expected to be secure, high
performing and readable.

Implementing validation with a Transformer and then deciding on the next
step with another transformer is applicable but for the most simple form
handling scenarios. It can easily stretch the limits of a sitemap's
responsibility, which is to organize content, not script business logic.

I suggest that you think of a way to implement the wizard demo with the
approach you suggest. If you can come up with a solution which will be
acceptable to the group, then you can go ahead with the implementation. I'd
be happy to apply the patch.

Otherwise you should partner with Robert, who is already down the path of
extending the currently implemented mechanism to support dynamic creation of
DOM models. See his posts in the last few days.


Thank you,

Ivelin





- Original Message -
From: Scott Schram [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 11:50 PM
Subject: Re: Building a DOM Model with XMLForms


 I've just begun looking at XMLForms, and I wonder if this makes any sense:

 When the client posts the XForm, we can start with a completely empty DOM
 which is filled in according to the XPath expressions in the XForm.

 This DOM starts a pipeline as, say, a PostedXFormGenerator.

 Then, there could be a basic validation component in this pipeline, which
 could include validation against a DTD or Schema.  If there's an error in
 this phase, it redisplays the form page with errors.

 The user can write custom validation components as well, and they would
 report errors in the same way.

 Any Cocoon component could be inserted here..., XSLT transform, Emailing,
 whatever.

 There would be at some point in the pipeline would be a component that
does
 the business logic with the posted data.  This component would be also be
 able to test for errors and send the form back for client redisplay with
 the errors in a similar fashion to that of the basic validator.

 Assuming everything was successful, it could create some output and
 serialize it, or transfer control to another pipeline which would make
some
 output.

 So, it would be XML pipelines both ways...  no beans at all, unless you
 want to make some using, say, the digester in the Apache commons, or grab
 the data out of the DOM with an XPath - bean property map.

 This might be immensely helpful in systems with hundreds of forms, or
where
 the information to be taken in on the form was dynamically generated by
the
 business logic, and the fields might not even be known until runtime.
(For
 example, a bugzilla or scarab application that has user configurable forms
 for reporting bugs on different projects.)

 It also picks up the advantages of all existing Cocoon components.

 What do you think?

 I'd be happy to help with this effort, as best I can given
 cocoon-beginner-status.

 ---

 With respect to DynaBeans in Struts, they're dynamic hash maps of property
 - value, but you still have to define all of the properties in the struts
 configuration file.  They act like beans, but only if you use the routines
 in the BeanUtils in the commons that were written to support them.

 There's a nice summary of DynaBeans here:

 http://www2.theserverside.com/resources/article.jsp?l=Struts1_1

 Scott

 A Form subclass (say DynaForm) which creates DOM nodes when not existant
 will be a good addition, but we have to document clearly that there is a
 danger in using it. If the document author mistypes an element name
 reference, it will be created automatically even if it weren't desired.
The
 current Form class is type safe in this regard.
 
  
   Well, I'm happy to spend a little time on this, especially if it might
   benefit others. I'll look into DynaBeans. Thanx for the pointer.
  
  



 
 http://schram.net


 -
 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: Building a DOM Model with XMLForms

2002-10-13 Thread Robert Ellis Parrott



On Sat, 12 Oct 2002, Ivelin Ivanov wrote:

 Robert,

 Sorry for the delayed reply.

 - Original Message -
 From: Robert Ellis Parrott [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, October 11, 2002 10:35 AM
 Subject: Building a DOM Model with XMLForms


 
  Hi folks,
 
 
  I'm working on a project prototype where I'm trying to implement a kind of
  wizard using XMLForms. The difference is that I'd like the XML docs
  written by the content people to define the resulting XML doc, without
  specifying it ahead of time. In other words, I'd like the elements 
  attributes to be built by the XPath commands that originate from the XForm
  ref attributes. I'm using 2.1-dev, a fairly fresh snapshot.
 
  The design of the Form class in Cocoon at this point is that all the
  elements must be present ahead of time, or one get silent failures
  (Invalid data format could be a little more descriptive when the failure
  is because there is no matching path).

 Actually there is a matching path. Try the demo and type a random string in
 a numeric field. The Ivalid data message will appear right next to the bad
 field.


My only point here is that the message is somewhat misleading. The
response from the Form class is Invalid data format, while the actual
error from JXPath is actually Cannot set property /somelement[0], the
target object is null, which is really a different error, not format of
data but the actual path itself. However,  don't think that the JXPath
Exceptions are fine-grained enough so that one can differentiate the two
errors without doing some sort of string matching of the JXPath error
message.



 This design makes sense when
  working with Beans as your Model, but could (should?) be more flexible
  with DOM; for example, if there is an either/or construct in your DTD
  ( !ELEMENT myelement (sub1 | sub2)  ), and each sub element complex, you
  can't ahead of time know how to generate a DOM object that will have a
  given element available to XPath.
 
  Would it make sense within the scope of XMLForms in Cocoon to add the
  ability within the the Form class to add new elements to the DOM object
  when they are missing? It seems that this should be fairly simple: just
  define an AbstractFactory for the DOM, and use it within the Form class
  whenenver an access to an element fails for a DOM. Where the
  AbstractFactory would come from etc is a good question, though.


 I think that it makes sense to add the extra logic in the Form class. It
 should be relatively lightweight operation.
 As you suggestion in the Bugzilla entry, you can use the JXPath API for
 this.

Right. I think the simplest approach would be a getJXContext() method. No
big change. Maybe the same with other private vars?


 
 
  The reason I ask is that alternatively I could use something like Castor
  to rebuild a Bean for the expected XML document, biting the bullet that I
  can't hand over full control of the XML creation to the content creators.
 
  If people think that it's a good idea and doable to allow XMLForms to
  build a DOM based on the XForms elements, then I
  would strongly consider working on these modifications; otherwise I would
  probably take the path of least resistance  go with a basic Bean
  approach.

 I think this is a good idea and I know that other people requested it
 before.
 It was actually a matter of resources until now.
 While working on this, please evaluate the DynaBeans in Struts 1.1 and see
 if we can borrow ideas from them.


Well, I'm happy to spend a little time on this, especially if it might
benefit others. I'll look into DynaBeans. Thanx for the pointer.


rob



-
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 to specify target.vm

2002-10-13 Thread Colin Paul Adams

 Scott == Scott Schram [EMAIL PROTECTED] writes:
Scott What happens if you type which java ?  Do you get an
Scott unexpected one installed by your linux distribution?

No. 1.4.1

Scott It looks like you're using an ant that came in some other
Scott package.  Perhaps that package is missing something.

Scott Why not try using ant 1.5.1 from
Scott http://jakarta.apache.org/ant/index.html

Scott Of course, make sure ANT_HOME and the path are set to the
Scott right ant.

Done. Makes no difference to either problem.
-- 
Colin Paul Adams
Preston Lancashire

-
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: XMLHTTP and cocoon [site map how to]

2002-10-13 Thread Cocoon User


i have succesfull write a js that create an xmlobject and then post it
using xmlhttp

i have too succesfull post this xml stream to .php and java servlet .
server side i just echo this stream and return this echo to js


how can i modify sitemap to make cocoon ready to receive this stream and
send a
responce back to js.

thanks
stavros s. kounis




On Tue, 1 Oct 2002, Giuseppe Bonelli wrote:

 Kounis,
 you have to insert the js snippet in a function and attach the function to whatever 
event you want. baseurl is a variable containing the url pointing to the map:match 
pattern=foo/bar in the cocoon sitemap.

 The data flow is as follow:
 1. a browser event triggers the js function
 2. the js function send the xml data to the cocoon sitemap
 3. the cocoon sitemap process the xml file through a source write transformer
 4. the cocoon map returns to the browser a status message (and eventually other 
generated xml)
 5. the js function exits

 Your mileage may vary, but the principle is this.

 --peppo

  -Original Message-
  From: Cocoon User [mailto:[EMAIL PROTECTED]]
  Sent: martedi 1 ottobre 2002 0.30
  To: [EMAIL PROTECTED]
  Subject: RE: XMLHTTP and cocoon [baseurl ?]
 
 
 
  thanx for the answer
 
  but can u give me an axample how to call this cocoon patern
 
  what's the baseurl?
 
 
 
 
  On Mon, 30 Sep 2002, Giuseppe Bonelli wrote:
 
   Here are a few snippets i use to exchange xml data from a
  client side js and cocoon2.
  
   My scenario is: the client browser save an xml file on the
  server using the source write transformer.
  
   If you need to echo the file back to the browser, just
  serialize it again, eventually after another transformation.
  
   Hope this helps
  
   --peppo
  
   The client side js snippet:
  
 {
 ...
 reqxml=the-xml-you-want-to-transfer-to-cocoon
 xmlhttp.open(POST, baseurl, false);
 xmlhttp.send(reqxml);
 var resxml=xmlhttp.responseXML;
 //alert(resxml.xml);
 if (!reqxml.documentElement) {
 alert(could not
  parse:\n\n+xmlhttp.responseText);
 return null;
 }
  
   // C2 error handling
 try {
 //check the response status
 var buf=resxml.documentElement;
  
  //alert(buf.childNodes.item(0).getAttribute(result));
 if
  (buf.childNodes.item(0).getAttribute(result) != success) {
 var errmsg =
  resxml.documentElement.text;
 if (!ignoreErrors)
  alert(Non e stato possibile salvare sul server il file.\n\n Il
  server ha risposto: +errmsg);
 return null;
 }
 else {
 var
  fname=resxml.documentElement.childNodes.item(0).getAttribute(src);
 var
  pos=fname.indexOf('xdocs/');
  
  fname=fname.slice(pos+6,fname.length-18);
 alert(Una nuova
  versione del file '+fname+.xml' e stata salvata con successo
  sul server\n\nBuona continuazione!);
 }
 } catch (e) {
 if (!ignoreErrors)
  alert(Server returned an error, but was not understood by the
  editor.\n\n);
 return null;
 }
   },
  
   in the sitemap:
  
 map:match pattern=save
   map:generate type=stream/
   map:transform type=write-source/
   map:serialize type=xml/
 /map:match
  
   NB: the error handling is done on the basis of the xml
  generated by the source write transformer used in the sitemap.
  See the docs for details.
  
  
-Original Message-
From: Cocoon User [mailto:[EMAIL PROTECTED]]
Sent: lunedi 30 settembre 2002 11.21
To: [EMAIL PROTECTED]
Subject: XMLHTTP and cocoon
   
   
hi folks
   
i have make an html form than post an XML file (object with
  javascript)
using XMLHTTP
   
is there any way in cocoon to receive this post an simple
  echo this XML
object in browser?
   
(if not cocoon a tomcat webapp)
   
i want to find a very simple example to test if i can transport an XML
object from a client (IE6) to the server where a cocoon and tomcat are
installed
   
   
thnx
   
Kounis Stavros
   
   
   
   
   
   
-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
   
To 

Re: Need to specify target.vm

2002-10-13 Thread Robert Ellis Parrott


Try setting $ANT_HOME and $JDK_HOME as well (and $TOMCAT_HOME if relevant
for that matter)

I built on 10/12/2002 OK, so perhaps just environment?


rob


On 13 Oct 2002, Colin Paul Adams wrote:

 Hello, I'm trying to install cocoon 2.1 from a CVS snapshot (Oct
 12th). JAVA_HOME points to a 1.4.1 j2sdk (from sun, for Linux). It's
 the only version of java I have installed (to my knowledge).

 When I tried the instructions for an automatic build, I got an error
 that ./lib/core/jvm1.3 was not found.

 After investigating, I find adding -Dtarget.vm=1.4 solves that one,
 but why is this necessary?

 Next problem:

 check-jars:
 Copying 1 file to /home/colin/xml-cocoon2/build/cocoon
 Processing /home/colin/xml-cocoon2/lib/jars.xml to 
/home/colin/xml-cocoon2/build/cocoon/jars.xml
 Loading stylesheet /home/colin/xml-cocoon2/tools/src/check-jars.xsl
 home/colin/xml-cocoon2/tools/src/check-jars.xsl:102:40: Warning!
   File ant_1_3-optional.jar appears in the lib/ directory, but is not declared in 
lib/jars.xml.

   Please update the lib/jars.xml file to include the ant_1_3-optional.jar file 
together with a description.
 : Fatal Error! Stylesheet directed termination
 : Fatal Error! Fatal error during transformation Cause: Fatal error during 
transformation
 Failed to process /home/colin/xml-cocoon2/lib/jars.xml

 BUILD FAILED
 file:/home/colin/xml-cocoon2/build.xml:2113: Fatal error during transformation

 Inspection shows that jars.xml is dated Sept 20, and the ant jars to
 way back in July. So I don't understand why this error hasn't been
 detected before.

 P.S. Would this kind of message be more apporpriate im cocoon-dev?
 --
 Colin Paul Adams
 Preston Lancashire

 -
 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: Need to specify target.vm

2002-10-13 Thread Scott Schram

At 01:12 AM 10/13/2002, you wrote:
 Robert I built on 10/12/2002 OK, so perhaps just environment?

Could be. If I type:

which ant

then it finds ant in the jwsdp/bin directory - that's ant 1.4.1, do I
need a different version?

What happens if you type which java ?  Do you get an unexpected one 
installed by your linux distribution?

It looks like you're using an ant that came in some other package.  Perhaps 
that package is missing something.

Why not try using ant 1.5.1 from http://jakarta.apache.org/ant/index.html

Of course, make sure ANT_HOME and the path are set to the right ant.

Scott




http://schram.net


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




[Q] Pipeline best practices

2002-10-13 Thread Ivelin Ivanov


Can someone point me to a document or briefly explain what are the best
practices to writing pipeline in regard of multiplicity.

For example how many pipelines in a sitemap are reasonable?
How do one chooses when to put multiple matchers in one pipeline vs
splitting them in separate pipelines.
What are the performance implications of (not) splitting components in
multiple pipelines?


-=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 Howto - not Working still

2002-10-13 Thread Ivelin Ivanov


There is a good chance that your package names or sitemaps are not quite
right.
Instead of typing the howto code,
start with the demo source code which works and change it for your taste.

- Original Message -
From: aps olute [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 9:57 AM
Subject: RE: XMLForm Howto - not Working still


 Reference my previous posting:
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103438719303078w=2
 Logs gathered from logs/sitemap.log hopefully this will assist in
 troubleshooting as the I get is stil get The requested URI
 /cocoon/samples/xmlform/howto-wizard.html was not found.

 DEBUG   (2002-10-12) 07:07.05:498   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/InvokeContext:
 Current Sitemap Parameters:
 PARAM: '2' VALUE: 'xmlform/howto-wizard.html'
 PARAM: '1' VALUE: 'samples'
 PARAM: '0' VALUE: 'samples/xmlform/howto-wizard.html'

 INFO(2002-10-12) 07:07.05:500   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/PreparableMatchNode:
 Matcher 'wildcard' matched prepared pattern '*/**' at
 file:/u01/t41xbeta/t419/webapps/cocoon/samples/sitemap.xmap:1001:30
 DEBUG   (2002-10-12) 07:07.05:501   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/InvokeContext:
 Current Sitemap Parameters:
 PARAM: '2' VALUE: 'howto-wizard.html'
 PARAM: '1' VALUE: 'xmlform'
 PARAM: '0' VALUE: 'xmlform/howto-wizard.html'

 INFO(2002-10-12) 07:07.05:502   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/PreparableMatchNode:
 Matcher 'wildcard' matched prepared pattern 'howto-wizard.html' at
 file:/u01/t41xbeta/t419/webapps/cocoon/samples/xmlform/sitemap.xmap:98:48
 DEBUG   (2002-10-12) 07:07.05:503   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/InvokeContext:
 Current Sitemap Parameters:
 PARAM: '0' VALUE: 'howto-wizard.html'

 DEBUG   (2002-10-12) 07:07.05:503   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.samples.xmlform.WizardAction from the pool.
 DEBUG   (2002-10-12) 07:07.05:503   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Put
 a org.apache.cocoon.samples.xmlform.WizardAction back into the pool.
 DEBUG   (2002-10-12) 07:07.05:504   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html) Thread-11/InvokeContext:
 Current Sitemap Parameters:
 PARAM: 'page' VALUE: 'start'
 PARAM: '../0' VALUE: 'howto-wizard.html'

 DEBUG   (2002-10-12) 07:07.05:504   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline
from the
 pool.
 DEBUG   (2002-10-12) 07:07.05:504   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: generators: ComponentSelector could
not
 find the component for hint [file]
 DEBUG   (2002-10-12) 07:07.05:505   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: generators: ComponentSelector could
not
 find the component for hint [file]
 DEBUG   (2002-10-12) 07:07.05:505   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.generation.FileGenerator from the pool.
 DEBUG   (2002-10-12) 07:07.05:505   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.transformation.XMLFormTransformer from the pool.
 DEBUG   (2002-10-12) 07:07.05:506   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: transformers: ComponentSelector
could not
 find the component for hint [xslt]
 DEBUG   (2002-10-12) 07:07.05:506   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: transformers: ComponentSelector
could not
 find the component for hint [xslt]
 DEBUG   (2002-10-12) 07:07.05:507   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.transformation.TraxTransformer from the pool.
 DEBUG   (2002-10-12) 07:07.05:507   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: transformers: ComponentSelector
could not
 find the component for hint [xslt]
 DEBUG   (2002-10-12) 07:07.05:507   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: transformers: ComponentSelector
could not
 find the component for hint [xslt]
 DEBUG   (2002-10-12) 07:07.05:508   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
Thread-11/ResourceLimitingPool: Got
 a org.apache.cocoon.transformation.TraxTransformer from the pool.
 DEBUG   (2002-10-12) 07:07.05:508   [sitemap]
 (/cocoon/samples/xmlform/howto-wizard.html)
 Thread-11/ExcaliburComponentSelector: serializers: ComponentSelector could
not
 find the component for hint [html]
 DEBUG   (2002-10-12) 07:07.05:508   

Re: Building a DOM Model with XMLForms

2002-10-13 Thread Robert Ellis Parrott


I believe that XMLForms are accessed by the pipeline via an Action
Component, based on AbstractXMLFormAction. This is the Component that can
 would handle most of what you are saying below. The Action taken by the
Action will depend on the command encoded in the request; one could, at
the end of many pages, have a submit command that will tell the Action to
validate, serialize, write to DB, email, etc.


The only problem I've found is that the data Model, into which info
entered into the form is written, must already be specified. This is
particularly a problem with the DOM object, since it may not be possible
to specify this ahead of time.


As for DynaBeans (which are now part of the Commons  not Struts, btw ),
it seems that support for them will happen as soon as JXPath has support
for them (which apparently is planned for v1.1). But I've just looked
quickly at DynaBeans; I don't know how easily, with a JXPath that supports
them, it would be to implement a dynamically built DynaBean with XMLForms.
I guess that that would depend on how the createPathAndSetValue() routines
work.


rob

On Sat, 12 Oct 2002, Scott Schram wrote:

 I've just begun looking at XMLForms, and I wonder if this makes any sense:

 When the client posts the XForm, we can start with a completely empty DOM
 which is filled in according to the XPath expressions in the XForm.

 This DOM starts a pipeline as, say, a PostedXFormGenerator.

 Then, there could be a basic validation component in this pipeline, which
 could include validation against a DTD or Schema.  If there's an error in
 this phase, it redisplays the form page with errors.

 The user can write custom validation components as well, and they would
 report errors in the same way.

 Any Cocoon component could be inserted here..., XSLT transform, Emailing,
 whatever.

 There would be at some point in the pipeline would be a component that does
 the business logic with the posted data.  This component would be also be
 able to test for errors and send the form back for client redisplay with
 the errors in a similar fashion to that of the basic validator.

 Assuming everything was successful, it could create some output and
 serialize it, or transfer control to another pipeline which would make some
 output.

 So, it would be XML pipelines both ways...  no beans at all, unless you
 want to make some using, say, the digester in the Apache commons, or grab
 the data out of the DOM with an XPath - bean property map.

 This might be immensely helpful in systems with hundreds of forms, or where
 the information to be taken in on the form was dynamically generated by the
 business logic, and the fields might not even be known until runtime.  (For
 example, a bugzilla or scarab application that has user configurable forms
 for reporting bugs on different projects.)

 It also picks up the advantages of all existing Cocoon components.

 What do you think?

 I'd be happy to help with this effort, as best I can given
 cocoon-beginner-status.

 ---

 With respect to DynaBeans in Struts, they're dynamic hash maps of property
 - value, but you still have to define all of the properties in the struts
 configuration file.  They act like beans, but only if you use the routines
 in the BeanUtils in the commons that were written to support them.

 There's a nice summary of DynaBeans here:

 http://www2.theserverside.com/resources/article.jsp?l=Struts1_1

 Scott

 A Form subclass (say DynaForm) which creates DOM nodes when not existant
 will be a good addition, but we have to document clearly that there is a
 danger in using it. If the document author mistypes an element name
 reference, it will be created automatically even if it weren't desired. The
 current Form class is type safe in this regard.
 
  
   Well, I'm happy to spend a little time on this, especially if it might
   benefit others. I'll look into DynaBeans. Thanx for the pointer.
  
  



 
 http://schram.net


 -
 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: Aggregation of xml in a directory

2002-10-13 Thread Alex McLintock


Alex McLintock wrote:
I am trying to figure out how to get Cocoon to display all the xml files 
in a directory without being explicitly told each of their names in the 
sitemap.
I guess I need a combination of the Directory Generator and the 
Aggregation tools.
At 14:34 12/10/02, Steven Noels wrote:
Better: combine the DirectoryGenerator with the CInclude Transformer.


Thanks for the suggestion Steven. What I have done is to write a perl 
script which I run whenever the xml files are updated. This generates an 
XML file which includes all the others in the directory. So in the end I 
don't use DirectoryGenerator or Aggregation in Cocoon - but CInclude works 
fine.

(I better figure out CachingCInclude too.)

Alex





Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


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

2002-10-13 Thread Piroumian Konstantin

 From: Alex Romayev [mailto:[EMAIL PROTECTED]] 
 
 Hello,
 
 Just wanted to follow through on the discussion from a
 couple of month back.  There was a proposal that
 Konstantin was going to work on to implement i18:when
 tag as an alternative to using message files, so that
 you could have in the same file something like:

Yes, that's true. 
And it was implemented by Matthieu Sozeau as we discussed. As the
implementation was done long time ago (several months) it needs
synchronization with the current version of Cocoon, but I hadn't time to do
it. Though, if anybody needs the full implementation with updated samples
and dictionary handling, just let me know (kpiroumian at apache dot org).

 
 page
   title
 i18:when locale='en'hello/i18n:when
 i18n:when locale='fr'bonjour/i18n:when
   /title
 /page

But note, that this is not an alternative to message bundles, but an
addition. You can still have all the pages generated from a bundle, but
provide some specific messages for a particular language. 

 
 Now here is my question (I'm making some assumptions
 here, so please correct me if I'm wrong):
 
 I18nTransformer is not cacheable, which generally is
 not a problem, since it is used as one of the last
 transformers in a pipeline, when most of the
 heavy-duty processing is already done.  Now, this
 might not be true for i18n:when tag, which is most
 likely to be the first step in a pipeline and hence
 the rest of the pipleline is not going to get cached. 
 Also note, that there is no reason why the result of
 i18n:when could not be cached.

So seems that i18n transformer can be cached based on the selected locale
and cache validity of the used dictionary. I have to think about it, but
again I have absolutely no time to work on it, sorry.

 
 Is this concern valid or am I missing something?

Seems reasonable and not only for the i18n:when case.

Regards,
  Konstantin

 
 Cheers,
 -Alex
 
 -
 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]




Need to specify target.vm

2002-10-13 Thread Colin Paul Adams

Hello, I'm trying to install cocoon 2.1 from a CVS snapshot (Oct
12th). JAVA_HOME points to a 1.4.1 j2sdk (from sun, for Linux). It's
the only version of java I have installed (to my knowledge).

When I tried the instructions for an automatic build, I got an error
that ./lib/core/jvm1.3 was not found.

After investigating, I find adding -Dtarget.vm=1.4 solves that one,
but why is this necessary?

Next problem:

check-jars:
Copying 1 file to /home/colin/xml-cocoon2/build/cocoon
Processing /home/colin/xml-cocoon2/lib/jars.xml to 
/home/colin/xml-cocoon2/build/cocoon/jars.xml
Loading stylesheet /home/colin/xml-cocoon2/tools/src/check-jars.xsl
home/colin/xml-cocoon2/tools/src/check-jars.xsl:102:40: Warning! 
  File ant_1_3-optional.jar appears in the lib/ directory, but is not declared in 
lib/jars.xml.

  Please update the lib/jars.xml file to include the ant_1_3-optional.jar file 
together with a description.
: Fatal Error! Stylesheet directed termination
: Fatal Error! Fatal error during transformation Cause: Fatal error during 
:transformation
Failed to process /home/colin/xml-cocoon2/lib/jars.xml

BUILD FAILED
file:/home/colin/xml-cocoon2/build.xml:2113: Fatal error during transformation

Inspection shows that jars.xml is dated Sept 20, and the ant jars to
way back in July. So I don't understand why this error hasn't been
detected before.

P.S. Would this kind of message be more apporpriate im cocoon-dev?
-- 
Colin Paul Adams
Preston Lancashire

-
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: Building a DOM Model with XMLForms

2002-10-13 Thread Ivelin Ivanov

Robert,

Sorry for the delayed reply.

- Original Message -
From: Robert Ellis Parrott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 10:35 AM
Subject: Building a DOM Model with XMLForms



 Hi folks,


 I'm working on a project prototype where I'm trying to implement a kind of
 wizard using XMLForms. The difference is that I'd like the XML docs
 written by the content people to define the resulting XML doc, without
 specifying it ahead of time. In other words, I'd like the elements 
 attributes to be built by the XPath commands that originate from the XForm
 ref attributes. I'm using 2.1-dev, a fairly fresh snapshot.

 The design of the Form class in Cocoon at this point is that all the
 elements must be present ahead of time, or one get silent failures
 (Invalid data format could be a little more descriptive when the failure
 is because there is no matching path).

Actually there is a matching path. Try the demo and type a random string in
a numeric field. The Ivalid data message will appear right next to the bad
field.

This design makes sense when
 working with Beans as your Model, but could (should?) be more flexible
 with DOM; for example, if there is an either/or construct in your DTD
 ( !ELEMENT myelement (sub1 | sub2)  ), and each sub element complex, you
 can't ahead of time know how to generate a DOM object that will have a
 given element available to XPath.

 Would it make sense within the scope of XMLForms in Cocoon to add the
 ability within the the Form class to add new elements to the DOM object
 when they are missing? It seems that this should be fairly simple: just
 define an AbstractFactory for the DOM, and use it within the Form class
 whenenver an access to an element fails for a DOM. Where the
 AbstractFactory would come from etc is a good question, though.


I think that it makes sense to add the extra logic in the Form class. It
should be relatively lightweight operation.
As you suggestion in the Bugzilla entry, you can use the JXPath API for
this.



 The reason I ask is that alternatively I could use something like Castor
 to rebuild a Bean for the expected XML document, biting the bullet that I
 can't hand over full control of the XML creation to the content creators.

 If people think that it's a good idea and doable to allow XMLForms to
 build a DOM based on the XForms elements, then I
 would strongly consider working on these modifications; otherwise I would
 probably take the path of least resistance  go with a basic Bean
 approach.

I think this is a good idea and I know that other people requested it
before.
It was actually a matter of resources until now.
While working on this, please evaluate the DynaBeans in Struts 1.1 and see
if we can borrow ideas from them.


Thank you,

Ivelin





 thanx for your input,


 rob




 -
 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: Need to specify target.vm

2002-10-13 Thread Colin Paul Adams

 Robert == Robert Ellis Parrott [EMAIL PROTECTED] writes:
Robert Try setting $ANT_HOME and $JDK_HOME as well (and

To what? What are they supposed to achieve?

Robert $TOMCAT_HOME if relevant for that matter)
Well, I'm using tomcat 4, and CATALINA_HOME is set. (As is JAVA_HOME -
what is JDK_HOME for? and run.sh specifically unsets ANT_HOME).

Robert I built on 10/12/2002 OK, so perhaps just environment?

Could be. If I type:

which ant

then it finds ant in the jwsdp/bin directory - that's ant 1.4.1, do I
need a different version?
-- 
Colin Paul Adams
Preston Lancashire

-
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: Aggregation of xml in a directory

2002-10-13 Thread Jeff Turner

On Sat, Oct 12, 2002 at 02:08:16PM +0100, Alex McLintock wrote:
 Hi folks,
 
 I am trying to figure out how to get Cocoon to display all the xml files in 
 a directory without being explicitly told each of their names in the 
 sitemap.

Have a look at the XPathDirectoryGenerator in the scratchpad. With it,
you can generate a directory listing, with a node extracted from each
file. Eg, I used it to extract description elements from a list of Ant
scripts:

http://aft.sourceforge.net/examples/

The relevant config was:

map:sitemap ..
  map:components ..
map:generators ..
  map:generator  name=xpathdirectory
src=org.apache.cocoon.generation.XPathDirectoryGenerator/

  .
  !-- examples/index.html, listing all scripts --
  map:match pattern=examples/index.xml
map:generate type=xpathdirectory
  src=content/xdocs/examples#/project/description/
map:transform
  src=resources/stylesheets/antdirectory2document.xsl/
map:serialize type=xml/
  /map:match


--Jeff


 I guess I need a combination of the Directory Generator and the Aggregation 
 tools.
 
 I am not too worried about the order of the files otherwise I would have to 
 use an XML database - which I would like to avoid if possible.
 
 PS I have looked in the Langham/Ziegeler book but can't find anything 
 useful.
 
 Do I need to write a DirectoryAggregation Generator in Java? perhaps others 
 would find it useful too.
 
 Alex

-
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: [Q] Pipeline best practices

2002-10-13 Thread Reinhard Poetz

Hi Ivelin,

 -Original Message-
 From: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, October 13, 2002 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: [Q] Pipeline best practices


 For example how many pipelines in a sitemap are reasonable?
 How do one chooses when to put multiple matchers in one pipeline vs
 splitting them in separate pipelines.

Some of the reasons are:

 - different error handling
 - different types of pipelines (caching, profiling)
 - internal-only use
 - the use of different expires attribute

Does anybody know some other reasons? As far as I know there is no
difference in performance.

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]




DO NOT REPLY [PATCH QUEUE] Summary October 13 2002

2002-10-13 Thread nicolaken

---
 This mail is generated automatically using
 Jakarta Ant. Contents are automatically
 downloaded from Apache's Bugzilla.
---
 Please do not reply to this mail.
---

***
COCOON PATCH QUEUE UPDATE
 
patches in queue:  20 
***


---
9075:[PATCH] Contribution of SAP R/3(r) connectivity components
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9075

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
9728:[PATCH] CocoonServlet getClassPath() enhancements Tomcat4
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9728

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
10208:[PATCH]/[RT] Aggregation and Error Conditions (file not foun
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10208

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
11518:[PATCH] Can't use input-module sitemap param with other para
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11518

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
11533:[PATCH] Replacement for AvalonToCocoonSource
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11533

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
11549:[PATCH] Replace LogKitManageable through LoggerManageable
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11549

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
11727:[PATCH] lib/core/ - lib/*/ in build.sh and built.bat
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11727

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12115:[PATCH]NPE in AbstractCachingProcessingPipeline.java
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12115

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12235:[PATCH] XPathTransformer
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12235

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12673:[PATCH] Crawler fix: interpret  as index.html
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12673

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12738:[PATCH] iTextSerializer block
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12738

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12922:[PATCH] Fixes to URLs of Sitemap Builder (Scratchpad)
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12922

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
12975:[PATCH] POI block
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12975

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
13070:[PATCH] Add a new tag xsp-session:getxml to XSP
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13070

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW
---
13163:[PATCH] TextSerializer should use text/plain MIME type inste
---
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13163

REVIEWER:[EMAIL PROTECTED]
RESOLUTION:  
STATUS:  NEW

Re: Need to specify target.vm

2002-10-13 Thread Colin Paul Adams

 Robert == Robert Ellis Parrott [EMAIL PROTECTED] writes:

Robert I built on 10/12/2002 OK, so perhaps just environment?

 check-jars: Copying 1 file to
 /home/colin/xml-cocoon2/build/cocoon Processing
 /home/colin/xml-cocoon2/lib/jars.xml to
 /home/colin/xml-cocoon2/build/cocoon/jars.xml Loading
 stylesheet /home/colin/xml-cocoon2/tools/src/check-jars.xsl
 home/colin/xml-cocoon2/tools/src/check-jars.xsl:102:40:
 Warning!  File ant_1_3-optional.jar appears in the lib/
 directory, but is not declared in lib/jars.xml.
 
 Please update the lib/jars.xml file to include the
 ant_1_3-optional.jar file together with a description.  : Fatal
 Error! Stylesheet directed termination : Fatal Error! Fatal
 error during transformation Cause: Fatal error during
 transformation Failed to process
 /home/colin/xml-cocoon2/lib/jars.xml
 
 BUILD FAILED file:/home/colin/xml-cocoon2/build.xml:2113: Fatal
 error during transformation
 
 Inspection shows that jars.xml is dated Sept 20, and the ant
 jars to way back in July. So I don't understand why this error
 hasn't been detected before.
 

How? check-jars.xml says the following:

!--

 Simple stylesheet to verify that files defined in lib/jars.xml
 actually appear in the lib/ directory, and vice-versa, that files
 that appear in the lib/ directory have an entry with a
 description in the lib/jars.xml file.

 Author: Ovidiu Predescu [EMAIL PROTECTED]
 Date: May 22, 2002

--

and that clearly isn't the case with the sources in CVS. So the build
has to fail. No?

-- 
Colin Paul Adams
Preston Lancashire

-
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 to specify target.vm

2002-10-13 Thread Colin Paul Adams

Well, to answer my own question, I had an old .ant.properties file
lying around from about a year ago. Oh well ...
-- 
Colin Paul Adams
Preston Lancashire

-
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: Sitemap question

2002-10-13 Thread Miles Elam

Miles Elam wrote:

 Is there any particular reason why subsitemaps must redefine 
 components instead of inheriting the parent's component definitions 
 and defaults? Seems quite redundant to me.

Let me restate the question.  I noticed that the sitemap isn't 
inheriting things it should be.  I also noticed that in the archives, 
people were running into a problem that was solved by adding a 
hasComponent method to the ExtendedComponentSelector object.

I've been using HEAD for my work (I'm playing with the flowmap among 
other things) and would like folks to know that on my setup, the 
subsitemaps (a) don't take the component definitions from the parent 
sitemap even though it has the appropriate hasComponent method and (b) 
the subsitemap will not reload when changed even though check-reload is 
set to yes, reload-method is set to synchron.  Reloading will happen 
if I touch the root sitemap however.

Just thought folks should know...

FYI: Debian testing / Athlon 1GHz / 256MB RAM
 JDK 1.4.0 / Tomcat 4.1.12-LE-jdk1.4

- Miles Elam


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




Possible with XSPs?

2002-10-13 Thread Sonny Sukumar


Hi guys,

Is it possible to access request parameters from within an XSP or logicsheet?

For example, when I go to http://localhost:8080/cocoon/test?param=12345678 I'd like to 
use the value of param in my XSP or logicsheet as a basis for calling Java functions.

In my pipeline, I currently just have the XSP as the generator and 1 XSL stylesheet to 
output to HTML.  I think I could introduce another XSL stylesheet before this one 
which has use-request-paramters set to true and get the param that way, but it seems 
like it'd be slower to do 2 transforms with 2 separate stylesheets rather than 1 
transform with 1 stylesheet.

Thanks!

Sonny

_
Conserve wilderness with a click (free!) and get your own EcologyFund.net email 
(free!) at http://www.ecologyfund.com.

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP  more! http://www.everyone.net/selectmail?campaign=tag

-
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: Possible with XSPs?

2002-10-13 Thread Antonio Gallardo Rivera

El Domingo, 13 de Octubre de 2002 17:26, Sonny Sukumar escribió:
 Hi guys,

 Is it possible to access request parameters from within an XSP or
 logicsheet?

Yes, you can, for more info: 
http://xml.apache.org/cocoon/userdocs/xsp/request.html


 For example, when I go to http://localhost:8080/cocoon/test?param=12345678
 I'd like to use the value of param in my XSP or logicsheet as a basis for
 calling Java functions.

You can do it using:
xsp:logic
String sParam = xsp-request:get-parameter name=param default=/;
/xsp:logic

Rememeber to declare your namespace in you XSP:
xmlns:xsp-request=http://apache.org/xsp/request/2.0;


 In my pipeline, I currently just have the XSP as the generator and 1 XSL
 stylesheet to output to HTML.  I think I could introduce another XSL
 stylesheet before this one which has use-request-paramters set to true and
 get the param that way, but it seems like it'd be slower to do 2 transforms
 with 2 separate stylesheets rather than 1 transform with 1 stylesheet.

 Thanks!

 Sonny

Antonio Gallardo

 _
 Conserve wilderness with a click (free!) and get your own EcologyFund.net
 email (free!) at http://www.ecologyfund.com.

 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
 Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag

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




Action example

2002-10-13 Thread Hong Gia Dinh
Title: Action example





Hi 
I am new to Cocoon, i use and find it pretty nice, and i find i like it
but just one scope i cant figure out and not yet use it . it is 'action' application
where can i find a simple example of using 'action'?
because the cocoon specification mainly show how to write own action!!


thanks
Dinh





XMLForm - VoiceXML

2002-10-13 Thread apurva zaveri

This is a serious problem about the use of XMLForm in
VoiceXML. While experimenting with XMLForm to generate
VoiceXML this a problem that I faced.

Since in XMLForm all the name of the fields begins
with / in HTML 

select name=/city is not a problem

while in VXML

field name=/city is an error.

What can be done?

-Apurva Zaveri



__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.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]




Re: [Q] Pipeline best practices

2002-10-13 Thread Markdelanoy

Another issue of having too  many pipelines.  As i understand in the sitemap is 
generated into a java class.  And the various matchers within a pipeline(s) are really 
a bunch of if-else if statements.  So the more matchers you have (to match to a 
pipeline or various paths within a pipeline) your going to have a large series of 
if/else statements.  And... since this uses string compares and wildcards and... if 
there's alot of these if else if statements it will lead to performance issues.

It may help to break things up with sub site maps to help limit the searching.

Or put the most likely pipelines to get hit first and the least likely last...


In a message dated Sun, 13 Oct 2002 18:03:02 +0200, [EMAIL PROTECTED] writes:

 
 
 Hi Ivelin,
 
  -Original Message-
  From: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, October 13, 2002 4:25 PM
  To: [EMAIL PROTECTED]
  Subject: [Q] Pipeline best practices
 
 
  For example how many pipelines in a sitemap are reasonable?
  How do one chooses when to put multiple matchers in one pipeline vs
  splitting them in separate pipelines.
 
 Some of the reasons are:
 
 - different error handling
 - different types of pipelines (caching, profiling)
 - internal-only use
 - the use of different expires attribute
 
 Does anybody know some other reasons? As far as I know there is no
 difference in performance.
 
 Regards,
 Reinhard
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting.  TITLE=http://xml.apache.org/cocoon/faq/index.html 
TARGET=_blankhttp://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]




Cocoon2.0 with JBoss-2.4.7_Tomcat-4.0.4

2002-10-13 Thread Niket Anand

Hello all,
I have successfully integrated Cocoon-2.0 with JBoss-2.4.7_Tomcat-4.0.4 and
it is working fine.
I have properly made ear file containing EJB jar file and cocoon folders as
war file.
If I need to change any XSP and other classes then How will it work without
redeploying all stuffs.
I change an XSP in Catalina_Home/webapps/cocoon folder but not able to see
changes while running server again. If I redeploy all stuff with modified
xsp file then only it show changes.
Please suggest how can I make changes in XSP and classes without making ear
files and redeploying again and again, once it is deployed once.

Thanks,
Niket



-
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: [Q] Pipeline best practices

2002-10-13 Thread Geoff Howard

--- [EMAIL PROTECTED] wrote:
 It may help to break things up with sub site maps to
 help limit the searching.
 
 Or put the most likely pipelines to get hit first
 and the least likely last...
 

After reading Stefano's thread on dev (?) regarding
the profiling work he did revealing that matching may
be the most expensive operation, I've been thinking
along these exact lines.  The second one certainly
seems to be the easiest to apply.  Seems like search
algorithm ideas apply here too - you want to get to a
match in the least number of decisions possible, so
either subsitemaps, or nested matchers seem the best
ways to implement a good decision tree.  Seems like
laying out url space can help this.

Question: wouldn't in theory subsitemaps carry more
overhead than nested matchers?  Of course there are
many reasons to use them any way but this would be a
factor in deciding when.

I don't see any benefit (besides different
configurations as mentioned) of multiple pipeline
sections, unless each one has a small number of top
level matchers that can help eliminate all options
quickly.

Geoff Howard

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.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]




Re: Possible with XSPs?

2002-10-13 Thread Antonio Gallardo Rivera

What version of Cocoon are you using?

I am using the lastest CVS and its works fine for me.

Just see the default value:

xsp:logic
String productId = xsp-request:get-parameter name=productid default=/;
   
^
/xsp:logic

Antonio Gallardo

El Domingo, 13 de Octubre de 2002 21:57, Sonny Sukumar escribió:
 Hi,

 I included the xsp-request namespace in my XSP and then put in the code:

 xsp:logic
  String productId = xsp-request:get-parameter name=productid/;
 /xsp:logic

 This code is right above my root document element.  I get this error when I
 try running it by going to
 http://localhost:8080/cocoon/test?productid=12345678:

 org.apache.cocoon.ProcessingException: Language Exception:
 org.apache.cocoon.components.language.LanguageException: Error while
 instantiating org/apache/cocoon/www/products_xsp:
 java.lang.NullPointerException

 The product with productid 12345678 exists in my backend database and the
 code works fine when I hardcode the value into my XSP, rather than trying
 to get it as a parameter.

 Any idea what I'm doing wrong?

 Thanks again,

 Sonny

 --- Antonio Gallardo Rivera [EMAIL PROTECTED] wrote:
 El Domingo, 13 de Octubre de 2002 17:26, Sonny Sukumar escribi=F3:
  Hi guys,
 
  Is it possible to access request parameters from within an XSP or
  logicsheet?
 
 Yes, you can, for more info:=20
 http://xml.apache.org/cocoon/userdocs/xsp/request.html
 
  For example, when I go to
  http://localhost:8080/cocoon/test?param=3D12345=
 
 678
 
  I'd like to use the value of param in my XSP or logicsheet as a basis
  for calling Java functions.
 
 You can do it using:
 xsp:logic
  String sParam =3D xsp-request:get-parameter name=3Dparam
  default=3D/; /xsp:logic
 
 Rememeber to declare your namespace in you XSP:
 xmlns:xsp-request=3Dhttp://apache.org/xsp/request/2.0;
 
  In my pipeline, I currently just have the XSP as the generator and 1 XSL
  stylesheet to output to HTML.  I think I could introduce another XSL
  stylesheet before this one which has use-request-paramters set to true
  and get the param that way, but it seems like it'd be slower to do 2
  transfor=
 
 ms
 
  with 2 separate stylesheets rather than 1 transform with 1 stylesheet.
 
  Thanks!
 
  Sonny
 
 Antonio Gallardo
 
  _
  Conserve wilderness with a click (free!) and get your own
  EcologyFund.net email (free!) at http://www.ecologyfund.com.
 
  _
  Select your own custom email address for FREE! Get [EMAIL PROTECTED]
  w/No Ads, 6MB, POP  more!
  http://www.everyone.net/selectmail?campaign=3Dtag
 
  -
  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]

 _
 Conserve wilderness with a click (free!) and get your own EcologyFund.net
 email (free!) at http://www.ecologyfund.com.

 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
 Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag

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




Escape characters in ESQL

2002-10-13 Thread Katzigas Dimitris

Hi there,

I want to execute this query over an Oracle database.

alter session set nls_date_format=DD/MM/

the code fragment from my XSP file is shown below.

esql:execute-query
  esql:query
 alter session set nls_date_format=DD/MM/
  /esql:query
/esql:execute-query

This of course doesn't work because i have to escape the double quotes and
maybe the slashes, i don't know.
Even if i use the quot; instead of the  it doesn't work either.

Does anyone has any ideas on this?

Thank you 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: Possible with XSPs?

2002-10-13 Thread Katzigas Dimitris

I think that your code is OK.

 xsp:logic
  String productId = xsp-request:get-parameter name=productid/;
 /xsp:logic

 This code is right above my root document element

But i think that you have to put the whole xsp:logic fragment inside your
root element. I think that in order to use the xsp-request:xx tag it
has to be inside your root element.

I Hope that will help.

Dimitris Katzigas


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




AW: Action example

2002-10-13 Thread Sternath Elmar
Title: Action example



In the 
cocoon docs there is a nice example how to create AND use 
actions:
http://xml.apache.org/cocoon/userdocs/concepts/actions.html
Inside 
an action, you put key/value pairs into a hashmap which you can then access 
inside the corresponding act/act tags in your 
pipeline.
-Ursprüngliche Nachricht-Von: Hong Gia Dinh 
[mailto:[EMAIL PROTECTED]]Gesendet: Montag, 14. Oktober 2002 
03:50An: [EMAIL PROTECTED]Betreff: Action 
example

  Hi I am new to Cocoon, i use and find 
  it pretty nice, and i find i like it but just one 
  scope i cant figure out and not yet use it . it is 'action' application 
  where can i find a simple example of using 'action'? 
  because the cocoon specification mainly show how to write own 
  action!! 
  thanks Dinh 



Re: Possible with XSPs?

2002-10-13 Thread Antonio Gallardo Rivera

Its the syntaxis of XSP ;)

Antonio Gallardo

El Lunes, 14 de Octubre de 2002 00:00, Sonny Sukumar escribió:
 Aha! That fixed it.  I'd love to know why one can only use xsp-request
 elements inside the document (root element).  Anyone know?

 --- Katzigas Dimitris [EMAIL PROTECTED] wrote:
 I think that your code is OK.
 
  xsp:logic
   String productId = xsp-request:get-parameter name=productid/;
  /xsp:logic
 
  This code is right above my root document element
 
 But i think that you have to put the whole xsp:logic fragment inside
  your root element. I think that in order to use the xsp-request:xx
  tag it has to be inside your root element.
 
 I Hope that will help.
 
 Dimitris Katzigas

 _
 Conserve wilderness with a click (free!) and get your own EcologyFund.net
 email (free!) at http://www.ecologyfund.com.

 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
 Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag

 -
 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: Possible with XSPs?

2002-10-13 Thread Sonny Sukumar


Aha! That fixed it.  I'd love to know why one can only use xsp-request elements inside 
the document (root element).  Anyone know?

--- Katzigas Dimitris [EMAIL PROTECTED] wrote:
I think that your code is OK.

 xsp:logic
  String productId = xsp-request:get-parameter name=productid/;
 /xsp:logic

 This code is right above my root document element

But i think that you have to put the whole xsp:logic fragment inside your
root element. I think that in order to use the xsp-request:xx tag it
has to be inside your root element.

I Hope that will help.

Dimitris Katzigas

_
Conserve wilderness with a click (free!) and get your own EcologyFund.net email 
(free!) at http://www.ecologyfund.com.

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP  more! http://www.everyone.net/selectmail?campaign=tag

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