Subject: Re: [xsl] How to select for ' in XPATH? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 05 Aug 2009 12:16:48 -0700 |
There was a typo in my last email, '%22' works for " "/*/*/*[contains(normalize-space(.),'%22')])" and '%27' does not work for ' ( the %22 gets converted to " character by unescape(s) )
> you are left with breaking up the string into components that > contain no single quote and components that contain a single quote and > then concatenate them e.g. if the selection on the page is e.g. > What's that? > you use > "//*[contains(., concat('What', \"'\", ' that?')"
Good idea to break this up and concatenate. But the basic problem remains, how to match for the single " ?
\"'\" does not work :-(
> Implementing breaking up the string with JavaScript should be possible >although having to stuff all that into a bookmarklet might get ugly. Perhaps this might get ugly, but not without a solution to match for the single " character ...
-- Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to select for ' , Hermann Stamm-Wilbra | Thread | Re: [xsl] How to select for ' , G. Ken Holman |
RE: [xsl] xmlsh (slightly off-topic, Michael Kay | Date | RE: [xsl] Diff between Saxon and In, Michael Kay |
Month |