You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hill Karimov <hi...@yahoo.com> on 2003/06/17 12:36:00 UTC
get request attribute in sitemap
Hi all,
Is possible to get request attribute in sitemap?
some like to get request parameter:
<map:match pattern="delete_account.html">
<map:act set="process">
<map:parameter name="descriptor"
value="descriptors/form_account.xml"/>
</map:act>
<!-- ??? some like it -->
<map:act type="request">
<map:parameter name="attributes"
value="true"/>
<map:redirect-to
uri="account.html?account={my_request_attribute}"/>
</map:act>
<!--
<map:act type="request">
<map:parameter name="parameters"
value="true"/>
<map:redirect-to
uri="account.html?account={my_request_parameter}"/>
</map:act>
-->
</map:match>
any advice, helps,
Thanks,
Hill
ps: i use 2.1m3-dev
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Schematron within Cocoon
Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Robert,
there exists a bug with patch:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19104
Joerg
Jeroen Cranendonk wrote:
> (sorry, posted last mail with wrong subject :)
>
> Hi,
>
> I have a question about the usage of schematron languages within
> Cocoon/XMLForms.
>
> I have an AddresBean which I use as the XMLForm model. It containts 2
> variables:
> - street (also getter and setter)
> - housenumber (also getter and setter)
>
> I want to show a message behind a 'street' input field in my form when the
> 'housenumber' field is empty.
> I've tried to do it with, "../housenumber", but this doesn't work! See the
> code below:
>
> <pattern name="Old Address Pattern" id="addressPattern">
> <rule context="/street">
> <assert test="string-length(../housenumber) > 0">Address is
> required.</assert>
> </rule>
> </pattern>
>
> Would someone have a sollution of how to accomplish this?
> Or could someone explain why this schematron statement doesn't work ?
>
> Cheers!
>
> --
> Many thanks in advance,
> Robert Kromkamp
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Schematron within Cocoon
Posted by Jeroen Cranendonk <j....@emaxx.nl>.
(sorry, posted last mail with wrong subject :)
Hi,
I have a question about the usage of schematron languages within
Cocoon/XMLForms.
I have an AddresBean which I use as the XMLForm model. It containts 2
variables:
- street (also getter and setter)
- housenumber (also getter and setter)
I want to show a message behind a 'street' input field in my form when the
'housenumber' field is empty.
I've tried to do it with, "../housenumber", but this doesn't work! See the
code below:
<pattern name="Old Address Pattern" id="addressPattern">
<rule context="/street">
<assert test="string-length(../housenumber) > 0">Address is
required.</assert>
</rule>
</pattern>
Would someone have a sollution of how to accomplish this?
Or could someone explain why this schematron statement doesn't work ?
Cheers!
--
Many thanks in advance,
Robert Kromkamp
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: get request attribute in sitemap
Posted by Jeroen Cranendonk <j....@emaxx.nl>.
Hi,
I have a question about the usage of schematron languages within
Cocoon/XMLForms.
I have an AddresBean which I use as the XMLForm model. It containts 2
variables:
- street (also getter and setter)
- housenumber (also getter and setter)
I want to show a message behind a 'street' input field in my form when the
'housenumber' field is empty.
I've tried to do it with, "../housenumber", but this doesn't work! See the
code below:
<pattern name="Old Address Pattern" id="addressPattern">
<rule context="/street">
<assert test="string-length(../housenumber) > 0">Address is
required.</assert>
</rule>
</pattern>
Would someone have a sollution of how to accomplish this?
Or could someone explain why this schematron statement doesn't work ?
Cheers!
--
Many thanks in advance,
Robert Kromkamp
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: get request attribute in sitemap
Posted by Hill Karimov <hi...@yahoo.com>.
OK thanks request-attr is works,
<map:redirect-to
uri="account.html?account={request-attr:my_request_attribute}"/>
Thanks,
Hill
--- Upayavira <uv...@upaya.co.uk> wrote:
> Do you mean request parameters? There are three
> input modules that allow access
> to request details, request, request-param, and
> request-attr.
>
> I've only used request param, with which you can get
> get/post parameters from the
> request, e.g: http://server/cocoon/page?name=peter
>
> You can use 'peter' in your sitemap like this:
>
> <map:transform src="xsl/foo.xsl">
> <map:parameter name="name"
> value="{request-param:name}"/>
> </map:transform>
>
> So, Peter will be passed to the transform as a
> parameter.
>
> Is this what you're after?
>
> Upayavira
>
> On 17 Jun 2003 at 3:36, Hill Karimov wrote:
>
> > Hi all,
> >
> > Is possible to get request attribute in sitemap?
> > some like to get request parameter:
> >
> > <map:match pattern="delete_account.html">
> > <map:act set="process">
> > <map:parameter name="descriptor"
> > value="descriptors/form_account.xml"/>
> > </map:act>
> >
> > <!-- ??? some like it -->
> > <map:act type="request">
> > <map:parameter name="attributes"
> > value="true"/>
> > <map:redirect-to
> >
> uri="account.html?account={my_request_attribute}"/>
> > </map:act>
> >
> > <!--
> > <map:act type="request">
> > <map:parameter name="parameters"
> > value="true"/>
> > <map:redirect-to
> >
> uri="account.html?account={my_request_parameter}"/>
> > </map:act>
> > -->
> > </map:match>
> >
> > any advice, helps,
> >
> > Thanks,
> > Hill
> > ps: i use 2.1m3-dev
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org For
> > additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> >
> >
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: get request attribute in sitemap
Posted by Hill Karimov <hi...@yahoo.com>.
No, I want get request attribute that I set in action
:
request.setAttribute("my_request_attribute",
"some_value")
is it possible?
Thanks,
Hill
--- Upayavira <uv...@upaya.co.uk> wrote:
> Do you mean request parameters? There are three
> input modules that allow access
> to request details, request, request-param, and
> request-attr.
>
> I've only used request param, with which you can get
> get/post parameters from the
> request, e.g: http://server/cocoon/page?name=peter
>
> You can use 'peter' in your sitemap like this:
>
> <map:transform src="xsl/foo.xsl">
> <map:parameter name="name"
> value="{request-param:name}"/>
> </map:transform>
>
> So, Peter will be passed to the transform as a
> parameter.
>
> Is this what you're after?
>
> Upayavira
>
> On 17 Jun 2003 at 3:36, Hill Karimov wrote:
>
> > Hi all,
> >
> > Is possible to get request attribute in sitemap?
> > some like to get request parameter:
> >
> > <map:match pattern="delete_account.html">
> > <map:act set="process">
> > <map:parameter name="descriptor"
> > value="descriptors/form_account.xml"/>
> > </map:act>
> >
> > <!-- ??? some like it -->
> > <map:act type="request">
> > <map:parameter name="attributes"
> > value="true"/>
> > <map:redirect-to
> >
> uri="account.html?account={my_request_attribute}"/>
> > </map:act>
> >
> > <!--
> > <map:act type="request">
> > <map:parameter name="parameters"
> > value="true"/>
> > <map:redirect-to
> >
> uri="account.html?account={my_request_parameter}"/>
> > </map:act>
> > -->
> > </map:match>
> >
> > any advice, helps,
> >
> > Thanks,
> > Hill
> > ps: i use 2.1m3-dev
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org For
> > additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> >
> >
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: get request attribute in sitemap
Posted by Upayavira <uv...@upaya.co.uk>.
Do you mean request parameters? There are three input modules that allow access
to request details, request, request-param, and request-attr.
I've only used request param, with which you can get get/post parameters from the
request, e.g: http://server/cocoon/page?name=peter
You can use 'peter' in your sitemap like this:
<map:transform src="xsl/foo.xsl">
<map:parameter name="name" value="{request-param:name}"/>
</map:transform>
So, Peter will be passed to the transform as a parameter.
Is this what you're after?
Upayavira
On 17 Jun 2003 at 3:36, Hill Karimov wrote:
> Hi all,
>
> Is possible to get request attribute in sitemap?
> some like to get request parameter:
>
> <map:match pattern="delete_account.html">
> <map:act set="process">
> <map:parameter name="descriptor"
> value="descriptors/form_account.xml"/>
> </map:act>
>
> <!-- ??? some like it -->
> <map:act type="request">
> <map:parameter name="attributes"
> value="true"/>
> <map:redirect-to
> uri="account.html?account={my_request_attribute}"/>
> </map:act>
>
> <!--
> <map:act type="request">
> <map:parameter name="parameters"
> value="true"/>
> <map:redirect-to
> uri="account.html?account={my_request_parameter}"/>
> </map:act>
> -->
> </map:match>
>
> any advice, helps,
>
> Thanks,
> Hill
> ps: i use 2.1m3-dev
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org For
> additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org