xsl-list
[Top] [All Lists]

RE: How can I get XSLT to write <cfreturn this>

2003-08-18 14:56:47
From: Scott Powell [mailto:scotthpowell(_at_)yahoo(_dot_)com]
Sent: Monday, August 18, 2003 3:33 PM
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How can I get XSLT to write <cfreturn this>


Hi,

I'm trying to develop a transformation that will
output, among other things, this text (literal)...

<cfreturn this>

I've tried xsl:element, but can't have a blank
attribute.

I've tried CDATA, but that escapes < and >.

I've tried xsl:text, but it doesn't like that either.

What's the best way?

I assume you're not trying to output XML despite the presence of angle
brackets, because what you want isn't valid XML.  You'll need to set your
output method to text and use disable-output-escaping, although it may not
work with your XSLT implementation:

  <xsl:output method="text"/>

  <xsl:template match="/">
    <xsl:text disable-output-escaping="yes">&lt;cfreturn this&gt;</xsl:text>
  </xsl:template>

What are you trying to create with your transformation?  Any solution that
requires d-o-e may indicate that XSLT isn't the best tool for the job.

hth,
b.

| brian martinez                           
brian(_dot_)martinez(_at_)cendant(_dot_)com |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list