View My Stats



XML & XSL Banner links script

 

Java ScriptsHere is the XML file



bannerlink.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="bannerlink.xsl"?>
<directory>
<listing>
<title>Stransky Family Tree and more</title>
<banner>http://www.stranskyfamilytree.com/css/stranskyfamilytree.jpg</banner>
<detail>What genealogy we know of our family and ancestry of other extended families.</detail>
<url>http://www.stranskyfamilytree.com/</url>
</listing>
<listing>
<title>World Class Carriages</title>
<banner>http://www.stransky-webdesigns.com/swdads/ads/worldclasscarriages-486x60.jpg</banner>
<detail>Horse carriage sales of WCC Products distributed ny Hunter's Creek Farm, Inc. Contact Bob Cook!</detail>
<url>http://www.horsecarriages.com/</url>
</listing>
</directory>

 

Java ScriptsHere is the XSL file



bannerlink.xsl


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="directory/listing">
<p>
<xsl:value-of select="title"/>
</p>
<p>
<a>
<xsl:attribute name="href"><xsl:value-of select="url"></xsl:value-of></xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="banner"></xsl:value-of></xsl:attribute>
</img>
</a>
</p>
<p>
<xsl:value-of select="detail"/>
</p>
<hr/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>