I'm trying to create a xsl:function that outputs the value of a xpath
selector sorrounded with some boilerplate code (html <div/> elements). Upon
calling the function, the content of the xpath selector makes it to the html
output, but not the boilerplate code.
Here's the xml stylesheet:
<?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:iservices="http://namespaces.iservices.mx/"
>
<!--Declare function that outputs wrapping divs for portlet layouts-->
<xsl:function name="iservices:as_portlet_layout" as="xs:string">
<xsl:param name="selector"/>
<div class="boilerplate_1">
<div clas="boilerplate_2">
<xsl:copy-of select="$selector"/>
</div>
</div>
</xsl:function>
<xsl:value-of
select="iservices:as_portlet_layout(/some/expath/selector)"/>
</rules>
The Value of /some/expath/selector makes it to the rendered html on the
browser, but not the rest of the boilerplate code. I also tryied to use
xsl:text, but with the same results:
<xsl:function name="iservices:as_portlet_layout" as="xs:string">
<xsl:param name="selector"/>
<xsl:text><![CDATA[<div class="boilerplate_1">]]></xsl:text>
<xsl:text><![CDATA[ <div clas="boilerplate_2">]]></xsl:text>
<xsl:copy-of select="$selector"/>
<xsl:text><![CDATA[ </div>]]></xsl:text>
<xsl:text><![CDATA[</div>]]></xsl:text>
</xsl:function>
Using xdv 0.4b3 on Plone4. What am I doing wrong?
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/product-developers