[XML4Lib] performing XSLT transformations with a browser

Roy Tennant roy.tennant at ucop.edu
Wed Jan 18 10:12:10 EST 2006

This may be stating the obvious, but I'd like to point out that this  
can also be done on the server side if you don't want to do Ajax.  
That is, the document is transformed into HTML via XSLT on the  
server, with column head links that would pass a parameter back to  
the server to change the rendering of the document when clicked. All  
pretty standard stuff, but of course it requires a page reload which  
the Javascript solution would not.

On Jan 18, 2006, at 6:52 AM, Reese, Terry wrote:

> Hum,
> It sounds like you want to make use of the XMLHTTPRequest  
> object...an object that's been in IE since 5.0, Firefox since 1.0,  
> Netscape since 6.0 and Opera since 8.0.  Essentially, what the  
> object allows is for snippets of XML to be extracted by the clients  
> browser and then rendered against an XSLT.  Wikipedia has an entry  
> on this particular object at: http://en.wikipedia.org/wiki/ 
> Xmlhttprequest because this is one the primary components making up  
> some of the foundational elements of these so called AJAX  
> technologies.
> A very simple example of how this object can be used to generate on  
> the fly websites using nothing but a browser, some xml files and a  
> little bit of javascript can be found in the new MarcEdit 5.0 help  
> files.  The documentation is entirely XML-based (so that its easier  
> to translate into other languages) and is rendered completely  
> through the use of an XSLT stylesheet.  To facilitate the process,  
> an html file is used which then acts as a mediator between the  
> XMLHTTPRequest object, the xml files and the XSLT display file.   
> Using this technique, the webpage is never actually reloaded --  
> rather, the transformed results are placed inline into the XML  
> document within a specified table cell.  The help file isn't  
> finished (so not all the links currently work) -- but if you want  
> to see how its working, go to: http://oregonstate.edu/~reeset/ 
> marcedit/html/help/marcedit5_0/index.html
> Expand one of the menu items and then click on the topic (any topic  
> but Help for Programmers -- this is the sole topic that has been  
> pre-transformed into html from the xml source files).  If you view  
> the page source, you can see how the XMLHTTPRequest object is being  
> called...if you want to see some of the XML files (they are really  
> simple), an example topic file is found here: http:// 
> oregonstate.edu/~reeset/marcedit/html/help/marcedit5_0/xml/ 
> system_requirements.xml
> If you want to take a look at the snippet xslt file, its a very  
> simple xslt file that is found here: http://oregonstate.edu/~reeset/ 
> marcedit/html/help/marcedit5_0/xslt/snippet.xsl
> --Terry
> *******************************************
> Terry Reese
> Cataloger for Networked Resources
> Digital Production Unit Head
> Oregon State University Libraries
> Corvallis, OR  97331
> tel: 541-737-6384
> email: terry.reese at oregonstate.edu
> http: http://oregonstate.edu/~reeset
> *******************************************
> From: xml4lib-bounces at webjunction.org on behalf of John Fitzgibbon
> Sent: Wed 1/18/2006 4:47 AM
> To: xml4lib at webjunction.org
> Subject: [XML4Lib] performing XSLT transformations with a browser
> Hi,
> Is it possible to place my XML and XSLT files on a web server and have
> both files delivered to the browser by HTTPD when the XML file is
> requested so that an event like clicking on a button or link in the  
> file would have the effect of passing a parameter to the XSLT file  
> which
> would cause the XML file to be transformed differently.
> For example, is it possible to change the sort order of a table by
> clicking on a column heading to pass a parameter to the XSLT file  
> which
> then transforms the XML file so that the sort order is changed?
> Are there any websites which describe how this can be done?
> I only have access to a virtual host on an ISP's web server so it will
> not be possible for me to install executables on the server.
> Also, if XSLT works in this way (similar to JavaScript) it would mean
> that pages are displayed more quickly because the pages are not being
> downloaded from a web server each time.
> Any ideas would be much appreciated?
> Regards
> John
> John Fitzgibbon
> Galway Public Library
> Island House
> Cathedral Square
> Galway
> Ireland
> p: 00 353 91 562471
> f: 00 353 91 565039
> w: http://www.galwaylibrary.ie
> *******************************************************************
> Tá eolas atá príobháideach agus rúnda sa ríomhphost seo
> agus aon iatán a ghabhann leis agus is leis an duine/na daoine
> sin amháin a bhfuil siad seolta chucu a bhaineann siad.
> Mura seolaí thú, níl tú údaraithe an ríomhphost nó aon iatán
> a ghabhann leis a léamh, a chóipáil ná a úsáid.
> Má tá an ríomhphost seo faighte agat trí dhearmad,
> cuir an seoltóir ar an eolas thrí aischur ríomhphoist
> agus scrios ansin é le do thoil.
> This e-mail and any attachment contains information which is
> private and confidential and is intended for the addressee
> only. If you are not an addressee, you are not authorised
> to read, copy or use the e-mail or any attachment.
> If you have received this e-mail in error, please notify
> the sender by return e-mail and then destroy it.
> *********************************************************************
> _______________________________________________
> XML4Lib mailing list
> XML4Lib at webjunction.org
> http://lists.webjunction.org/mailman/listinfo/xml4lib
> _______________________________________________
> XML4Lib mailing list
> XML4Lib at webjunction.org
> http://lists.webjunction.org/mailman/listinfo/xml4lib

More information about the XML4Lib mailing list