This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]