<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To Use Google&#8217;s Ajaxslt Library</title>
	<atom:link href="http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/</link>
	<description>My weblog</description>
	<lastBuildDate>Sat, 17 Dec 2011 15:07:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-30114</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Sun, 31 Oct 2010 02:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-30114</guid>
		<description>Winta -- this might answer your question: http://www.eahanson.com/2005/10/23/setting-xsl-parameters-from-javascript-in-ajaxslt/</description>
		<content:encoded><![CDATA[<p>Winta &#8212; this might answer your question: <a href="http://www.eahanson.com/2005/10/23/setting-xsl-parameters-from-javascript-in-ajaxslt/" rel="nofollow">http://www.eahanson.com/2005/10/23/setting-xsl-parameters-from-javascript-in-ajaxslt/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: winta</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-30098</link>
		<dc:creator>winta</dc:creator>
		<pubDate>Sat, 30 Oct 2010 09:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-30098</guid>
		<description>Hi, i wanna set js variable to xsl param.... any idea pls?</description>
		<content:encoded><![CDATA[<p>Hi, i wanna set js variable to xsl param&#8230;. any idea pls?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-12710</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Fri, 26 Sep 2008 15:19:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-12710</guid>
		<description>Hi Jason,

I wrote these posts in 2005 and I haven&#039;t used ajaxslt (or xslt for that matter) much since then. I ditched the approach in favor of building my UI completely in Javascript (no HTML, no CSS, just JS objects).

- Erik</description>
		<content:encoded><![CDATA[<p>Hi Jason,</p>
<p>I wrote these posts in 2005 and I haven&#8217;t used ajaxslt (or xslt for that matter) much since then. I ditched the approach in favor of building my UI completely in Javascript (no HTML, no CSS, just JS objects).</p>
<p>- Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-12704</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 26 Sep 2008 13:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-12704</guid>
		<description>Hi Erik,

Could you tell me how to implement the case:using xsl:include in a xsl file?

Thanks,
Jason</description>
		<content:encoded><![CDATA[<p>Hi Erik,</p>
<p>Could you tell me how to implement the case:using xsl:include in a xsl file?</p>
<p>Thanks,<br />
Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jmike</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-4459</link>
		<dc:creator>jmike</dc:creator>
		<pubDate>Mon, 21 May 2007 10:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-4459</guid>
		<description>I am trying to make this work:

       var xml, xsl, menuNode; //Create variables
       xml = GetXmlHttpObject();
       xml.open(&quot;GET&quot;,&quot;menu.xml&quot;,false);
       xml.send(null);
       xsl = GetXmlHttpObject();
       xsl.open(&quot;GET&quot;,&quot;menu.xsl&quot;,false);
       xsl.send(null);
       menuNode = document.getElementById(&quot;menu&quot;);
       xsltProcessContext(new ExprContext(xml.responseXML), xsl.responseXML,
menuNode);

The algorithm is very simple. It is basically divided into 4 steps:
1. Load the menu.xml
2. Load the menu.xsl
3. Get a container with id &quot;menu&quot;.
4. Transform &quot;menu.xml&quot; with &quot;menu.xsl&quot; and append it into &quot;menu&quot;
using ajaxslt.
Still it doesn&#039;t work. What am I doing wrong?

Please note that menu.xml and menu.xsl are correcly formatted, the div with id &quot;menu&quot; is already loaded when it is called and GetXmlHttpObject() is a function I copied from w3schools site that returns an xmlhttpobject (depending on the browser).</description>
		<content:encoded><![CDATA[<p>I am trying to make this work:</p>
<p>       var xml, xsl, menuNode; //Create variables<br />
       xml = GetXmlHttpObject();<br />
       xml.open(&#8220;GET&#8221;,&#8221;menu.xml&#8221;,false);<br />
       xml.send(null);<br />
       xsl = GetXmlHttpObject();<br />
       xsl.open(&#8220;GET&#8221;,&#8221;menu.xsl&#8221;,false);<br />
       xsl.send(null);<br />
       menuNode = document.getElementById(&#8220;menu&#8221;);<br />
       xsltProcessContext(new ExprContext(xml.responseXML), xsl.responseXML,<br />
menuNode);</p>
<p>The algorithm is very simple. It is basically divided into 4 steps:<br />
1. Load the menu.xml<br />
2. Load the menu.xsl<br />
3. Get a container with id &#8220;menu&#8221;.<br />
4. Transform &#8220;menu.xml&#8221; with &#8220;menu.xsl&#8221; and append it into &#8220;menu&#8221;<br />
using ajaxslt.<br />
Still it doesn&#8217;t work. What am I doing wrong?</p>
<p>Please note that menu.xml and menu.xsl are correcly formatted, the div with id &#8220;menu&#8221; is already loaded when it is called and GetXmlHttpObject() is a function I copied from w3schools site that returns an xmlhttpobject (depending on the browser).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ettiene</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-2544</link>
		<dc:creator>Ettiene</dc:creator>
		<pubDate>Fri, 16 Feb 2007 07:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-2544</guid>
		<description>Hi guys,

Just want to say thanks to all of you for your comments and insight.

I&#039;ve got an xml file with a couple of main nodes (just below root) that I needed to separate and parse them 1 by 1 with an xsl file that contains templates for all of them, into HTML code. Then I&#039;d write out that HTML string to a DIV on one of my webpages. Struggled for 2 days until I stumbled across this site. :)

I basically used Prototype&#039;s XMLHttpRequest implementation together with Sarissa&#039;s XSLTProcessor functions to get it working. And it works on IE and FF! :)

There&#039;s just one problem, in IE my first click does nothing. I basically need to click on my button twice before it starts executing. On FF it works like a charm.

Thanks
Ettiene</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>Just want to say thanks to all of you for your comments and insight.</p>
<p>I&#8217;ve got an xml file with a couple of main nodes (just below root) that I needed to separate and parse them 1 by 1 with an xsl file that contains templates for all of them, into HTML code. Then I&#8217;d write out that HTML string to a DIV on one of my webpages. Struggled for 2 days until I stumbled across this site. :)</p>
<p>I basically used Prototype&#8217;s XMLHttpRequest implementation together with Sarissa&#8217;s XSLTProcessor functions to get it working. And it works on IE and FF! :)</p>
<p>There&#8217;s just one problem, in IE my first click does nothing. I basically need to click on my button twice before it starts executing. On FF it works like a charm.</p>
<p>Thanks<br />
Ettiene</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-1266</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 31 Aug 2006 15:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-1266</guid>
		<description>If you really can&#039;t do date addition in XSLT (I&#039;ve never tried), you could always draw the table with XSLT and then color it later with Javascript.

Though a quick Gooooooooogle search finds this page on XSLT date addition: http://www.dpawson.co.uk/xsl/rev2/dates.html</description>
		<content:encoded><![CDATA[<p>If you really can&#8217;t do date addition in XSLT (I&#8217;ve never tried), you could always draw the table with XSLT and then color it later with Javascript.</p>
<p>Though a quick Gooooooooogle search finds this page on XSLT date addition: <a href="http://www.dpawson.co.uk/xsl/rev2/dates.html" rel="nofollow">http://www.dpawson.co.uk/xsl/rev2/dates.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-1265</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Thu, 31 Aug 2006 13:25:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-1265</guid>
		<description>Hey I need some help regarding this...

 i need to show a page similar to a customized calender 
 where I have a 8*8 table and all the cell will have background color according to the xml data which has a date field

    So if the date have specific data (in xml) I will color out the cell with specific color for that date.

   My problem is in implementing date addition in xslt. I dont know how to solve this may be we can add a javascript function and get its output in xslt ?

Thanks
-sameer</description>
		<content:encoded><![CDATA[<p>Hey I need some help regarding this&#8230;</p>
<p> i need to show a page similar to a customized calender<br />
 where I have a 8*8 table and all the cell will have background color according to the xml data which has a date field</p>
<p>    So if the date have specific data (in xml) I will color out the cell with specific color for that date.</p>
<p>   My problem is in implementing date addition in xslt. I dont know how to solve this may be we can add a javascript function and get its output in xslt ?</p>
<p>Thanks<br />
-sameer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tito</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-1256</link>
		<dc:creator>Tito</dc:creator>
		<pubDate>Tue, 29 Aug 2006 01:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-1256</guid>
		<description>I already have installed firebug... but the problem is that in Firefox works nice... but in IE crashes and close the window... requesting to &quot;Send error&quot; 
...</description>
		<content:encoded><![CDATA[<p>I already have installed firebug&#8230; but the problem is that in Firefox works nice&#8230; but in IE crashes and close the window&#8230; requesting to &#8220;Send error&#8221;<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-1255</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 29 Aug 2006 01:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-1255</guid>
		<description>I haven&#039;t used this library in a while so I can&#039;t remember the things that make it crash. You could try debugging it. I don&#039;t know much about debugging in IE, but if you can get it to crash in Firefox you could try installing the Firebug extension and using its debugger.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t used this library in a while so I can&#8217;t remember the things that make it crash. You could try debugging it. I don&#8217;t know much about debugging in IE, but if you can get it to crash in Firefox you could try installing the Firebug extension and using its debugger.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tito</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-1254</link>
		<dc:creator>Tito</dc:creator>
		<pubDate>Tue, 29 Aug 2006 01:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-1254</guid>
		<description>HI,

Any idea, why in the xsltProcessContext (... IE crashes and it get closed...
If I comment that line, nothing happens... 

var html = xsltProcess(xmlData,xslData);
 var li=document.createElement(&quot;div&quot;);
       li.setAttribute(&quot;id&quot;, &quot;result2&quot;);
     xsltProcessContext(new ExprContext(xmlData),xslData, li);  ### ANY IDEA WHY IN IE CRASH HERE ??? 
      var nd = document.getElementById(&quot;result&quot;);
       var parentDiv = nd.parentNode;
         parentDiv.replaceChild(li, nd);
         li.setAttribute(&quot;id&quot;, &quot;result&quot;);

Thanks,
Tito</description>
		<content:encoded><![CDATA[<p>HI,</p>
<p>Any idea, why in the xsltProcessContext (&#8230; IE crashes and it get closed&#8230;<br />
If I comment that line, nothing happens&#8230; </p>
<p>var html = xsltProcess(xmlData,xslData);<br />
 var li=document.createElement(&#8220;div&#8221;);<br />
       li.setAttribute(&#8220;id&#8221;, &#8220;result2&#8243;);<br />
     xsltProcessContext(new ExprContext(xmlData),xslData, li);  ### ANY IDEA WHY IN IE CRASH HERE ???<br />
      var nd = document.getElementById(&#8220;result&#8221;);<br />
       var parentDiv = nd.parentNode;<br />
         parentDiv.replaceChild(li, nd);<br />
         li.setAttribute(&#8220;id&#8221;, &#8220;result&#8221;);</p>
<p>Thanks,<br />
Tito</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-974</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 30 Jul 2006 20:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-974</guid>
		<description>Thnks again for the pointer. It was actually logging. I found the global var in the misc.js file.
I&#039;ve left it as true for the mean time and have alteredit as a local variable in my script I am running, a la 
&lt;!-- AJAXSLT --&gt;
    
    
    
    
    
&lt;!-- AJAXSLT --&gt;
    
			var logging__ = false;

all the best,
Phil</description>
		<content:encoded><![CDATA[<p>Thnks again for the pointer. It was actually logging. I found the global var in the misc.js file.<br />
I&#8217;ve left it as true for the mean time and have alteredit as a local variable in my script I am running, a la<br />
<!-- AJAXSLT --></p>
<p><!-- AJAXSLT --></p>
<p>			var logging__ = false;</p>
<p>all the best,<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-973</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Sun, 30 Jul 2006 20:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-973</guid>
		<description>Excellent. To turn off debugging, I think all you have to do is set the global variables &quot;xsltdebug&quot; and &quot;xpathdebug&quot; to false.</description>
		<content:encoded><![CDATA[<p>Excellent. To turn off debugging, I think all you have to do is set the global variables &#8220;xsltdebug&#8221; and &#8220;xpathdebug&#8221; to false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-972</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 30 Jul 2006 20:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-972</guid>
		<description>thanks, erik, I am away now =), however how do you turn the debugging off.
kind regards</description>
		<content:encoded><![CDATA[<p>thanks, erik, I am away now =), however how do you turn the debugging off.<br />
kind regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-968</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Sun, 30 Jul 2006 15:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-968</guid>
		<description>The third parameter to xsltProcessContext needs to be a node that already exists on your page -- that is, it&#039;s the node on your page that the result of the XML+XSL is rendered into. (You could use the &quot;body&quot; node or an empty div, for example.)</description>
		<content:encoded><![CDATA[<p>The third parameter to xsltProcessContext needs to be a node that already exists on your page &#8212; that is, it&#8217;s the node on your page that the result of the XML+XSL is rendered into. (You could use the &#8220;body&#8221; node or an empty div, for example.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-966</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 30 Jul 2006 13:48:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-966</guid>
		<description>I hope you can help...

i thought the following would display my xml pge through my xsl page, however all i get is a grey box in top right corner with parse details.

I click on link ro run &quot;runNow()&quot; function whicin turn runs requesXML &amp; requestXSL (same as requesXML but not getting root_node. then onto the xsltprocess context

i would appreciate any help, 
thanks

         var http_requestXML = false;
            var http_requestXSL = false;
            var xmldoc = false;            
            var xsldoc = false;
            var root_node = false;            
            
            function requestXML(url) {
                http_requestXML = false;
                if (window.XMLHttpRequest) { // Mozilla, Safari,...
                    http_requestXML = new XMLHttpRequest();
                    if (http_requestXML.overrideMimeType) {
                        http_requestXML.overrideMimeType(&#039;text/xml&#039;);
                    }
                } else if (window.ActiveXObject) { // IE
                    try {
                        http_requestXML = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
                    } catch (e) {
                        try {
                        http_requestXML = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
                        } catch (e) {}
                    }
                }

                if (!http_requestXML) {
                    alert(&#039;Giving up :( Cannot create an XMLHTTP instance&#039;);
                    return false;
                }
                http_requestXML.onreadystatechange = getXML;
                http_requestXML.open(&#039;GET&#039;, url, true);
                http_requestXML.send(null);

            }

            function getXML() {
                if (http_requestXML.readyState == 4) {
                    if (http_requestXML.status == 200) {
                       xmldoc = http_requestXML.responseXML;
                       alert(&#039;gotXMLDoc.&#039;);
                       var root_node = xmldoc.getElementsByTagName(&#039;root&#039;);
                       alert(&#039;got root_node.&#039;);
                       } else {
                        alert(&#039;There was a problem with the request.&#039;);
                    }
                }
            }

            function runNow()	{
requestXML(&#039;test.xml&#039;);
requestXSL(&#039;test.xsl&#039;);
xsltProcessContext(new ExprContext(http_requestXML.responseXML), http_requestXSL.responseXML, root_node);
            }</description>
		<content:encoded><![CDATA[<p>I hope you can help&#8230;</p>
<p>i thought the following would display my xml pge through my xsl page, however all i get is a grey box in top right corner with parse details.</p>
<p>I click on link ro run &#8220;runNow()&#8221; function whicin turn runs requesXML &amp; requestXSL (same as requesXML but not getting root_node. then onto the xsltprocess context</p>
<p>i would appreciate any help,<br />
thanks</p>
<p>         var http_requestXML = false;<br />
            var http_requestXSL = false;<br />
            var xmldoc = false;<br />
            var xsldoc = false;<br />
            var root_node = false;            </p>
<p>            function requestXML(url) {<br />
                http_requestXML = false;<br />
                if (window.XMLHttpRequest) { // Mozilla, Safari,&#8230;<br />
                    http_requestXML = new XMLHttpRequest();<br />
                    if (http_requestXML.overrideMimeType) {<br />
                        http_requestXML.overrideMimeType(&#8216;text/xml&#8217;);<br />
                    }<br />
                } else if (window.ActiveXObject) { // IE<br />
                    try {<br />
                        http_requestXML = new ActiveXObject(&#8220;Msxml2.XMLHTTP&#8221;);<br />
                    } catch (e) {<br />
                        try {<br />
                        http_requestXML = new ActiveXObject(&#8220;Microsoft.XMLHTTP&#8221;);<br />
                        } catch (e) {}<br />
                    }<br />
                }</p>
<p>                if (!http_requestXML) {<br />
                    alert(&#8216;Giving up :( Cannot create an XMLHTTP instance&#8217;);<br />
                    return false;<br />
                }<br />
                http_requestXML.onreadystatechange = getXML;<br />
                http_requestXML.open(&#8216;GET&#8217;, url, true);<br />
                http_requestXML.send(null);</p>
<p>            }</p>
<p>            function getXML() {<br />
                if (http_requestXML.readyState == 4) {<br />
                    if (http_requestXML.status == 200) {<br />
                       xmldoc = http_requestXML.responseXML;<br />
                       alert(&#8216;gotXMLDoc.&#8217;);<br />
                       var root_node = xmldoc.getElementsByTagName(&#8216;root&#8217;);<br />
                       alert(&#8216;got root_node.&#8217;);<br />
                       } else {<br />
                        alert(&#8216;There was a problem with the request.&#8217;);<br />
                    }<br />
                }<br />
            }</p>
<p>            function runNow()	{<br />
requestXML(&#8216;test.xml&#8217;);<br />
requestXSL(&#8216;test.xsl&#8217;);<br />
xsltProcessContext(new ExprContext(http_requestXML.responseXML), http_requestXSL.responseXML, root_node);<br />
            }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jin</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-274</link>
		<dc:creator>Jin</dc:creator>
		<pubDate>Wed, 26 Apr 2006 00:43:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-274</guid>
		<description>I used the xPath example above, but it took me a little while to figure out how to iterate over the resulting node-set, so I&#039;m posting it here.

  	var expr = xpathParse(xPath);
	var nodeSet = expr.evaluate(new ExprContext(this));
	//this returns a &quot;node-set&quot; object which must be converted to an array of nodes
	var nodeArr = nodeSet.nodeSetValue();

        //now you can use the array of nodes to iterate

for(var i=0; i </description>
		<content:encoded><![CDATA[<p>I used the xPath example above, but it took me a little while to figure out how to iterate over the resulting node-set, so I&#8217;m posting it here.</p>
<p>  	var expr = xpathParse(xPath);<br />
	var nodeSet = expr.evaluate(new ExprContext(this));<br />
	//this returns a &#8220;node-set&#8221; object which must be converted to an array of nodes<br />
	var nodeArr = nodeSet.nodeSetValue();</p>
<p>        //now you can use the array of nodes to iterate</p>
<p>for(var i=0; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-139</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Wed, 15 Mar 2006 06:54:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-139</guid>
		<description>The XMLHttpRequests are asyncronous by default, so the results are probably not coming back by the time the xstlProcessContext method is called. Try making the requests synchronous (by sending &quot;false&quot; as the last parameter to the request.open() methods), or move the last 4 lines of code into the processReqChange method.</description>
		<content:encoded><![CDATA[<p>The XMLHttpRequests are asyncronous by default, so the results are probably not coming back by the time the xstlProcessContext method is called. Try making the requests synchronous (by sending &#8220;false&#8221; as the last parameter to the request.open() methods), or move the last 4 lines of code into the processReqChange method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tmn</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-137</link>
		<dc:creator>tmn</dc:creator>
		<pubDate>Tue, 14 Mar 2006 21:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-137</guid>
		<description>Does anyone see anything wrong with the following? I&#039;m trying to use the XMLHttpRequest  load xml and xslt documents like in the example above. Nothing is rendering though, the screen just remains blank. I tried xmlText(myXmlRequest.responseXML); and it returns empty. 

function transformXML()
		{
			var myXmlRequest = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
			var myXslRequest = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
			
			myXmlRequest.onreadystatechange = processReqChange;
			myXmlRequest.open(&quot;GET&quot;, &quot;table0.xml&quot;, true);
			myXmlRequest.send();
			
			myXslRequest.onreadystatechange = processReqChange;
			myXslRequest.open(&quot;GET&quot;, &quot;table0.xslt&quot;, true);
			myXslRequest.send();
			
			xmlText(myXmlRequest.responseXML);
			var myNode = document.getElementById(&quot;htmldisplay&quot;);
			xsltProcessContext(new ExprContext(myXmlRequest.responseXML), myXslRequest.responseXML, myNode);
		}

thanks!</description>
		<content:encoded><![CDATA[<p>Does anyone see anything wrong with the following? I&#8217;m trying to use the XMLHttpRequest  load xml and xslt documents like in the example above. Nothing is rendering though, the screen just remains blank. I tried xmlText(myXmlRequest.responseXML); and it returns empty. </p>
<p>function transformXML()<br />
		{<br />
			var myXmlRequest = new ActiveXObject(&#8220;Microsoft.XMLHTTP&#8221;);<br />
			var myXslRequest = new ActiveXObject(&#8220;Microsoft.XMLHTTP&#8221;);</p>
<p>			myXmlRequest.onreadystatechange = processReqChange;<br />
			myXmlRequest.open(&#8220;GET&#8221;, &#8220;table0.xml&#8221;, true);<br />
			myXmlRequest.send();</p>
<p>			myXslRequest.onreadystatechange = processReqChange;<br />
			myXslRequest.open(&#8220;GET&#8221;, &#8220;table0.xslt&#8221;, true);<br />
			myXslRequest.send();</p>
<p>			xmlText(myXmlRequest.responseXML);<br />
			var myNode = document.getElementById(&#8220;htmldisplay&#8221;);<br />
			xsltProcessContext(new ExprContext(myXmlRequest.responseXML), myXslRequest.responseXML, myNode);<br />
		}</p>
<p>thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benson Margulies</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-121</link>
		<dc:creator>Benson Margulies</dc:creator>
		<pubDate>Sat, 04 Mar 2006 03:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-121</guid>
		<description>Firefox&#039;s builtin DOM doesn&#039;t work with this XPath. It constantly encounters permission errors.

Continuing from thrown exception.
Exception ``Permission denied to get property XMLDocument.firstChild&#039;&#039; thrown from function xpathCollectDescendants(nodelist=Array:{2}, node=XMLDocument:{0}) in  line 2094.
Stopped for thrown exception.

Furthermore, IE and Firefox disagree on their handling of namespace prefixes. IE leaves them in the names of nodes, Firefox removes them. 

This can all be ducked by using the DOM parser that comes in the package, but it is very, very, slow in IE6. So, it looks like one would use the native DOM on IE and the google DOM on Firefox. Hmm.</description>
		<content:encoded><![CDATA[<p>Firefox&#8217;s builtin DOM doesn&#8217;t work with this XPath. It constantly encounters permission errors.</p>
<p>Continuing from thrown exception.<br />
Exception &#8220;Permission denied to get property XMLDocument.firstChild&#8221; thrown from function xpathCollectDescendants(nodelist=Array:{2}, node=XMLDocument:{0}) in  line 2094.<br />
Stopped for thrown exception.</p>
<p>Furthermore, IE and Firefox disagree on their handling of namespace prefixes. IE leaves them in the names of nodes, Firefox removes them. </p>
<p>This can all be ducked by using the DOM parser that comes in the package, but it is very, very, slow in IE6. So, it looks like one would use the native DOM on IE and the google DOM on Firefox. Hmm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-36</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 12 Jan 2006 00:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-36</guid>
		<description>The XMLHttpRequest is part of Javascript and therefore lives in the browser, not on the server. The server just has to respond to regular HTTP requests, usually by sending XML though it&#039;s not necessary.

For example, your Javascript might make an XMLHttpRequest for http://www.example.com/cgi-bin/foo.pl which would then return some XML for the Javascript to process.

You can read more about XMLHttpRequest here: http://developer.apple.com/internet/webcontent/xmlhttpreq.html</description>
		<content:encoded><![CDATA[<p>The XMLHttpRequest is part of Javascript and therefore lives in the browser, not on the server. The server just has to respond to regular HTTP requests, usually by sending XML though it&#8217;s not necessary.</p>
<p>For example, your Javascript might make an XMLHttpRequest for <a href="http://www.example.com/cgi-bin/foo.pl" rel="nofollow">http://www.example.com/cgi-bin/foo.pl</a> which would then return some XML for the Javascript to process.</p>
<p>You can read more about XMLHttpRequest here: <a href="http://developer.apple.com/internet/webcontent/xmlhttpreq.html" rel="nofollow">http://developer.apple.com/internet/webcontent/xmlhttpreq.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-35</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Wed, 11 Jan 2006 21:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-35</guid>
		<description>hi, I am a newbie to this AJAX and SLT and XPATH stuff so please ignore my ignorance!

I&#039;ve been reading docs on ajax and they all seem to talk about this XML request. Where is the server for this request located? I have a web server running apache, and I have some perl cgi&#039;s that query MySQL to retrieve information from users. Do I need to add another module on my machine (server side) to handle the XML requests that AJAX sends? Please clarify!</description>
		<content:encoded><![CDATA[<p>hi, I am a newbie to this AJAX and SLT and XPATH stuff so please ignore my ignorance!</p>
<p>I&#8217;ve been reading docs on ajax and they all seem to talk about this XML request. Where is the server for this request located? I have a web server running apache, and I have some perl cgi&#8217;s that query MySQL to retrieve information from users. Do I need to add another module on my machine (server side) to handle the XML requests that AJAX sends? Please clarify!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-15</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Mon, 12 Dec 2005 15:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-15</guid>
		<description>I forgot to mention it in my short tutorial, but as you have discovered, Ajaxslt appends its result to the node you pass in.

One way to get around it is to remove all the child nodes of the target node before calling xsltProcessContext().

Another way would be to create a new node (perhaps a div), pass that into xsltProcessContext(), and tell your target node&#039;s parent to replace the target node with the new node that you created (something like: targetNode.parentNode.replaceChild(newNode, targetNode) )</description>
		<content:encoded><![CDATA[<p>I forgot to mention it in my short tutorial, but as you have discovered, Ajaxslt appends its result to the node you pass in.</p>
<p>One way to get around it is to remove all the child nodes of the target node before calling xsltProcessContext().</p>
<p>Another way would be to create a new node (perhaps a div), pass that into xsltProcessContext(), and tell your target node&#8217;s parent to replace the target node with the new node that you created (something like: targetNode.parentNode.replaceChild(newNode, targetNode) )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anh Khoa Huynh</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-13</link>
		<dc:creator>Anh Khoa Huynh</dc:creator>
		<pubDate>Sun, 11 Dec 2005 07:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-13</guid>
		<description>Hi Erik

I follow your reply and get the result successfully. But it seems that the result is appended to the ABC text which is available before. So what should i do to replace ABC text with the result instead of appending ?

Thanks a lot Erik,
ANH KHOA HUYNH</description>
		<content:encoded><![CDATA[<p>Hi Erik</p>
<p>I follow your reply and get the result successfully. But it seems that the result is appended to the ABC text which is available before. So what should i do to replace ABC text with the result instead of appending ?</p>
<p>Thanks a lot Erik,<br />
ANH KHOA HUYNH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-12</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Sat, 10 Dec 2005 23:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-12</guid>
		<description>The message at the top-right is some Ajaxslt debugging info, which I seem to remember is enabled by default. I forget right now how to disable it, but it shouldn&#039;t be too hard. 

Your code looks fine upon quick inspection. If you&#039;re sure that you&#039;re getting the XML and XSL back correctly (which you can inspect with the xmlText() function described above), then it might be a matter of the XSL not matching any elements in the XML so you might need to fiddle with the XSL a bit.</description>
		<content:encoded><![CDATA[<p>The message at the top-right is some Ajaxslt debugging info, which I seem to remember is enabled by default. I forget right now how to disable it, but it shouldn&#8217;t be too hard. </p>
<p>Your code looks fine upon quick inspection. If you&#8217;re sure that you&#8217;re getting the XML and XSL back correctly (which you can inspect with the xmlText() function described above), then it might be a matter of the XSL not matching any elements in the XML so you might need to fiddle with the XSL a bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anh Khoa Huynh</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-10</link>
		<dc:creator>Anh Khoa Huynh</dc:creator>
		<pubDate>Sat, 10 Dec 2005 09:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-10</guid>
		<description>First of all, i want to say thanks to you.

At the page http://www.ubivn.com/xichlo/?m=ajax&amp;a=tutorial1 , i follow your tutorial. After clicking on the &quot;Get XML&quot; and &quot;Get XSLT&quot; button to fetch 2 file tutorial1.xml and tutorial1.xsl, i click on the &quot;Get Result&quot; then I get the message at the top-right of the screen. Did I do something wrong in my source code ?

Thanks in advance,

ANH KHOA HUYNH</description>
		<content:encoded><![CDATA[<p>First of all, i want to say thanks to you.</p>
<p>At the page <a href="http://www.ubivn.com/xichlo/?m=ajax&amp;a=tutorial1" rel="nofollow">http://www.ubivn.com/xichlo/?m=ajax&amp;a=tutorial1</a> , i follow your tutorial. After clicking on the &#8220;Get XML&#8221; and &#8220;Get XSLT&#8221; button to fetch 2 file tutorial1.xml and tutorial1.xsl, i click on the &#8220;Get Result&#8221; then I get the message at the top-right of the screen. Did I do something wrong in my source code ?</p>
<p>Thanks in advance,</p>
<p>ANH KHOA HUYNH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-9</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Mon, 28 Nov 2005 17:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-9</guid>
		<description>Hi Gary,

I use the Ajaxslt library to do exactly what you are asking about. 

My HTML page and Javascript load and put up a &quot;Loading...&quot; message. Then the Javascript makes an XmlHttpRequest for some XML and another XmlHttpRequest for some XSL. When both have arrived, I get the XML and XSL from the XmlHttpRequests (using the XmlHttpRequest&#039;s &quot;responseXML&quot; field) and have Ajaxslt render them.

So something like: 

xsltProcessContext(new ExprContext(myXmlRequest.responseXML), myXslRequest.responseXML, myNode);

Apple has a good tutorial on XmlHttpRequest: http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Also, the Prototype library has an XmlHttpRequest wrapper (but not much documentation): http://prototype.conio.net/

And don&#039;t forget about the Ajaxslt list: http://groups.google.com/group/google-ajax-discuss</description>
		<content:encoded><![CDATA[<p>Hi Gary,</p>
<p>I use the Ajaxslt library to do exactly what you are asking about. </p>
<p>My HTML page and Javascript load and put up a &#8220;Loading&#8230;&#8221; message. Then the Javascript makes an XmlHttpRequest for some XML and another XmlHttpRequest for some XSL. When both have arrived, I get the XML and XSL from the XmlHttpRequests (using the XmlHttpRequest&#8217;s &#8220;responseXML&#8221; field) and have Ajaxslt render them.</p>
<p>So something like: </p>
<p>xsltProcessContext(new ExprContext(myXmlRequest.responseXML), myXslRequest.responseXML, myNode);</p>
<p>Apple has a good tutorial on XmlHttpRequest: <a href="http://developer.apple.com/internet/webcontent/xmlhttpreq.html" rel="nofollow">http://developer.apple.com/internet/webcontent/xmlhttpreq.html</a></p>
<p>Also, the Prototype library has an XmlHttpRequest wrapper (but not much documentation): <a href="http://prototype.conio.net/" rel="nofollow">http://prototype.conio.net/</a></p>
<p>And don&#8217;t forget about the Ajaxslt list: <a href="http://groups.google.com/group/google-ajax-discuss" rel="nofollow">http://groups.google.com/group/google-ajax-discuss</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-8</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Mon, 28 Nov 2005 03:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-8</guid>
		<description>Hi Erik,

thank you very much for your tutorial. It helps me to understand Google AJAXSLT better. I have a question though, and I hope u can / would help me solve the problem. 

In your tutorial, it seems that the XML &amp; XSL are put in a text form in the code. I&#039;d like to use AJAXSLT to import an external XML &amp; XSL file, perform the transformation, and generate an text xml-output. Is it possible to perfrom this task using AJAXSLT?

Thank you very much in advance,

Gary</description>
		<content:encoded><![CDATA[<p>Hi Erik,</p>
<p>thank you very much for your tutorial. It helps me to understand Google AJAXSLT better. I have a question though, and I hope u can / would help me solve the problem. </p>
<p>In your tutorial, it seems that the XML &amp; XSL are put in a text form in the code. I&#8217;d like to use AJAXSLT to import an external XML &amp; XSL file, perform the transformation, and generate an text xml-output. Is it possible to perfrom this task using AJAXSLT?</p>
<p>Thank you very much in advance,</p>
<p>Gary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neil</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-6</link>
		<dc:creator>neil</dc:creator>
		<pubDate>Wed, 16 Nov 2005 21:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-6</guid>
		<description>I just found this while randomly browsing and having seen the above 2 comments I thought I would add my own thankyou. I am just looking into setting up my own ajax/ruby etc project (after years of assorted everything else) and this site is a great help and a great example to me to do the same kind of technical documentation.

Cheers
Neil</description>
		<content:encoded><![CDATA[<p>I just found this while randomly browsing and having seen the above 2 comments I thought I would add my own thankyou. I am just looking into setting up my own ajax/ruby etc project (after years of assorted everything else) and this site is a great help and a great example to me to do the same kind of technical documentation.</p>
<p>Cheers<br />
Neil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-5</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Mon, 07 Nov 2005 04:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-5</guid>
		<description>You&#039;re welcome. A little while ago, I decided that if I ever struggled with something techincal, I&#039;d write up a howto and put it online in the hopes that it would save someone a little time. I&#039;m glad that it&#039;s helped at least one person...</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. A little while ago, I decided that if I ever struggled with something techincal, I&#8217;d write up a howto and put it online in the hopes that it would save someone a little time. I&#8217;m glad that it&#8217;s helped at least one person&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MLGrant</title>
		<link>http://www.eahanson.com/2005/09/30/how-to-use-googles-ajaxslt-library/comment-page-1/#comment-4</link>
		<dc:creator>MLGrant</dc:creator>
		<pubDate>Mon, 07 Nov 2005 04:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=4#comment-4</guid>
		<description>Erik,

Just wanted to say thank you for this (and your other) How To, this is just what I need to get a foot in the door with Ajaxslt!  It&#039;s really hard to know where to start in order to get a handle on this technology as it evolves so it helps to simplify things like this.

Regards,
MLGrant</description>
		<content:encoded><![CDATA[<p>Erik,</p>
<p>Just wanted to say thank you for this (and your other) How To, this is just what I need to get a foot in the door with Ajaxslt!  It&#8217;s really hard to know where to start in order to get a handle on this technology as it evolves so it helps to simplify things like this.</p>
<p>Regards,<br />
MLGrant</p>
]]></content:encoded>
	</item>
</channel>
</rss>

