Created
December 2, 2009 15:13
-
-
Save marijn/247266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<?xml-stylesheet type="text/xsl" href="transactions.xsl"?> | |
<transactions> | |
<transaction status="payed" id="AB-001"> | |
<sender> | |
<name>John</name> | |
<familyName>Doe</familyName> | |
<dateOfBirth format="YYYYMMDD">19541212</dateOfBirth> | |
<emailAddress>[email protected]</emailAddress> | |
</sender> | |
<price currency="USD">12000</price> | |
<message><![CDATA[Payment for services rendered]]></message> | |
</transaction> | |
<transaction status="payed" id="BD-458"> | |
<sender> | |
<name>John</name> | |
<familyName>Appleseed</familyName> | |
<dateOfBirth format="YYYYMMDD">19661111</dateOfBirth> | |
<emailAddress>[email protected]</emailAddress> | |
</sender> | |
<price currency="USD">18000</price> | |
<message><![CDATA[Payment for subscription]]></message> | |
</transaction> | |
</transactions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<title>Transaction overview</title> | |
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8" /> | |
<style type="text/css"> | |
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } | |
h1 { font-size: 15px; } | |
h2 { font-size: 14px; } | |
p { font-size: 11px; } | |
</style> | |
</head> | |
<body> | |
<div id="document"> | |
<h1>Transaction overview</h1> | |
<ol> | |
<xsl:for-each select="transactions/transaction"> | |
<li> | |
<h2><xsl:value-of select="sender/name"/> <xsl:value-of select="sender/familyName"/></h2> | |
<p><xsl:value-of select="message"/></p> | |
</li> | |
</xsl:for-each> | |
</ol> | |
</div> | |
</body> | |
</html> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment