Weirdness with XSL Transform

G

George Durzi

Consider the following very simple XSL transformation:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:eek:utput method="text" encoding="ISO-8859-1"/>
<xsl:template match="/">
&lt;George Durzi&gt;
</xsl:template>
</xsl:stylesheet>

In a webform, I'm using the XSLTransform to write the contents of this
transformation to the browser, but I'm also changing the content type to
text/plain.

The resulting text is:
&lt;George Durzi&gt;

I want it to be:
<George Durzi>

My XSL works fine if the content-type I'm targetting is text/html, but not
for text/plain.

And since the < and > are reserved characters, I have to use the &lt; and
&gt;

any idea how I can get this to work? Notice that I've specified my
xsl:eek:utput method to text

I'm also tried putting the < and > inside a CDATA section, but they still
get rendered as &lt; and &gt; in my resulting text file.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top