Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Last active June 3, 2021 03:29
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 jonathantneal/9c7924eb4ee77124c9121bb0abff23c7 to your computer and use it in GitHub Desktop.
Save jonathantneal/9c7924eb4ee77124c9121bb0abff23c7 to your computer and use it in GitHub Desktop.
Example XML webpage
<!DOCTYPE xml [
<!ATTLIST xsl:stylesheet
id ID #FIXED '!'
xmlns:xsl CDATA #FIXED 'http://www.w3.org/1999/XSL/Transform'
version CDATA #FIXED '1.0'
>
<!ATTLIST xsl:output
doctype-system CDATA #FIXED 'about:legacy-compat'
method CDATA #FIXED 'html'
>
]>
<?xml-stylesheet type="text/xsl" href="#!"?>
<xml>
<xsl:stylesheet>
<xsl:output />
<xsl:template match="/xml">
<body>
<title><xsl:value-of select="xml:title"/> - <xsl:value-of select="xml:sitetitle"/></title>
<h1><xsl:value-of select="xml:title"/></h1>
<p><xsl:value-of select="xml:subtitle"/></p>
</body>
<style>
* {
box-sizing: border-box;
}
:root {
background-color: #f3f3f3;
color: #232375;
font: 100%/1.5 system-ui, -apple-system, sans-serif;
}
body {
margin: 1em;
}
</style>
</xsl:template>
</xsl:stylesheet>
<xml:title>Page Heading</xml:title>
<xml:subtitle>Page content, and not much of it.</xml:subtitle>
<xml:sitetitle>XMLWeb</xml:sitetitle>
</xml>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment