Re: Newbie, HTML calling XSLT

Discussion in 'XML' started by Martin Honnen, Aug 20, 2005.

  1. 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
    http://JavaScript.FAQTs.com/
    Martin Honnen, Aug 20, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    637
    Stylus Studio
    Aug 3, 2004
  2. Benjamin Hillsley
    Replies:
    3
    Views:
    1,661
    Dimitre Novatchev
    Sep 25, 2003
  3. ted
    Replies:
    1
    Views:
    613
    Laurens
    Jan 26, 2004
  4. Peter Flynn

    Re: Newbie, HTML calling XSLT

    Peter Flynn, Aug 21, 2005, in forum: XML
    Replies:
    4
    Views:
    1,342
    Peter Flynn
    Aug 23, 2005
  5. Replies:
    0
    Views:
    393
Loading...

Share This Page