--Update--


I tried the map:transform without passing any <map:parameter>s at all, so just the default xsl:param value in the XSL stylesheet will be used (see prev. message below).

I also made the template simpler. Just this now:
<xsl:template match="rp:[EMAIL PROTECTED]'centerPage']">
 <cinclude:include src="$centerPage" />
</xsl:template>

Anyhow, the output I'm getting is:
<cinclude:include xmlns:cinclude="http://apache.org/cocoon/include/1.0"; src="$centerPage"/>


This indicates the param *value* isn't being substituted. Why might this be?

From: "Sonny Sukumar" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: Pass sitemap params to "xslt" transformer?
Date: Sat, 11 Oct 2003 12:55:20 -0700


Ok, I can't get the <map:parameter> value to work in the XSL. I keep getting a ResourceNotFoundException. I even tried hardcoding the map:parameter value, but it still doesn't work. Here's the sitemap map:transform:


<map:transform type="xslt" src="mysite/xsl/customerFacingTemplate.xsl">
<map:parameter name="centerPage"
value="cocoon:/internal/showProduct?productId=00123"/>
</map:transform>


The XSL is:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
xmlns:rp="http://www.redpouch.com/rp";
xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
<xsl:param name="centerPage" value="home"/>


  <xsl:template match="rp:[EMAIL PROTECTED]">
   <cinclude:include src="[EMAIL PROTECTED]"/>
 </xsl:template>

 <!-- 1 other template to copy all other tags over -->
</xsl:stylesheet>

The specific error is this:
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.RuntimeException: org.apache.cocoon.ResourceNotFoundException: Resource not found.: org.apache.excalibur.source.SourceNotFoundException: file:/usr/local/tomcat/webapps/cocoon/$centerPage doesn't exist


Any ideas??

Thanks,

Sonny

From: "Horsfield, Peter A." <[EMAIL PROTECTED]>

Absolutely:

        <map:transform type="xslt">
                <map:parameter name="paramName" value="{1}" />
        </map:transform>

Then, in your XSLT file at the top level (under stylesheet)

<xsl:param name="paramName" value="defaultvalue" />

I've had problems using hyphens in parameter names, however.

Peter

-----Original Message-----
From: Sonny Sukumar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 3:03 PM
To: [EMAIL PROTECTED]
Subject: Pass sitemap params to "xslt" transformer?



Is there any way to pass *sitemap* parameters to the "xslt" transformer
(TraxTransformer)? I know there's a "use-request-parameters" option to use
request parameters, but that's not what I want to do.


I want to at least be able to pass in the request URI (e.g. "requestUri" in
"http://www.mysite.com/requestUri?id=12345";), but passing in parameters with


names/values of my choosing from the sitemap would be better.

Thanks for the help,

Sonny

_________________________________________________________________
Add MSN 8 Internet Software to your existing Internet access and enjoy
patented spam protection and more.  Sign up now!
http://join.msn.com/?page=dept/byoa


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

_________________________________________________________________
Add MSN 8 Internet Software to your existing Internet access and enjoy patented spam protection and more. Sign up now! http://join.msn.com/?page=dept/byoa



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


_________________________________________________________________
Help protect your PC. Get a FREE computer virus scan online from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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



Reply via email to