Skip to content

Instantly share code, notes, and snippets.

@bauhouse
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bauhouse/9aff9702e424172acd5e to your computer and use it in GitHub Desktop.
Save bauhouse/9aff9702e424172acd5e to your computer and use it in GitHub Desktop.
<data>
<hello>Hello, GitHub!</hello>
<message>It looks like you changed the Gist API.</message>
<references>
<reference>
<title>GitHub Developer API: Gists</title>
<description>You can read public gists and create them for anonymous users without a token; however, to read or write gists on a user's behalf the gist OAuth scope is required.</description>
<url>https://developer.github.com/v3/gists/</url>
</reference>
<reference>
<title>github3.py Documentation</title>
<description>Change Log: Version 0.5: 2013-02-16: The user attribute was changed by GitHub and is now the owner attribute.</description>
<url>https://github3py.readthedocs.org/en/latest/#id14</url>
</reference>
</references>
</data>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
omit-xml-declaration="yes"
encoding="UTF-8"
indent="yes" />
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="data/hello" /></title>
</head>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="data">
<h1>
<xsl:value-of select="hello" />
</h1>
<p>
<xsl:value-of select="message" />
</p>
<ul>
<xsl:apply-templates select="references/reference" />
</ul>
</xsl:template>
<xsl:template match="references/reference">
<li><a href="{url}" title="{description}"><xsl:value-of select="message" /></a></li>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment