[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] How can I get XSLT to write


Subject: RE: [xsl] How can I get XSLT to write <cfreturn this>
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Mon, 18 Aug 2003 15:56:47 -0600

> From: Scott Powell [mailto:scotthpowell@xxxxxxxxx]
> Sent: Monday, August 18, 2003 3:33 PM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> 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.martinez@xxxxxxxxxxx |
| 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



Current Thread
Keywords