You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tobia Conforto <to...@linux.it> on 2008/04/17 23:31:49 UTC
Re: Old Cocoon query
On 17 Apr 2008, Derek Hohls wrote:
> in this mail:
> http://marc.info/?l=xml-cocoon-users&m=119996793507680&w=2
> you gave guidance on how to post-process escaped tags from a
> database. However, when I implement it, it also strips out all the
> <sql:field> tags as well, leaving just text inside the <sql:row>
> tags. How can the code be modified not to lose the nested tags?
My fault for posting untested code!
Try modifying the first XSLT, unescape-pre.xsl, like this:
(still untested)
<xsl:template match="sql:row/*[not(self::sql:rowset)
and (contains(., '&') or contains(., '<'))]">
<xsl:copy>
<unescape>
<xsl:copy-of select="node()"/>
</unescape>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()" priority="-1">
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
</xsl:template>
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org