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

RE: De-escaping markup

Subject: RE: De-escaping markup
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 3 Feb 2005 11:43:33 -0000
escaping markup
One approach is to serialize the content without escaping it:

<xsl:value-of select="CONTENT" disable-output-escaping="no"/>

A more flexible approach is to parse the content into a proper tree,
allowing the structured content to be manipulated:

<xsl:variable name="subtree" select="saxon:parse(CONTENT)"/>

Neither approach is 100% portable.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: ben.pickering@xxxxxxxxxxxxxxxx 
> [mailto:ben.pickering@xxxxxxxxxxxxxxxx] 
> Sent: 03 February 2005 11:11
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  De-escaping markup
> 
> Hi
> 
> I have a bit of a problem in that a system out of my control 
> is producing 
> "markup" looking like the following:
> 
> <CONTENT>
>         This is &lt;b&gt;bold&lt;/b&gt;
> </CONTENT>
> 
> i.e., with all the perfectly good markup escaped. 
> 
> I was wondering if anyone knows of a stylesheet which will 
> convert text 
> nodes like this into proper markup, for a whole document.  
> The above would 
> come out like:
> 
> <CONTENT>
>         This is <b>bold</b>
> </CONTENT>
> 
> Ideally it would operate on nested tags, as the system (which 
> will remain 
> nameless) is also breaking my <table>s.
> 
> Thanks for any help.
> Cheers,
> Ben.

Current Thread

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.