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

Re: getting a single quote into a parameter

Subject: Re: getting a single quote into a parameter
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Fri, 22 Feb 2002 16:05:20 -0800
bash remove single quote
On Friday 22 February 2002 13:56, Saverio Perugini wrote:
> $ testXSLT -in in.xml -xsl ss.xsl -out out.html -param tempParam "'hello
> &#39; world &#39; '"
>
> The entire parameter value needs to be single quoted for Xalan.

The problem is that the XPath expression needs to have double quotes on the 
outside and single quotes on the inside, but you have single quotes on both 
the outside and the inside.  The big problem is how to do this so your 
command shell won't interpret the quotes itself; if you have a Bash shell, 
this should work (backslash continues to next line):

$ testXSLT -in in.xml -xsl ss.xsl -out out.html -param tempParam \
\"hello\ \'world\ \'\"

So if you remove the backslashes as the shell will do, the XPath expression 
is:

"hello 'world'"

Which evauluates to:

hello 'world'

So <h3>"<xsl:value-of select="$tempParam"/>"</h3> should be:
<h3>"hello 'world'"</h3>

If you don't have a Bash shell, then you need to find out how your shell 
would allow escaping of the quotes like that.

-- 
Peter Davis
Real programmers don't write in BASIC.  Actually, no programmers write in
BASIC after reaching puberty.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.