Hi,
I want to use <xsl:choose /> constructs in my rules.xml, but i'm getting an
XSLParseError.
Here's the traceback:
2011-06-07 14:18:38 INFO Zope Ready to handle requests
/home/tzicatl/Aplicaciones/Buildout/egss/Products.CMFCore-2.2.4-py2.7.egg/Products/CMFCore/DirectoryView.py:489:
UserWarning: DirectoryView libroweb_coretypes_custom_templates refers to a
non-existing path
'libroweb.coretypes:skins/libroweb_coretypes_custom_templates'
(self.id, reg_key), UserWarning)
2011-06-07 14:18:40 ERROR plone.transformchain Unexpected error whilst
trying to apply transform chain
Traceback (most recent call last):
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.transformchain-1.0b1-py2.7.egg/plone/transformchain/transformer.py",
line 42, in __call__
newResult = handler.transformIterable(result, encoding)
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.app.theming-1.0b1-py2.7.egg/plone/app/theming/transform.py",
line 223, in transformIterable
transform = self.setupTransform()
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.app.theming-1.0b1-py2.7.egg/plone/app/theming/transform.py",
line 175, in setupTransform
access_control=accessControl,
File "xslt.pxi", line 399, in lxml.etree.XSLT.__init__
(src/lxml/lxml.etree.c:108752)
XSLTParseError: xsltParseStylesheetTop: unknown choose element
2011-06-07 14:18:41 ERROR plone.transformchain Unexpected error whilst
trying to apply transform chain
Traceback (most recent call last):
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.transformchain-1.0b1-py2.7.egg/plone/transformchain/transformer.py",
line 42, in __call__
newResult = handler.transformIterable(result, encoding)
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.app.theming-1.0b1-py2.7.egg/plone/app/theming/transform.py",
line 223, in transformIterable
transform = self.setupTransform()
File
"/home/tzicatl/Aplicaciones/Buildout/egss/plone.app.theming-1.0b1-py2.7.egg/plone/app/theming/transform.py",
line 175, in setupTransform
access_control=accessControl,
File "xslt.pxi", line 399, in lxml.etree.XSLT.__init__
(src/lxml/lxml.etree.c:108752)
XSLTParseError: xsltParseStylesheetTop: unknown choose element
And Here is my rules.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xsl:variable name="frontpage"
css:select="body.section-front-page"/>
<xsl:choose>
<xsl:when test="$frontpage">
<theme href="front-page.html" />
<xi:include href="front-page.xml" />
</xsl:when>
<xsl:otherwise>
<theme href="index.html"/>
<xi:include href="adminrules.xml" />
</xsl:otherwise>
</xsl:choose>
</rules>
Is it possible to use <xsl:choose /> in rules.xml to easily make special
rules for front-page, news, and so-on? if not, why?
--
---
Noe Nieto
NNieto Consulting Services
M: [email protected]
W: http://noenieto.com
T: @tzicatl <https://twitter.com/#%21/tzicatl>
Li: Perfil en LinkedIn <http://www.linkedin.com/profile/view?id=84300665>
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers