[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Quoting quotes?

Subject: Quoting quotes?
From: Danny Vint <dvint@xxxxxxxx>
Date: Sat, 21 Oct 2000 16:40:04 -0700
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 &quot; and/or &apos; 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


Current Thread
  • Quoting quotes?
    • Danny Vint - Sat, 21 Oct 2000 16:40:04 -0700 <=
      • Mike Brown - Sat, 21 Oct 2000 19:19:09 -0600 (MDT)
      • <Possible follow-ups>
      • Kay Michael - Mon, 23 Oct 2000 09:29:38 +0100

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.