Untitled
By: a guest | Mar 25th, 2009 | Syntax:
None | Size: 1.02 KB | Hits: 106 | Expires: Never
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<head>
<style type="text/css">
body {
margin: 1.0em;
}
</style>
</head>
<body>
<xsl:for-each select="//*[@rdf:about]">
<h1><a href="{@rdf:about}"><xsl:value-of select="name()"/></a></h1>
<ul>
<xsl:for-each select="./*">
<xsl:choose>
<xsl:when test="@rdf:resource">
<li><strong><xsl:value-of select="name()"/></strong>: <a href="{@rdf:resource}"><xsl:value-of select="@rdf:resource"/></a></li>
</xsl:when>
<xsl:otherwise>
<li><strong><xsl:value-of select="name()"/></strong>: <xsl:value-of select="."/></li>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</ul>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>