This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: outputting escaped characters without converting


Heather Lindsay wrote:
> hi everyone,
> 	I have an XML document with HTML impedded in it. 
> Relevant XML segment:
> <InboxHeader>
> 	<self type="RevX/Inbox/InboxHeader">
> 		<host>NODEA.RevX.Inbox</host>
> 		<instance>101001000000001049</instance>
> 	</self>
> 	<description>Test Process 111 - Step1 - Product Line : &lt;img
> src=&quot;C:\Program Files\Microsoft
> Office\Office\Bitmaps\Styles\STONE.BMP&quot;&gt;</description>
> </InboxHeader>
> 
> I want <xsl:value-of select="description"/> to output as:
> Test Process 111 - Step1 - Product Line : &lt;img src=&quot;C:\Program
> Files\Microsoft Office\Office\Bitmaps\Styles\STONE.BMP&quot;&gt;
> Instead of:
> Test Process 111 - Step1 - Product Line : <img src="C:\Program
> Files\Microsoft Office\Office\Bitmaps\Styles\STONE.BMP">

I would think that you would normally get it exactly the way you want it,
unless your output method is "text". Does your stylesheet set the output
method to be "html" or "xml"?

The text node child of the 'description' element contains the unescaped
text. Usually, the output method determines how it is serialized and the
characters are re-escaped if the desired output format is HTML or XML. Or
are you using some other serialization mechanism? Producing a DOM, maybe, 
and serializing specific nodes improperly?

   - Mike
_____________________________________________________________________________
mike j. brown, software engineer at  |  xml/xslt: http://skew.org/xml/
webb.net in denver, colorado, USA    |  personal: http://hyperreal.org/~mike/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]