Subject: [xsl] Twig::, Xalan, and Character Escaping From: "Monte Hayward" <monte@xxxxxxxxxxxxxxx> Date: Mon, 19 Mar 2001 17:40:24 -0800 |
I'm writing algorithmically identical code for Perl and Java, using Twig:: and Xalan 1.2.2, respectively. Am running into yet another interesting XSL / XML puzzle. Because I am trying to shove normal URLs and javascript calls into a single Element Value, I want to store and retrieve Strings of two types: 1. javascript:myFunc('http://thesite.com/file.ram&cp=1999+Owner&spk=383608&rmp'); 2. http://site.com/player.asp?id=1032" TARGET="player That's right - I want those oddly placed quote marks in example 2. And I don't want them encoded as latin-iso char equivalents or URL encoding. The XML that is delivered: 1. <HRF>javascript:myFunc('http://site.com/file.ram&cp=1999+Owner&spk=383608&rmp');</HRF> 2. <HRF>http://site.com/influences.mov?id=1012&foo=bar" TARGET="playwin</HRF> What TWIG:: Outputs: 1. myFunct('http://site.com/file.ram&cp=&spk=&rmp'); Wrong![Netscape does not decode the '. Javascript error.] 2. http://site.com/player.asp?id=1032&foo=bar" TARGET="playwin Wrong! " should have converted to " What Xalan spews: 1. javascript:p('http://www.virtuetv.com/foo.asx&cp=&spk=3836082&wmp'); Correct! 2. http://site.com/player.asp?id=1032&foo=bar%22%20TARGET=%22p Wrong! Xalan is somehow URL-encoding the String! Even though we know that XSL does not have a URLencode() method! If I give up the hope of sending URLs of type 2 to a new browser window (target=playwin), I solve one problem, the quote mess. Lose one feature, kill one bug. With type 1, TWIG always gives me a wrong result, it seems. The ' does not get decoded by Netscape or IE. Anyone have ideas regarding character encodings across different parsers and XSL Transform Engines? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] local-name Problem, Jeni Tennison | Thread | Re: [xsl] Twig::, Xalan, and Charac, David Carlisle |
RE: [xsl] Reg Counters, Lawrence Pravin | Date | Re: [xsl] Functional programming in, Uche Ogbuji |
Month |