You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Wes Morgan <we...@slacknet.org> on 2001/06/28 18:58:51 UTC

C2: Need to send parameter to stylesheet

I need to send a parameter to my stylesheet from the sitemap (so I can 
access its value with $myparam inside the stylesheet). The comments in 
TraxTransformer.java say to do this:

<map:transform src="style.xsl">
  <parameter name="myparam" value="myvalue"/>
</map:transform>

but this causes Cocoon2 to give the error "Stylesheet directed 
termination". So I tried this:

<map:transform src="style.xsl">
  <map:parameter name="myparam" value="myvalue"/>
</map:transform>

This doesn't give an error, but $myparam has no value in the stylesheet, 
so it isn't working either. Then I tried this:

<map:transform src="style.xsl">
  <myparam>myvalue</myparam>  (and <myparam map:value="myvalue"/>)
</map:transform>

This does not error either, but again $myparam has no value in the 
stylesheet. This problem is most aggravating, has anyone gotten 
parameter passing to work in C2b1? If so, I'd be very interested to know 
how.

-- 
Wes Morgan

wesm@slacknet.org
wmorga13@calvin.edu

Debian: apt-get into it.


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQGiBDrckPYRBACX731+mhYmj3oFUCGclJFn3YfM3FCmuLoPxGCy5QtRzHZY4XtM
gQ54gSLkTNafhpLC0S+/BfYVpsumLrkif2AGTg0Dnuww0/xDSLKdWhFZUhcopRy5
xXBnz1PZQCJnCjDcSHl4RaVoywmKcZ3TfaDNnu1/RLtlr9tx5XNbWBnw3wCgntC+
lbCBz+LidCrRrEC2N/PlYpMD/0Icn7Uex7jRYcDx2R78cFKDpUGHMtx7VCzGyQbC
L3kz94mm1/aXt0ELqbq5k8qKPq80kXhJkx7jwSqn0V6XO9GAk85Dkk3GHm/iCli6
KhSzC4m485ZKvPKnEU3Nue9hgvC08YSjrfvXosEZsm5kwcniHphugbviW0C+AdmA
BWEoA/9qoxeIntesKq1MsUAXTgDCkT1BCBGn9YoxWhbiyz5iLPn4nTq2hwR1xqhQ
xztHYJkmSlBHeUIhAicPsk3U8gd9L5S3FEWrelm+1GRBhy1/HRBam33ypgg9U5i6
IDST1hqExj3WPG68pJsRl6TwKkrUGNIXi8/yl2ximBOYooFx7rQrV2VzIE1vcmdh
biAoQmFzc0hvbWJyZSkgPHdlc21Ac2xhY2tuZXQub3JnPohXBBMRAgAXBQI63JD2
BQsHCgMEAxUDAgMWAgECF4AACgkQVHVnnbHtaCXu9wCfQBJ5Vsep8waEZEP7cT5/
el7CIF4AoI3dZamvLWsMK7YPdatRNObsf6/guQENBDrckPoQBADZpcFo6MyA0rhP
q43mNdpfMJm4JnmD5kMnRSli/HDdLk2Epa3EY1wgMB6NovLr8fV/2cp/5KdXg8j/
V780qOZhpQpTL8AXvIw9yMAIwwpARpFl//VVK+3l1+IgzHRWiQC7SWhTsqIk4ppP
kRafwefx8r3KYFxljAmlV2zKNSiQrwADBQP+KDV3Lh/k3IHORiX1FV5fZALbJi+X
TTs+onMndtZyhIPpZ6Z6AMygdXa2WQy2U24tkvmMQdMuIOTCZiCuXsbnBw5FwwvL
tfSloF1R6xfvme8yATDZXJnPFUW5jFwwMto3Hnoh95MqJLfXTpu1FrBXVE4YVSJa
eA1FuaQJnnllGu+IRgQYEQIABgUCOtyQ+gAKCRBUdWedse1oJbQIAJ9uDRktfJHP
5veOAfncvrX99hnHKQCgmdySczcSbc9/YxTAJ+GfA1/OOtU=
=PCOv
-----END PGP PUBLIC KEY BLOCK-----





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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


C2: Need to send SESSION parameter to stylesheet

Posted by java guru <ja...@yahoo.co.in>.
I might be posting this question again 'coz i couldnt
get the right answer last time..

Is there anyway to expose the session to sitemap so
that sitemap could extract some params from session
and passthem onto stylesheets???

May be there is work-around..

Thanks in advance

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: C2: Need to send parameter to stylesheet

Posted by java guru <ja...@yahoo.co.in>.
Yest'day only i got this working ..here is example

First the sitemap part of it..note the parameter
"color1"
*******************************
<map:match pattern="form1">
   	<map:generate src="docs/student.xml"/>
	<map:transform src="stylesheets/sms-forms2html.xsl">
	        <map:parameter name="color1"
value="#e7e7b6"/>
	</map:transform>
	<map:serialize/>
</map:match>
***************************************************
Declare the param in stylesheet right under the
"stylesheet" declaration

  <xsl:param name="color1"/>
Then used for bgcolor of html body tab..like
   <xsl:attribute name="bgcolor"><xsl:value-of
select="$color1"/></xsl:attribute>


************************************************

Hope this helps..





 --- Wes Morgan <we...@slacknet.org> wrote: > I need to
send a parameter to my stylesheet from the
> sitemap (so I can 
> access its value with $myparam inside the
> stylesheet). The comments in 
> TraxTransformer.java say to do this:
> 
> <map:transform src="style.xsl">
>   <parameter name="myparam" value="myvalue"/>
> </map:transform>
> 
> but this causes Cocoon2 to give the error
> "Stylesheet directed 
> termination". So I tried this:
> 
> <map:transform src="style.xsl">
>   <map:parameter name="myparam" value="myvalue"/>
> </map:transform>
> 
> This doesn't give an error, but $myparam has no
> value in the stylesheet, 
> so it isn't working either. Then I tried this:
> 
> <map:transform src="style.xsl">
>   <myparam>myvalue</myparam>  (and <myparam
> map:value="myvalue"/>)
> </map:transform>
> 
> This does not error either, but again $myparam has
> no value in the 
> stylesheet. This problem is most aggravating, has
> anyone gotten 
> parameter passing to work in C2b1? If so, I'd be
> very interested to know 
> how.
> 
> -- 
> Wes Morgan
> 
> wesm@slacknet.org
> wmorga13@calvin.edu
> 
> Debian: apt-get into it.
> 
> 
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
>
mQGiBDrckPYRBACX731+mhYmj3oFUCGclJFn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Tpu1FrBXVE4YVSJa
>
eA1FuaQJnnllGu+IRgQYEQIABgUCOtyQ+gAKCRBUdWedse1oJbQIAJ9uDRktfJHP
> 5veOAfncvrX99hnHKQCgmdySczcSbc9/YxTAJ+GfA1/OOtU=
> =PCOv
> -----END PGP PUBLIC KEY BLOCK-----
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>  

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>