[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: select="substring-before($str,"'")" !!!
David Carlisle wrote: > 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. Yes, this is a good solution, but what to do in the case when the output will be something like this: document.writeln('"This is my name." - said Sandra O'Boyle'); In such a case a solution will be to replace any occurence of a quote and apostrophe with a javascript variable name -- e.g. varQuote and varApos. We know this is done by calling a recursive named template. The output then will be: document.writeln(varQuote + 'This is my name.' + varQuote + ' - said Sandra O' + varApos + 'Boyle'); The definitions of varQuote and varApos will also have to be generated: var varQuote = '"'; var varApos = "'"; Dimitre. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|