|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Quoting quotes?
Suppose I want to use the following string:
"Dean. Well, let's see, we have on the bags, Who's on first, What's on
second, I Don't Know is on third ... "
and I need to use it something like this:
<xsl:value-of select="substring-after('Dean. Well, let's see, we have on
the bags, Who's on first, What's on second, I Don't Know is on third ... ',
'bags')"/>
Do you see the problem?
The select attribute uses the " " to contain the attribute value.
then the string-after() function uses the ' ' for the two string value
parameters
but my content string has a bunch of ' in the text!
So I fix this by:
Now I know that I can change the "" in the select to ' '
and the ' ' in the substring-after() to " "
Ok so that fixes this problem, but what happens if I wanted the string to
contain the "" around the
string like it was a real quotation? Now the swapping of '' for " " doesn't
work and using " and/or ' doesn't hide these characters from the
parser - they ar converted to '' an d" just like I had typed the character.
In UNIX you would use a \" or \' to quote a quote, what is the equivalent
function here?
..dan
---------------------------------------------------------------------------
Danny Vint
http://www.dvint.com
Author: "SGML at Work"
http://www.slip.net/~dvint/pubs/sgmlatwork.shtml
mailto:dvint@xxxxxxx
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
|

Cart








