Integrate xml and xsl
Using the following eample
xml
xsl
Filename: coda.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="coda.xsl"?> <personnel> <employee> <firstname>Deniss</firstname> <lastname>Kumlander</lastname> <position>Software Architect</position> </employee> </personnel>
Filename: coda.xsl
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>CODA Personnel</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Name</th> <th align="left">Position</th> </tr> <xsl:for-each select="personnel/employee"> <tr> <td><xsl:value-of select="lastname"/></td> <td><xsl:value-of select="position"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>
and
this xml file
build up an xsl file and integrate them in order to produce the following view:
Notice <?xml-stylesheet type="text/xsl" href="coda.xsl"?> tags in xml;
Notice that you will need to execute your xml file to get the view.