Using XSLTProcessor programatically in IE to minimize client-server bandwith

jgwebber pointed out that the new is using the XSLTProcessor at the client side. This is interesting... while I always thought it is possible, I didn't saw too many cases where this approach is actually useful beyond academic exercises.

As an example, here is the stylesheet used by google:

And here is a sample XML being processed:

<?xml version="1.0" ?>
 <title>pizza in atlanta</title>
 <query>pizza in atlanta</query>
 <center lat="33.748888" lng="-84.388056" />
 <span lat="0.016622" lng="0.017714" />
 <overlay panelStyle="/mapfiles/localpanel.xsl">
  <location infoStyle="/mapfiles/localinfo.xsl" id="A">
   <point lat="33.752099" lng="-84.391900" />
   <icon image="/mapfiles/markerA.png" class="local" />
    <title xml:space="preserve">Kentucky Fried Chicken/Taco Bell/<b>Pizza</b> Hut</title>
     <line>87 Peachtree St SW</line>
     <line>Atlanta, GA 30303</line>
    <phone>(404) 658-1532</phone>
    <distance>0.3 mi NW</distance>
     <references count="9">
       <title xml:space="preserve">Atlanta<b>Pizza</b> Guide-Alphabetical Listings of Atlanta<b>...</b></title>

  { lots more locations... }


Then, the generated HTML will directly render in your web page. In the end, the web traffic is kept at a minimum since all you transfer is a small XML as opposed to a bigger HTML.

Skip to main content