We're looking to migrate from a Plone 3 site deployed via mod_transform to a
Plone 4 site deployed via collective.xdv (plone.app.theming).  Fun stuff, I
know :)

We currently have a large number of <xsl:template> tags scattered all over
the place, helping us to select content out of Plone for theme transforms. 
But, using the <xsl:template> tag seems to throw the following error:
"XSLTParseError: element template only allowed as child of stylesheet".

Am I missing a namespace declaration or is the <xsl:template> tag no longer
"supported"/recommended in the latest XDV/Diazo release?  Don't mind having
to redo things, but the <xsl:template> tag sure made it easy to match on
groups of content and then do xpath queries relative to the local node
“created” by the template match.

Below is proof of concept code:

rules.xml

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://namespaces.plone.org/xdv";
           xmlns:css="http://namespaces.plone.org/xdv+css";
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
           xmlns:xi="http://www.w3.org/2001/XInclude";>
    
    <theme href=”theme.html” />
    ...    
    <before theme="//*[@id='wtext']" if-content="//body[contains(concat('
',normalize-space(@class),' '),' section-front-page ')]">
        <xi:include href="include.xml" />
    </before>
    ...
</rules>


include.xml

<rules xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    ...
    <xsl:template match="//*[@id='tiles-blades']" mode="initial-stage">
      <xsl:copy-of select=".//div[@class='summary']" />
    </xsl:template>
    ...
</rules>

Thanks in advance for any insight.
-- 
View this message in context: 
http://plone.293351.n2.nabble.com/XDV-Diazo-and-the-xsl-template-tag-tp5923593p5923593.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to