cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: How to get "&" in output by Xalan?
Date Tue, 24 Oct 2000 13:15:36 GMT
Try www.mulberrytech.com for pure xslt questions...

In your stylesheet '&amp;' after parsing will yield '&'.
Also wrapping the & in a CDATA block will work.

-matt


On Tue, Oct 24, 2000 at 02:49:29PM +0900, SAKAI Noriko wrote:
> Hi all,
> 
> I'm using Cocoon1.7.4 and Xalan-Java1.0.1 on Solaris 2.6 x86, and
> trying to convert XML files into different structure using XSLT. The
> output files need to have rendered by proprietary browser, and thus
> should be able to contain some proprietary entities for such as
> browser specific characters.
> 
> Here I encounter the problem of handling those entities. If "&#777;",
> which is assumed to be an entity for such a character, is simply put
> in original XML or XSL file, then Xalan outputs a corrupted character.
> But despite any other methods I have, "&" is escaped as "&amp;".
> 
> I do wish get "&#777;" or "&" as it is in outputs.
> 
> What I have tried are as follows.
> 
> 1) <xsl:text disable-output-escaping="yes>&amp;</xsl:text>
> 
> Xalan itself outputs "&" when "disable-output-escaping" attribute is
> placed, but as for Cocoon, the previous message in this ML, 
> (http://archive.covalent.net/xml/cocoon-users/2000/09/0596.xml)
> "disable-output-escaping is not supported in Cocoon. We have no plans
> to support it because it encourages ugly and error-prone code. "
> is stated.
> 
> 2) <![CDATA[ & &amp;]]>
> 
> When output type is designated as HTML,
> <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
> those are escaped as "&amp;""&amp;amp;" respectively.
> 
> When output type is "text/plain", "&" is put but all other tags will
> be lost ;-)
> 
> Are there any functions, attributes, elements, declarations or
> whatever to get "&" in output document source under Cocoon+Xalan? 
> Or, since I may completely get confused, can anyone show me the way to 
> go, please?
> 
> Any suggestions and ideas would be appreciated.
> 
> Regards,
> 
> ----
> Noriko SAKAI
> n-sakai@ay.jp.nec.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message