Remember that this entire document must still be XML compliant. We must reference our XSLT document in our candy.xml file. We do that using a processing instruction. This is the one we made above. Now, lets go through what's happening here.
Internet Explorer opens and parses the candy.xml file.
It sees the xml-stylesheet processing instruction and loads and parses candy.xsl . The parsed XSLT and XML documents are run through the XSLT engine. The XSLT engine renders the result of the transformed XML document to the browser. The XSLT engine processes stylesheets and maintains a context of where we are in the document. This means, at that moment, the XSLT engine can access anything under this level.