[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: To avoid converting html entities

Subject: RE: To avoid converting html entities
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 8 Jun 2005 21:36:32 +0100
html entities xsl
> In my xml data source, I have the following element:
> -------------
> <PostData>EK,,,,,75,,,,,DXB,,,,,CDG,,,,,20050901,,,,,1500,,,,,
> ;RulesInfo&gt;&lt;UniqueKey&gt;1&lt;/UniqueKey&gt;&lt;QuoteNum


yuk. If you have any chance at all of fixing the process that created this
horror, then do so.

> I want to select (and output) the above data, without converting the
> html entities above to < & >, etc.

The XML parser automatically converts &lt; to <, you can't prevent that. The
XSLT serializer normally converts < back to &lt;. You can prevent that, in
some circumstances, by using disable-output-escaping.
> The xsl (snippet) is as follows:
> <input type="hidden">
> <xsl:attribute name="value">
> <xsl:value-of select="PostData" disable-output-escaping="yes"/>
> </xsl:attribute>
> </input>
> The output method is set to html... & I'm using MSXSL (i.e xslt 1.0)

You can't use disable-output-escaping when writing attribute values. And I'm
not sure why you want to. What HTML are you actually trying to create?

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.