[article] xml.com: XML Forms, Web Services and Apache Cocoon

2003-01-30 Thread Ivelin Ivanov

XML Forms, Web Services and Apache Cocoon
http://www.xml.com/pub/a/2003/01/29/cocoon-xforms.html?page=last#thread


-=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: session timeout and XML Forms

2002-11-08 Thread Ivelin Ivanov

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 11:52 AM
Subject: session timeout and XML Forms



Hello,

   i have the following problem:

   I set my session timeout in the web.xml to 1 minute (only to try),
   but as soon as I am in my registration flow I am never loosing
   the session.
   I am using XML Forms with 
   If I change the scope to "request" the session times out after one
minute, but not
   if its set to "session".
   Is there always a new session crated in the session scope


[Ivelin] Yes, the framework will automatically create a new session if one
is not available, along with a new data model instance.
This behaviour is similar to Struts' implementation.




 or is it using its own session?
   Do I have to set the timeout then  differently?

   Thanx again for any help,


   miHam


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




session timeout and XML Forms

2002-11-07 Thread michael_hampel

Hello,

   i have the following problem:

   I set my session timeout in the web.xml to 1 minute (only to try),
   but as soon as I am in my registration flow I am never loosing
   the session.
   I am using XML Forms with  name="xmlform-scope" value="session" />
   If I change the scope to "request" the session times out after one minute, but not
   if its set to "session".
   Is there always a new session crated in the session scope or is it using its own session?
   Do I have to set the timeout then  differently?

   Thanx again for any help,


   miHam

XML Forms without JavaBeans

2002-10-21 Thread Alex Romayev
Hello,
 
I've looked through XMLForm documentation, but haven't really read it in 
detail yet. Quick question before I went off in the wrong direction.
 
I would like to build forms which whould save information to XML files 
rather than the database.  I would also like to use 
SourceWritingTransformer for that.  Would XMLForms framework still be 
applicable, i.e. do I have to use JavaBeans or can a pipeline segment with 
SourceWritingTrasformer be plugged in?
 
Thanks,
-Alex

RE: XML Forms and i18n

2002-07-29 Thread Piroumian Konstantin

> From: [EMAIL PROTECTED] 
> 
> Hello,
> 
>first I want to thank you for your great help in the last days.
>We have solved the problem now with your proposed
>solution: tagging the xml with a stylesheet.

Great to hear that.

Would you let us know when your application is ready and if't available
online? 
A small howto on multilingual XMLForm would be also fine.

Konstantin

>Our xml now looks like this:
> 
> 
>   
> 
>   
> 
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 
>   
> 
> 
>   
> 
> 
> Thanx again,
> 
>  miHam
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




XML Forms and i18n

2002-07-29 Thread michael_hampel

Hello,

   first I want to thank you for your great help in the last days.
   We have solved the problem now with your proposed
   solution: tagging the xml with a stylesheet.
   Our xml now looks like this:


  

  



  

  

  



  


  


Thanx again,

 miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Antwort: Re: Antwort: RE: XML Forms and i18n

2002-07-26 Thread Ivelin Ivanov


The fact that nested tags in assert messages aren't copied is a known bug in
the SchematronValidator. It uses jxptr.getValue() of the assert( or rule)
element which in turn returns the text() value of the XML element.
A text() value of an XML element does not include it's subelements.
Dmitri had a suggestion for fixing it.
Dmitri, can you please post your solution again since I lost it.

Interested to look into it?


Another option would be to write a trivial XSLT which acts against the
XMLForm namespace and replaces all  tags with 


  

  



then you can include this stylesheet in the pipeline. It acts independent
from the form document.



Ivelin




- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 8:50 AM
Subject: Antwort: Re: Antwort: RE: XML Forms and i18n


Hello,

   Yes, I tried this, but I don´t think that the i18n tags are copied with
the error message, as
   the translation is not working.
   I have the internationalisation running with the XML-form example.
   There it is quite easy , as you only have to alter the wizard2html.xml.
   In there you are doing something like
  if
  value-of select ="."

   I only wrap this with
  value-of select="."

   and run the i18n Transformer. This works fine.
   The problem is, that in the xml I have I would have to write a new
stylesheet for
   every xml file again to find the xf:violation tags as each xml file
differs a lot
   from another.
   To avoid this I tried to find an other solution.
   I of course agree that adding the i18n tag  in the FormTransormer is not
the
   best solution, but in my case it would not matter, because every error
message
   has to get translated.
   What I am trying now is to translate the error message in my
RegistrationAction, where
   I also do my customized validation.
   For this I am trying to use the functionality of the i18nTransormer and
the ResourceBundleFactory
   to find and to translate the messages.
   This of course will mean, that I can´t use Schematron validation anymore
and also it is not
   running yet:)
   So, maybe you have a hint how I could wrap the message in the
FormTransformer, if this would
   then be easier.


   Thanx again for any help,

   miHam


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




XML Forms and i18n

2002-07-26 Thread michael_hampel

Hello,

I was just trying to change the XMLFormTransformer to add an
 tag, when the Transformer is dealing with violations.
I tried the following in the startElementViolations method:

  1.) I tried to add the tag like this:

  // render  tag
super.startElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION, attributes );
 // set message
   String startInter = "";
String endInter = "";
String vm = nextViolation.getMessage();
   String result = startInter + vm + endInter;
super.characters( result.toCharArray(), 0, result.length());

super.endElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION);

  2.) and like this:

  INTER_PREFIX = "i18n"
  TAG_VIOLATION="text"
  Here I thought that I could create the i18n tag like the
xf:validation tag is created

  // render  tag
super.startElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION, attributes );
AttributesImpl emptyAttributes = new AttributesImpl();
super.startElement(null, null, INTER_PREFIX + ":" + TAG_INTER,
emptyAttributes);
String vm = nextViolation.getMessage();
super.characters( vm.toCharArray(), 0, vm.length());
super.endElement(null, null, INTER_PREFIX + ":" + TAG_INTER);
super.endElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION);

Both ways did not work. In the first case I got an error message like this:
  error_message
but it was not translated - so I think that there were no real tags.
The second case was ignored completely  - according to the log.

Maybe somebody can advise if I do this at the right place, or if I should
try somewhere else
or how the Transformer works regarding the super.startElement() - if this
is the way how
to add a new element to the xml or if this is done differently?

thanx again for any help,

miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




XML-Forms and i18n

2002-07-25 Thread michael_hampel

Hello,

I was just trying to change the XMLFormTransformer to add an
 tag, when the Transformer is dealing with violations.
I tried the following in the startElementViolations method:

  1.) I tried to add the tag like this:

  // render  tag
super.startElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION, attributes );
 // set message
   String startInter = "";
String endInter = "";
String vm = nextViolation.getMessage();
   String result = startInter + vm + endInter;
super.characters( result.toCharArray(), 0, result.length());

super.endElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION);

  2.) and like this:

  INTER_PREFIX = "i18n"
  TAG_VIOLATION="text"
  Here I thought that I could create the i18n tag like the
xf:validation tag is created

  // render  tag
super.startElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION, attributes );
AttributesImpl emptyAttributes = new AttributesImpl();
super.startElement(null, null, INTER_PREFIX + ":" + TAG_INTER,
emptyAttributes);
String vm = nextViolation.getMessage();
super.characters( vm.toCharArray(), 0, vm.length());
super.endElement(null, null, INTER_PREFIX + ":" + TAG_INTER);
super.endElement(uri, TAG_VIOLATION, NS_PREFIX + ":" +
TAG_VIOLATION);

Both ways did not work. In the first case I got an error message like this:
  error_message
but it was not translated - so I think that there were no real tags.
The second case was ignored completely  - according to the log.

Maybe somebody can advise if I do this at the right place, or if I should
try somewhere else
or how the Transformer works regarding the super.startElement() - if this
is the way how
to add a new element to the xml or if this is done differently?

thanx again for any help,

miHam




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: xml-forms

2002-07-22 Thread Piroumian Konstantin

> From: [EMAIL PROTECTED] 
> 
> Hello,
> 
>i have a new problem:)
>In my FormAction I want to send back a request parameter 
> with my page to
> use
>   this parameter in a xsl-stylesheet.
>   Therefore I tried the following:
>if(view == first)
>   if(cmd == next)
> request.setAttribute("show", "no");
> return(NEXT_PAGE);
> 
> 
> Then I would like to use this parameter in the stylesheet for 
> NEXT_PAGE.
> Am I doing here something completely wrong?

To use a parameter returned by an action as stylesheet parameter you should
do the following:
- add parameter value to a Map object (you can add it also to request
attributes if needed)
- return the Map from your action
- use that parameter as a transformer parameter using this syntax:

  




  

Konstantin

> 
> Thanks for any help,
> 
> miHam
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




xml-forms

2002-07-22 Thread michael_hampel

Hello,

   i have a new problem:)
   In my FormAction I want to send back a request parameter with my page to
use
  this parameter in a xsl-stylesheet.
  Therefore I tried the following:
   if(view == first)
  if(cmd == next)
request.setAttribute("show", "no");
return(NEXT_PAGE);


Then I would like to use this parameter in the stylesheet for NEXT_PAGE.
Am I doing here something completely wrong?

Thanks for any help,

miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: XML Forms again

2002-07-05 Thread Ivelin Ivanov



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 05, 2002 8:34 AM
Subject: XML Forms again


Hello,

>   another issue concerning XML-forms:
>   In the action  for the form processing, the method
>filterRequestParameters(..) should be used for validation that
>   exceeds Schematron validation.
>   Could someone please provide an example, or give an explanation how to
>use this method.
>   I don´t understand if I am supposed to do the validation within this
>method (but why then: "return false if the
>   request parameter should not be filtered), or if something happens
>according to the value returned?
>   What follows is then how to get error messages back?

You will use this method to tell XMLForm to *ignore* certain request
parameters when going through the automatic population and validation.
In most cases you don't need to override this method.

What kind of validation do you need to do which a Schematron schema can't
provide.
You can do additional custom validation in your perform() method.


>   Still I am wondering, if I can use the bean used for the model, outside
> of my FormAction or if it is only
>  possible to use it in this action.

A form and its model are stored in the servlet session or request. You can
get it with Form.lookup( YourFormId )
The XMLFormTransformer accesses the same Form as the action.


Ivelin



  Thanks again for any help!

   miHam



-
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: Antwort: Re: XML-Forms

2002-07-05 Thread Ivelin Ivanov

In your action which extends AbstractXMLFormAction, you need to do:

getForm().getModel().

Read the HOWTO:

http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html


Ivelin




- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 05, 2002 3:42 AM
Subject: Antwort: Re: XML-Forms


> Hello,
>
>I have another question concerning xmlForms:
>When I have finished my form processing and mapping to the Bean, I
would
> like to store the
>results in different databases.
>So, if I click "finish" on the last page I would have to call an
Action,
> which does the
>database storing for me.
>My question now: how do I access the Bean with all the information
> stored in my
>Action?
>Is the bean stored in the session and can I access it this way or is
> there
>another way?
>
>Thanks again for any help,
>
>miHam
>
>
>
> -
> 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]>




Antwort: Re: XML-Forms

2002-07-05 Thread michael_hampel

Hello,

   I have another question concerning xmlForms:
   When I have finished my form processing and mapping to the Bean, I would
like to store the
   results in different databases.
   So, if I click "finish" on the last page I would have to call an Action,
which does the
   database storing for me.
   My question now: how do I access the Bean with all the information
stored in my
   Action?
   Is the bean stored in the session and can I access it this way or is
there
   another way?

   Thanks again for any help,

   miHam



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: XML Forms again

2002-07-05 Thread Piroumian Konstantin

> From: [EMAIL PROTECTED] 
> 
> Hello,
> 
...
> 
>Still I am wondering, if I can use the bean used for the 
> model, outside
> of my FormAction or if it is only
>   possible to use it in this action.

The  indicates the
scope of your instance data (e.g. your bean), so if you set it to 'session'
then your bean should be available everywhere where the session is
available, until you remove it.

Konstantin

> 
>   Thanks again for any help!
> 
>miHam
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




RE: XML-Forms

2002-07-04 Thread Piroumian Konstantin

> From: [EMAIL PROTECTED] 
> 
> Hello,
> 
>Before I start working with the xml-form implementation in Cocoon,
>I want to find out if it is possible to use xml_form 
> together with the
>i18n Transformer to display
>   First Name
>in different languages:
>   firstName
> 
>Also, how can I use Internationalisation with Schematron 
> error messages?
>Will it work, if I specify the key of the message as the Schematron
> Error message
>   
>  Error121
> 
>   and in the xml File I do:
>   
>   
>   
> 
>   If this works when will I run the i18n Transformer - before 
> or after the
> XMLFormTransformer?
> 
>   Thanks very much for any help!!

To answer your question: I think that it should work the way you've
described. You should run i18n transformer after the XMLFormTransformer, so
it could translate also the violations.

You raise a very interesting issue. I've promised to make a sample of
multilanguage XML Form, but, unfortunately, have no free time at all now.
Please, let us know about the results and any problems that you encounter.

Konstantin

> 
>miHam
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




XML-Forms

2002-07-04 Thread michael_hampel

Hello,

   Before I start working with the xml-form implementation in Cocoon,
   I want to find out if it is possible to use xml_form together with the
   i18n Transformer to display
  First Name
   in different languages:
  firstName

   Also, how can I use Internationalisation with Schematron error messages?
   Will it work, if I specify the key of the message as the Schematron
Error message
  
 Error121

  and in the xml File I do:
  
  
  

  If this works when will I run the i18n Transformer - before or after the
XMLFormTransformer?

  Thanks very much for any help!!

   miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




XML-Forms

2002-07-04 Thread michael_hampel

Hello,

   Before I start working with the xml-form implementation in Cocoon,
   I want to find out if it is possible to use xml_form together with the
   i18n Transformer to display
  First Name
   in different languages:
  firstName

   Also, how can I use Internationalisation with Schematron error messages?
   Will it work, if I specify the key of the message as the Schematron
Error message
  
 Error121

  and in the xml File I do:
  
  
  

  If this works when will I run the i18n Transformer - before or after the
XMLFormTransformer?

  Thanks very much for any help!!

   miHam


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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