[Zope-CMF] xsl/xul and FSPageTemplate

Julien Anguenot ja at nuxeo.com
Mon Aug 1 06:28:43 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Godefroid Chapelle wrote:
> Hi,
> 
> I have been working on kupu i18n. This implied i18ning xsl files for the
> drawer.
> 
> XSL files now carry the i18n namespace and should be imported as
> FSPageTemplate.
> 
> However, FSPageTemplate currently removes the extension when building
> the id. So we cannot simply register .xsl files as FSPageTemplate.
> 
> For instance, this would not work for kupu which has both Zope and non
> Zope uses and would need to keep the .xsl extension for xsl files.
> Actually, as i18n is in its own namespace, the xsl files remain totally
> functional when served without being interpreted (they just dont
> translate).
> 
> Duncan has managed to use the .objects file to register a .xsl file as a
> FSPageTemplate together with its .metadata that includes the
> keep_extension property.
> 
> What would be the right way to avoid this "heavy" mechanism ?
> 
> I have nothing against .objects declaration which makes things more
> explicit ala Zope3 but having to include .metadata files in the sake of
> keeping extension feels really too much.
> 
> Would it make sense to have a FSPageTemplateWithFullName type (to keep
> backward compat) or a FSXMLPageTemplate or ...
> 
> What do you think ?

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.

	J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFC7flbGhoG8MxZ/pIRApAmAJ4pD2lH9IyEIH2PkDaNhxeztF/jGQCfZcml
V15MZbRbIErOSs92ROAaOlM=
=GKt2
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list