TheBigUndo.XSLReadable

Scope: Public
Protected XSLReadable as String = "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\r <xsl:output method=\"xml\" encoding=\"UTF-8\"/>\r <xsl:param name=\"indent-increment\" select=\"\' \'\"/>\r \r <xsl:template name=\"newline\">\r <xsl:text disable-output-escaping=\"yes\">\r</xsl:text>\r </xsl:template>\r \r <xsl:template match=\"comment() | processing-instruction()\">\r <xsl:param name=\"indent\" select=\"\'\'\"/>\r <xsl:call-template name=\"newline\"/> \r <xsl:value-of select=\"$indent\"/>\r <xsl:copy />\r </xsl:template>\r \r <xsl:template match=\"text()\">\r <xsl:param name=\"indent\" select=\"\'\'\"/>\r <xsl:call-template name=\"newline\"/> \r <xsl:value-of select=\"$indent\"/>\r <xsl:value-of select=\"normalize-space(.)\"/>\r </xsl:template>\r \r <xsl:template match=\"text()[normalize-space(.)=\'\']\"/>\r \r <xsl:template match=\"*\">\r <xsl:param name=\"indent\" select=\"\'\'\"/>\r <xsl:call-template name=\"newline\"/> \r <xsl:value-of select=\"$indent\"/>\r <xsl:choose>\r <xsl:when test=\"count(child::*) > 0\">\r <xsl:copy>\r <xsl:copy-of select=\"@*\"/>\r <xsl:apply-templates select=\"*|text()\">\r <xsl:with-param name=\"indent\" select=\"concat ($indent, $indent-increment)\"/>\r </xsl:apply-templates>\r <xsl:call-template name=\"newline\"/>\r <xsl:value-of select=\"$indent\"/>\r </xsl:copy>\r </xsl:when> \r <xsl:otherwise>\r <xsl:copy-of select=\".\"/>\r </xsl:otherwise>\r </xsl:choose>\r </xsl:template> \r</xsl:stylesheet>\r"
An XSL Style for readable XML.