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

RE: display & as text

Subject: RE: display & as text
From: Liam R E Quin <liam@xxxxxx>
Date: Fri, 04 Jun 2010 17:43:41 -0400
RE:  display & as text
On Fri, 2010-06-04 at 21:14 +0000, mas christ wrote:
> Someone asked for a reason.
> 
> The reason is to copy and past text with ampersands into my xml file
> without having to convert one ampersand form into another.

You can use <![CDATA[ stuff like < and & not special here ]]>

*but*

now if ]]> occurs in your input you must escape it. E.g. to put <[[]]>
into a string, you might try

<![CDATA[ this is <[[]]> a space-ship]]>
but that does not work. Instead, you must write,
<![CDATA[ this is <[[]]>]]<![CDATA[> a space-ship]]>
which I am sure you will agree is clearer.

With XSLT, you might find it easier to include an external
text file, using unparsed-text(), assuming you are using XSLT 2.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

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.