This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Strange XSLt behaviour with Oracle'x xmlparserv2.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Strange XSLt behaviour with Oracle Watch "Strange XSLt behaviour with Oracle New topic

Strange XSLt behaviour with Oracle'x xmlparserv2.jar

Jeo Pepp

Joined: Jul 25, 2001
Posts: 1
Here is some XSL that I am using to transform some XML to HTML
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl:param name="paramA"/>
<xsl:param name="paramB"/>
<xsl:template match="stuff">
<a href="http://some.url/"
onclick="return otherurl('{$paramA}','{$paramB}');">
For parsing and transforming I'm using
Oracle's xdk ( xmlparserv2.jar for Java.
So, what happens is that (non-validating) parsing
goes thru without errors and so does
the XSL processing... but the HTML
that is produced causes (at least in Linux Netscape 4.77)
JavaScript Error:... line 1:
syntax error.
So the problem is the handling of the apostrophes and quotes.
Curiosly enough if I change the onclick line in XSL to read:
onclick='return otherurl("{$paramA}","{$paramB}");'>
(so i change every occurane of " to ' and vice versa)
then everything works fine!!
Additionally this problem does not arise in the first place
when I am using oracles (xmlparser- xmlparserv2.jar
form the paring and XSL processing...
Any comments?! (solutions)
Jeo Pepp
wood burning stoves
subject: Strange XSLt behaviour with Oracle'x xmlparserv2.jar
Similar Threads
Passing expression to setParameter
XSL to html conversion
why no matches past the "/" and no output?
Problem with XSL.
Passing Files in Web Services