[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Troubles with libxslt in PHP again: CDATA in <scri
Hi Martynus,
See my comments below Martynas Jusevicius wrote: Hi Abel, That's PHP. I am interested in XSLT: what processor version do you use? Please follow the list guidelines and use the info you get in any subsequent posts so we can more easily help you: http://www.mulberrytech.com/xsl/xsl-list/processor-version.xsl (from: http://www.mulberrytech.com/xsl/xsl-list/#posting) My template contained JavaScript based on Google Maps API's "Hello world": That link doesn't work for me, it points to the google signup page. So it looked like this:(sample truncated) Ah, that's an interesting piece of XSLT! Thanks, that makes it easier to find a remedy. But first of all: I ran your code (after removing the pieces that gave a compile time error) and guess what: no sign of <![CDATA[ in the output *at all*! So my guess is still that your serializer has some funny tidbits, or for the oddest reason, your ISP's HTTP daemon adds them... But rest assured, you can easily resolve it: just remove all the CDATA opening and closing tags. They have no business there. The only reason you should use them is for easier writing of < and &. Any other symbol can be left as is, including > and ' and " (in all but a few situations). To make this work, simply change the single "<" with < or reverse the statement to read "children.length >= i". This will output these as < or >. And IIRC, modern browsers have no trouble with xml entities inside javascript when you set the doctype to XHTML. (sample output truncated)(I hope I didn't introduce errors by cutting out not so important stuff). And what I get as output is: Of course, if this works fine and you are content with the HTML (and you don't intend to parse it back as XML) then there's no worry about resolving this issue. Still I am wondering why you manage to get such a strange output, I hope you can update with information on your processor *and* please run your code from the commandline to be sure PHP or your ISP isn't messing things up, the output from the commandline will proof *very* interesting. I've send you the details of a download site for xsltproc in my previous mail.
|
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
|