On 09.06.2008 06:29, Heather Rankin wrote:
Are character-maps supported in Cocoon 2.1? I need to replace < and > entity references with the literal characters '<' and '>' and can't get it to work in Cocoon. I have the following character-map in my XSLT:<xsl:output use-character-maps="cm1" method="xml" indent="yes" encoding="UTF-8" media-type="text/xml"/> <xsl:character-map name="cm1"> <xsl:output-character character="<" string="<"/> <xsl:output-character character=">" string=">"/> </xsl:character-map> This works fine outside of cocoon (e.g. in Oxygen). But when I run it through the second transformer in the following pipleline: <map:match pattern="terms"> <map:generate src="{request-param:url}" type="html"/> <map:transform type="xslt2" src="transforms/getTerms.xsl"/> <map:transform type="xslt2" src="transforms/convertStringToXML.xsl"/> <map:serialize type="xml"/> </map:match> ... the < and > characters do not get replaced (remain escaped). Is this something to do with the xml serializer? Do I need to change something there?
disable-output-escaping (and it seems also charater-map) only passes serializer hints along with the actual XML. With a second transformation following the one using disable-output-escaping these hints get lost. That's why you should not use this "feature" in Cocoon. It only works in a non-streaming environment, where you serialize after each transformation.
Joerg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
