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

Re: Implementing " and ' in literals

Subject: Re: Implementing " and ' in literals
From: Matt Sergeant <matt@xxxxxxxxxxxx>
Date: Sat, 22 Apr 2000 09:56:02 +0100 (BST)
Re: Implementing " and ' in literals
On Fri, 21 Apr 2000, David Carlisle wrote:

> 
> 
> > Actually using C style backslash escaping would be rejected by other
> > parsers, I believe. So that's probably a better long term solution (and
> > it's prettier too!).
> 
> Why would they be rejected? \ isn't a special character to xpath or xml
> so \" would just be the two characters. Adding a quote character such as
> \ just makes it harder to query attributes that have \ in their values
> as you have to double quote the \. This seems far mor common than
> wanting to make a literal string that has both " and ' in it.

Take the following: 'It\'s a nice day'

Most (all?) XPath tokenizers simply use the following regular expression:

'[^']*'

Which with the above, would stop at 'It\', followed by a single NCName
token "s" which would cause a syntax error.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


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


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.