This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: select="substring-before($str,"'")" !!!
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] select="substring-before($str,"'")" !!!
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 16 Jan 2001 13:23:42 GMT
- References: <200101161250.f0GCoKN18126@sam.julianhaight.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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=""'""
or
select='"'"'
or if belt and braces....
select=""'""
or
select='"'"'
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