Skip to content

Instantly share code, notes, and snippets.

@ech01
Created April 6, 2017 13:25
Show Gist options
  • Save ech01/ce57a0d1b034683d2bba80bf9b219a5d to your computer and use it in GitHub Desktop.
Save ech01/ce57a0d1b034683d2bba80bf9b219a5d to your computer and use it in GitHub Desktop.
DDR site hierarchy for exporting/importing to other portals or systems. For DNN replace level1 with > level2 with >> level3 with >>> etc. For slickplan replace level1 with -- level2 with ---- etc etc
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="CSSClass"></xsl:param>
<xsl:template match="/*">
<xsl:apply-templates select="root" />
</xsl:template>
<xsl:template match="root">
<xsl:apply-templates select="node" mode="topLevel" />
</xsl:template>
<xsl:template match="node" mode="topLevel">
<span>level<xsl:value-of select="@depth" />&#160;</span><xsl:value-of select="@text" /><br />
<xsl:if test="node">
<xsl:apply-templates select="node" />
</xsl:if>
</xsl:template>
<xsl:template match="node">
<span>level<xsl:value-of select="@depth" />&#160;</span><xsl:value-of select="@text" /><br />
<xsl:if test="node">
<xsl:apply-templates select="node" />
</xsl:if>
</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment