[Zope-CMF] Re: xsl/xul and FSPageTemplate
Andy McKay
andy at enfoldsystems.com
Wed Aug 3 19:45:19 EDT 2005
>>> Why don't you create your own FSXSLTemplate object ? It's pretty
>>> easy to
>>> register this kind of objects within the CMF using the dedicated
>>> registry. It might even sub-class FSPageTemplate if it makes sense in
>>> your case. I would do it like this myself.N
Not sure if you've written this, but a general FSXMLTemplate (not just
XSL) would be nice for the rendering of xml Page Templates. In
particular the problem I've wrangled with is inserting dynamically the
<? xml parts at the top, for example what I really want to do is
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="rss.xsl"?>
Where that really needs to be:
<?xml-stylesheet type="text/xsl" href="rss.xsl" tal:attributes="href
string:$portal_url/rss.xsl"?>
For this I was going to extend .metadata so that it you could add in
extra tal attributes statements, then when the Page Template is rendered
these would be processed and inserted. No code to do this yet, just
thinking. So in .metadata I was thinking of adding:
[xml]
xml-stylesheet=href string:$portal_url/rss.xsl
In my XSL PageTemplates I dont think there is anything specific to being
XSL, I've faced the same issues writing RDF too... so that's why I'd
suggest a generic XMLPageTemplate product.
--
Andy McKay
Enfold Systems, LLC
http://www.enfoldsystems.com
More information about the Zope-CMF
mailing list