Ok, more specifically, here's what I did...
1.) I had a mostly static XHTML doc in which I wanted to fill in a 2-3 sections with dynamic content. For each such section I embedded a <mysite:content replace-with="someGeneralContentName"/>
2.) I wrote a simple stylesheet like:
<xsl:stylesheet version="1.0"> <xsl:param name="pageTitle" select="'Welcome to RedPouch.com'"/>
<xsl:template match="mysite:[EMAIL PROTECTED]'pageTitle']">
<cinclude:include src="{$pageTitle}"/>
</xsl:template> <xsl:template match="@*|node()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>As you can see, "pageTitle" is one instance of a general content name.
3.) In the sitemap you'd do something like:
...
<map:transform type="xslt" src="xsl/myStyleSheet.xsl">
<map:parameter name="pageTitle" value="{request-param:someParamFromRequest"/>
</map:transform>
<map:transform type="cinclude"/>
That's about it. :-)
Sonny
From: Jan Wielgus <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Re: [XSP] Java variables within tag attributes Date: Sat, 1 Nov 2003 21:20:50 +0100
>Hi Jan, > >I did a similar thing by using by writing an XSLT stylesheet that declares >an xsl:param, passing the param from my sitemap using map:transform, and >having the XSLT stylesheet fill in the "src" attribute value for the ><cinclude>. After that stage is done, you can pass it through the >"cinclude" transformer.
Would you give me a little code-example, if possible?
Jan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Want to check if your PC is virus-infected? 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]
