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

Transforming using Javascript's documentElement

Subject: Transforming using Javascript's documentElement
From: Rosa I-Ting Cheng <Rosa@xxxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 13:06:20 +1000
javascript documentelement
thanx, I tried that... now it works on some... but still not on others... it
give the error: Attemp to modify a read only node
all I did was this:
		qXML.load(qXML.src);
		fXSL.load(xsl1);
		
		fXSL.async = false;   <-- newly added
	
qXML.transformNodeToObject(fXSL.documentElement,gpXML.XMLDocument);
		fXSL.load(xsl2);

		fXSL.async = false;	<-- newly added
	
mainBody.document.write(gpXML.transformNode(fXSL.documentElement));
		mainBody.document.close();
it's better than not putting that fXSL.async = false; line in. but still not
working for some... why is that?


-----Original Message-----
From: Chris Bayes [mailto:Chris@xxxxxxxxxxx]
Sent: Thursday, 12 July 2001 7:47 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Transforming using Javascript's documentElement


Rosa,
You need to set fXSL.async = false;

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Rosa I-Ting
>Cheng
>Sent: 12 July 2001 05:16
>To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
>Subject:  Transforming using Javascript's documentElement
>
>
>I'm not sure if this has been asked before... but can anyone please tell me
>why sometimes fXML.documentElement returns a null and sometimes it doesn't?
>this is the javascript code I have:
>
><HTML>
><HEAD>
><SCRIPT>
>	function writeToPage(xsl1, xsl2)
>	{
>		qXML.load(qXML.src);
>		fXSL.load(xsl1);
>
>
>qXML.transformNodeToObject(fXSL.documentElement,gpXML.XMLDocument);
>//fXSL.do
>cumentElement always have problems
>		fXSL.load(xsl2);
>
>
>mainBody.document.write(gpXML.transformNode(fXSL.documentElement));
>		mainBody.document.close();
>	}
></SCRIPT>
><HEAD>
><BODY>
><xml id="qXML" src="TotalQuotesPolicies.xml"></xml>
><xml id="gpXML"></xml>
><xml id="fXSL"></xml>
>...
></BODY>
><HTML>
>
>I'm trying to transform the XML twice with 2 different XSLs. And when I
>directly put in the
><?xml-stylesheet type="text/xsl" href="saBySALogin2.xsl"?>
>line in the XML, the transformation works fine, but when trying to use that
>javascrit code above, at times it works and at times it doesn't. I know it
>is due to the fXML.documentElement return null and the
>transformNodeToObject() and the transformNode() returns an error when that
>happens... is there a way around it? or a substitute for the
>documentElement? or am I doing something wrong?
>
>thank you!
>
>
>Ross
>
>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.