[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to include ' in the argument of <translate> f
At 2009-11-20 16:46 -0500, Mak, Lucas Wing Kau wrote:
I am trying to replace the apostrophe (') with a space by the <translate> function but oXygen gave me an error message ("unmatched quote in expression") when I put ' in the second argument. How can I resolve that? You aren't showing your current code for volunteers to analyze where you are going wrong. You have to distinguish attribute delimiters from string delimiters. For example, this should work just fine: select='translate($old,"'","")' ... because I'm using single quotes as my attribute delimiter and double quotes for my string delimiters. That choice of string delimiter allows me to embed an apostrophe in the string, which I do with the entity reference. Remember that entity substitution happens long before the syntax analysis of the function call, so if you had: select="translate($old,''','')" ... then you would get an error because that is *no* different from: select="translate($old,''','')" I hope this helps. . . . . . . . . . Ken
|
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
|