You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Calabrese, Jason" <JC...@exchange.SanDiegoCA.NCR.COM> on 2000/11/09 00:59:23 UTC
escaping text output
I am using Xalan to generate a text email. Part of the email is a url to a
jsp. I need to escape the value of a value-of function so that a space
character is output as %20. Is there any standard way to do this?
Re: escaping text output
Posted by Fabian Huschka <fa...@dreicsystems.de>.
Hello Jason,
you may define a entity called space and reference this entity in your
style sheet / XML document by "&space;".
Define the entity in a file (e.g. special.ent) :
<!ENTITY % space "%20">
Add the following processing instruction to your stylesheet:
<!DOCTYPE page [<!ENTITY % special SYSTEM "special.ent"> %special;]>
An example in the stylesheet may look like this:
<xsl:text>http://www.somelink.de/some&space;text&space;with&spacewhitespace&space;characters</xsl:text>
To use this entitiy in your XML documents you must also include the processing
instruction above.
Best regards,
Fabian
"Calabrese, Jason" schrieb:
> I am using Xalan to generate a text email. Part of the email is a url to a
> jsp. I need to escape the value of a value-of function so that a space
> character is output as %20. Is there any standard way to do this?