Women in Technology

Hear us Roar



Article:
  Five Quick Tips for Using XSLT
Subject:   Putting it in context
Date:   2003-02-27 06:16:42
From:   raymurphy
Response to: Putting it in context

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