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 Ludovic de Beaurepaire
Why don't you use in you second test the 'parameter-selector-test' attribute
?

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

Ludovic

- Original Message -
From: Josema Alonso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 08, 2002 9:23 AM
Subject: RE: nested map:select type=parameter in sitemap are not working


 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]





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