[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Dynamic processing of xml file using xsl and java

Subject: Re: Dynamic processing of xml file using xsl and javascript
From: ALAN DIVORTY <alan.divorty@xxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2004 13:20:31 +0000 (GMT)
nsixsltprocessor.importstylesheet
Thanks Anton, that worked great and I'm very impressed
with your calendar example.

Even with my limited js skills, I've now managed to
modify it to run straight off with pre-set parameters,
rather than by the onClick event, and to accept
parameters via the url so that it can respond to
hyperlinks in the xslt.

If you or anyone would like to see it let me know.

Alan

 --- Anton Triest <anton@xxxxxxxx> wrote: 
> Alan Divorty wrote:
> 
> > I'm trying the code submitted by Anton on 29
> October 2004 :
> > 
> 
> Hi Alan,
> 
> it seems like that thread got broken, but 2 days
> later I posted an updated version
> Don't know if that would solve the problem but it's
> worth trying:
> 
>   
>
http://users.telenet.be/cking/webstuff/dynamic-xslt/dynamic.html
> 
> (should work on IE6 and Moz)
> 
> HTH,
> Anton
> 
> 
> > <script type="text/javascript"
> language="JavaScript">
> >
> >   var processor = new XSLTProcessor();
> >
> >   var dataXML =
> document.implementation.createDocument("", "",
> null);
> >   dataXML.load("data.xml");
> >
> >   var dataXSL =
> document.implementation.createDocument("", "",
> null);
> >   dataXSL.addEventListener("load", onload, false);
> >   dataXSL.load("data.xsl");
> >
> >   function onload()
> >   {
> >     processor.importStylesheet(dataXSL);
> >   }
> >
> >function XSLTransform(outputElement)
> >{
> >var ownerDocument =
> document.implementation.createDocument("", "",
> null);
> >var newFragment =
> processor.transformToFragment(dataXML,
> ownerDocument);
> >var oldLink = document.getElementById("xsllink");
>
>document.getElementById(outputElement).replaceChild(newFragment,
> oldLink);
> >}
> >
> > </script>
> >
> >but get the error
> >
> >Error: [Exception... "Component returned failure
> code: 0x80004001
> >(NS_ERROR_NOT_IMPLEMENTED)
> [nsIXSLTProcessor.importStylesheet]"  nsresult:
> >"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location:
> "JS frame ::
> >file:///g:/sjc/data_moz.html :: onload :: line 31" 
> data: no]
> >Source File: file:///g:/sjc/data_moz.html
> >Line: 31
> >
> >Line 31 is the
> "processor.importStylesheet(dataXSL);" line.
> >
> >I've tested my data.xml and data.xsl file in an IE
> script and they work
> >fine.
> >
> >I've also upgraded from Firefox 0.8 to 1.0
> >
> >Any ideas?
> >
> >Thanks,
> >Alan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.