Women in Technology

Hear us Roar



Article:
  Five Quick Tips for Using XSLT
Subject:   Putting it in context
Date:   2003-02-24 10:29:50
From:   anonymous2
A wonderful article in the true spirit of a HOWTO. The only thing I found missing was the context ... what do you *do* with the files you created? Do the XML (data) and XSLT (presentation) files get "read/combined/acted on" by a web browser?
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Putting it in context
    2003-02-27 06:16:42  raymurphy [View]

    One way is just to include a processing instruction at the beginning of the xml document which names a stylesheet to apply to that document.
    So, for this article, assume you've created the xml file as "products.xml", and the final xslt file as "products.xsl" - all you need to do is add this line at the beginning of the "products.xml" file :

    <?xml-stylesheet href="products.xsl" type="text/xsl" ?>

    So, now when you load "products.xml" in your browser, it should automatically use "products.xsl" to do the xslt transformations described in this article.

    Ray