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

Re: entity reference...

Subject: Re: entity reference...
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 25 Jul 2003 10:22:26 +0100
xsl entity reference attribute
Hi Fei,

> I have data like this
>
> <teaser>Get more information on &lt;a href="http://www.abc.com"&gt;ABC&lt;/a&gt; web site.</teaser>
>
> The output html needs to be this
> Get more information on <a href="http://www.abc.com">ABC</a> web site.</teaser>
>
> instead of 
> Get more information on &lt;a href="http://www.abc.com"&gt;ABC&lt;/a&gt; web site.

You could use the disable-output-escaping attribute on <xsl:value-of>:

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

The disable-output-escaping attribute disables the usual escaping of
the XML-significant characters & and <, instead writing them literally
to the result. Note that disable-output-escaping won't be honoured in
all situations, but you might get lucky.

It would be much better for all concerned if you could persuade
whoever's providing you with this XML to use unescaped, well-formed
HTML within the <teaser> element. Then you would be able to just copy
the contents directly.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread
  • entity reference...
    • Fei Zheng - Thu, 24 Jul 2003 14:27:59 -0400 (EDT)
      • Jeni Tennison - Fri, 25 Jul 2003 05:22:40 -0400 (EDT) <=
        • bryan - Fri, 25 Jul 2003 05:37:02 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.