|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
this.processor is nullHi
Guys.
I am using this code
to read & transform an XML document , it works on FF but on IE I get
an error 'this.processor' is null or not an object'
I am kinda new to
Sarissa , so any help would be greatly appreciated.
function
parseXML(xslpath,xmlfile,ssoid){
var output =null; try{ var Sarissaxml = new DOMParser().parseFromString(xmlfile, "text/xml"); alert("got xml"); var Sarissaxslt = Sarissa.getDomDocument(); Sarissaxml.async = false; Sarissaxslt.async = false; Sarissaxslt.load(xslpath); alert("got xsl"); -- this works so I dont think I am missing the sarissa.js file var Sarprocessor = new XSLTProcessor(); Sarprocessor.setParameter(null,"ssoid", ssoid); Sarprocessor.setParameter(null,"newsReaderURL", newsreader_targetURL); Sarprocessor.importStylesheet(Sarissaxslt); alert("transforming"); var XmlDom = Sarprocessor.transformToDocument(Sarissaxml); var serializer = new XMLSerializer(); output = serializer.serializeToString(XmlDom.documentElement); }catch(e){ alert(e.message); onError(e.message); } return
output;
} Thanks
Nikhilesh
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sarissa-users mailing list Sarissa-users@... https://lists.sourceforge.net/lists/listinfo/sarissa-users |
|
|
Re: this.processor is nullFonseca, Nikhilesh (GE, Corporate, consultant) wrote:
> I am using this code to read & transform an XML document , it works on > FF but on IE I get an error 'this.processor' is null or not an object' IE version? > I am kinda new to Sarissa , so any help would be greatly appreciated. Posting a URL or complete sample would make it easier for anyone on the list to help and provide more advice even besides the error (i'm pretty sure there are easier ways in sarissa to do what you are trying to). I don't think there is anything obviously wrong with the code but I just woke up from a couch nap ;-) Cheers, Manos ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sarissa-users mailing list Sarissa-users@... https://lists.sourceforge.net/lists/listinfo/sarissa-users |
|
|
|
|
|
Re: this.processor is nullHi Manos,
var Sarprocessor = new XSLTProcessor(); // Sarprocessor.setParameter(null,"ssoid", ssoid); // Sarprocessor.setParameter(null,"newsReaderURL", newsreader_targetURL); Sarprocessor.importStylesheet(Sarissaxslt); I removed these lines (setParameter) and now it seems to work fine. I had added these yesterday after it worked with root-element change to the xslt. The documents xsl&xml parse without errors. <xsl:param name="url" /> <xsl:param name="newsReaderURL"/> <xsl:param name="ssoid"/> I have these paramters on the XSL. Any thoughts ... Thanks -Nikhilesh -----Original Message----- From: Manos Batsis [mailto:manos_lists@...] Sent: Friday, July 25, 2008 6:13 PM To: Fonseca, Nikhilesh (GE, Corporate, consultant); Sarissa-Users Subject: Re: [Sarissa-users] this.processor is null Fonseca, Nikhilesh (GE, Corporate, consultant) wrote: > Please let me know what else I can send you. Cant really help you at this point - not enough info. Try debugging a bit, for example change alert("got xsl"); to alert(Sarissa.getParseErrorText(Sarissaxslt)); hth, Manos ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sarissa-users mailing list Sarissa-users@... https://lists.sourceforge.net/lists/listinfo/sarissa-users |
|
|
Re: this.processor is nullFonseca, Nikhilesh (GE, Corporate, consultant) wrote:
> Hi Manos, > > var Sarprocessor = new XSLTProcessor(); > // Sarprocessor.setParameter(null,"ssoid", ssoid); > // Sarprocessor.setParameter(null,"newsReaderURL", > newsreader_targetURL); > Sarprocessor.importStylesheet(Sarissaxslt); > > > > I removed these lines (setParameter) and now it seems to work fine. I > had added these yesterday after it worked > with root-element change to the xslt. Ah, right. You need to importStylesheet *before* setting any parameters ;-) Cheers, Manos ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sarissa-users mailing list Sarissa-users@... https://lists.sourceforge.net/lists/listinfo/sarissa-users |
| Free Forum Powered by Nabble | Forum Help |