Skip to content

Instantly share code, notes, and snippets.

@hayeah
Created November 20, 2013 08:42
Show Gist options
  • Save hayeah/7559846 to your computer and use it in GitHub Desktop.
Save hayeah/7559846 to your computer and use it in GitHub Desktop.
ceremony to indent output
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- greeting.xsl --> <!-- greeting.xsl -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/19 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/19
<xsl:output method="html"/> | xmlns:redirect="http://xml.apache.org/xalan/redirect"
> extension-element-prefixes="redirect"
> xmlns:xalan="http://xml.apache.org/xslt"
> >
> <xsl:output method="html" indent="yes" xalan:indent-amount=
<xsl:template match="/"> <xsl:template match="/">
<xsl:apply-templates select="greeting"/> <xsl:apply-templates select="greeting"/>
</xsl:template> </xsl:template>
<xsl:template match="greeting"> <xsl:template match="greeting">
<html> <html>
<body> <body>
<h1> <h1>
<xsl:value-of select="."/> </h1> <xsl:value-of select="."/> </h1>
</body> </body>
</html> </html>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment