Re: [Zopexmlmethods-devel] Override variable definitions via query string?
Brought to you by:
arielpartners,
philikon
|
From: Brent H. <br...@ec...> - 2003-05-19 17:38:58
|
Craeg K Strong wrote:
> Hello:
>
> I am using the latest and greatest ZopeXMLMethods from CVS, and I wanted
> to override an xsl:param dynamically.
>
> My specific example is this: I have a transformer that renders HTML for an
> arbitrary "article" doctype. For most articles, you don't want a table
> of contents.
> So I have the following at the top of article.xsl:
>
> <xsl:param name="toc">no</xsl:param>
>
> But for official project documents, we _do_ want a table of contents.
> Here, in my naivete, is that I tried to do inside my page template:
>
> <div tal:define="doc nocall:python:folder[docname]" >
> <div tal:replace="structure doc/articlexsl?toc='yes'"/>
> </div>
Unfortunately, the override support I added only works with REQUEST
variables, which aren't set by TALES expressions. So you could access
doc/articlexsl?toc='yes' as a URL in your browser, but not within a page
template.
-- Brent
-------------------------------------------------------------------------
"The programmer, like the poet, works only slightly removed from pure
thought-stuff. He builds his castles in the air, from air, creating
by exertion of the imagination. Few media of creation are so
flexible, so easy to polish and rework, so readily capable of
realizing grand conceptual structures."
-- Frederick Brooks, Jr., The Mythical Man Month
|