[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: getting a single quote into a parameter
On Friday 22 February 2002 13:56, Saverio Perugini wrote: > $ testXSLT -in in.xml -xsl ss.xsl -out out.html -param tempParam "'hello > ' world ' '" > > 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
|
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
|