[Zopexmlmethods-devel] Override variable definitions via query string?
Brought to you by:
arielpartners,
philikon
|
From: Craeg K S. <cs...@ar...> - 2003-05-19 02:05:12
|
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>
* Module Products.PageTemplates.TALES, line 217, in evaluate
*URL: /maestro/dashboard/papers*
*Line 40, Column 13*
*Expression: standard:"doc/articlexsl?toc='yes'"*
*Names:*
{'container': <Folder instance at 90c5f08>,
'default': <Products.PageTemplates.TALES.Default instance at 0x867fb74>,
'here': <Folder instance at 90c5f08>,
'loop': <SafeMapping instance at 8671700>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x868decc>,
'nothing': None,
'options': {'args': ()},
'repeat': <SafeMapping instance at 8671700>,
'request': <HTTPRequest, URL=http://localhost:8080/maestro/dashboard/papers>,
'root': <Application instance at 8e78418>,
'template': <ZopePageTemplate at /maestro/dashboard/papers>,
'traverse_subpath': ['p-tech-proposal.xml'],
'user': cstrong}
* Module Products.PageTemplates.Expressions, line 206, in __call__
* Module Products.PageTemplates.Expressions, line 194, in _eval
* Module Products.PageTemplates.Expressions, line 150, in _eval
__traceback_info__: doc
* Module Products.PageTemplates.Expressions, line 360, in
restrictedTraverse
__traceback_info__: {'path': ["articlexsl?toc='yes'"],
'TraversalRequestNameStack': []}
AttributeError
Hum. What am I doing wrong?
Thanks in advance,
--Craeg
|