xsl-list
[Top] [All Lists]

RE: XSL transform escape question

2002-09-09 10:20:34
From: Holmberg Rick-ra0119 
[mailto:Rick(_dot_)Holmberg(_at_)motorola(_dot_)com]
Sent: Monday, September 09, 2002 9:35 AM
Subject: [xsl] XSL transform escape question


I am processing an xml file with html tags in it. When I do 
the transform (using the transform method with the SAX 
parser) it is translating the < to &lt and > to &gt. I just 
want the < to remain as a < and not have the conversion take 
place. I tried doing the following but it is not working 
either...within the "answer" tags in the xml file there are 
tags which make up a table in html ( ie: <TR><TD> </TD></TR> etc)

<xsl:value-of select="answer" disable-output-escaping="yes"/> 


Any ideas on how to do this?

You may not have your output method set to HTML.  In the absence of an
explicit <xsl:output/> element (or <html> tags in your template), the parser
will default to XML output, which ignores the disable-output-escaping
attribute if you're writing out a result tree fragment.  Use <xsl:output
method="html"/> or add <html> to your template.

See http://www.zvon.org/xxl/XSLTutorial/Output/example61_ch14.html.

cheers,
b.

| brian martinez                              
brian(_dot_)martinez(_at_)trip(_dot_)com |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

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



<Prev in Thread] Current Thread [Next in Thread>