[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Javascript variables and xsl elements containing special cha
Hello, I need to pass the value of a XSL element into a JavaScript variable. I've searched for information, and this is what I've come up with. given: <desc>some text</desc> I can do the following: JSDesc = '<xsl:value-of select="desc"/>' printDescription(JSDesc) which results in: JSDesc='some text' This works fine for me, unless the element contains an apostrophe. i.e.: <desc>Mike's record</desc> Using the same assignment method results in the following: JSDesc='Mike's record' which is invalid. I've tried various implementations of CDATA, but have not had any luck in getting it to work. In this case, CDATA seems to work fine for the other special characters, but not the apostrophe. How do I assign the value of an XML element , which contains an apostrophe, to a JavaScript Variable? Thanks 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
|