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

Re: select="substring-before($str,"'")" !!!

Subject: Re: select="substring-before($str,"'")" !!!
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Jan 2001 13:23:42 GMT
substring in select xpath
> This has reached the limit of my understanding of XSL.

But the FAQ has a section on this I believe.
Anyhow in your example you never need an XPath string literal that
contains both " and ' (which is good as you can't have such a thing)
If your XPath string contains ' then you can use the XPath quotes
" so you have "'". To get that into an XML attribute value you
just need to escape one or other of the quotes:

select="&quot;'&quot;"
or
select='"&apos;"'

or if belt and braces....

select="&quot;&apos;&quot;"
or
select='&quot;&apos;&quot;'

If you do ever need an XPath string containing both " and '
then you can not do it in a single Xpath string literal, you need to use
the concat() function, or a variable.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.