diazo
diazo copied to clipboard
Whitespace breaks xsl:attribute when Modifying theme on-the-fly
This works:
<replace css:theme-children="#portal-logo">
<img alt="Site Logo" class="img-responsive"><xsl:attribute name="src"><xsl:value-of select="$site_logo" /></xsl:attribute></img>
</replace>
This does not:
<replace css:theme-children="#portal-logo">
<img alt="Site Logo" class="img-responsive">
<xsl:attribute name="src"><xsl:value-of select="$site_logo" /></xsl:attribute>
</img>
</replace>
Even this won't work (one single whitespace before xsl:attribute):
<replace css:theme-children="#portal-logo">
<img alt="Site Logo" class="img-responsive"> <xsl:attribute name="src"><xsl:value-of select="$site_logo" /></xsl:attribute></img>
</replace>
Here's the error msg:
_runtime error, element 'attribute' [123:0] xsl:attribute: Cannot add attributes to an element if children have been already added to the element. [0:0]_
Using Plone 4.3.
/cc @ebrehault @davisagli @lrowe