Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: Newbie, HTML calling XSLT

Thread Tools

Re: Newbie, HTML calling XSLT

Martin Honnen
Posts: n/a

Clive wrote:

> For an exercise, I would like to write a simple HTML page that calls
> XSLT and passes it parameters.
> I know how to "accept" parameters into xslt and I have tested this
> using Oxygen XML editor. It is the HTML to XSLT connection I don't
> understand.
> Can this "link" be achieved with pure (X)HTML or do I need some
> programming language like Perl or php to achieve this?

HTML is a markup language which allows to markup a document that is then
usually rendered in a user agent.
HTML is not a programming language while XSLT is one.

In some user agents, lets call them desktop browsers, you can have
script embedded in a HTML document executed in the browser and even
fewer of those browsers also allow script to access an XSLT processor
and run an XSLT transformation and then also allow to pass parameters to
the XSLT processor before a transformation is performed.
So using client-side JavaScript in Mozilla 1.2, Firefox, and in IE 6/Win
(or IE 5 and 5.5 Win if an XSLT processor like MSXML 3 or 4 is
installed) you can indeed do client-side XSLT transformation, not with
HTML alone of course, but with script embedded in a HTML document.

Client-side is one approach although as you can see with the
restrictions on a few browsers not a reliable one. Server-side XSLT is
another approach but that of course requires that the HTML document
contains a form or at least a link to a server-side script where the
XSLT transformation is performed. Parameters are then passed from the
HTML document in the browser to the server as usual, in the query string
of the URL requested or in the body of the HTTP request, the server side
script reads out those parameters as usual and can then perform an XSLT
transformation and send the result back to the browser.

So for server-side transformation you usually use a server-side
programming language like PHP respectively a server-side framework like
ASP or JSP to perform an XSLT transformation but for some servers there
are XSLT filters or modules that allow the use of XSLT without needing
to go down to a programming language.


Martin Honnen
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Newbie, HTML calling XSLT Peter Flynn XML 4 08-23-2005 07:32 PM
Re: Newbie, HTML calling XSLT XML 0 08-23-2005 08:48 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM
xslt alone or xslt/java for static site? ted XML 1 01-26-2004 10:41 AM
[XSLT]Passing values from Javascript to a XSLT variable Benjamin Hillsley XML 3 09-25-2003 04:50 AM