Created
April 4, 2011 16:22
-
-
Save leekelleher/901908 to your computer and use it in GitHub Desktop.
Dump out all content pages from Umbraco in XSLT.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY nbsp " "> | |
]> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxml="urn:schemas-microsoft-com:xslt" | |
xmlns:umbraco.library="urn:umbraco.library" | |
exclude-result-prefixes="msxml umbraco.library"> | |
<xsl:output method="xml" /> | |
<xsl:param name="currentPage"/> | |
<xsl:template match="/"> | |
<!-- navigate to the root node --> | |
<xsl:apply-templates select="$currentPage/ancestor::root/*[@isDoc]" /> | |
</xsl:template> | |
<xsl:template match="*[@isDoc]"> | |
<div> | |
<!-- output all the attributes and properties --> | |
<xsl:apply-templates select="@* | *[not(@isDoc)]" /> | |
</div> | |
<!-- output all the child documents --> | |
<xsl:apply-templates select="*[@isDoc]" /> | |
</xsl:template> | |
<xsl:template match="@* | *[not(@isDoc)]"> | |
<dl> | |
<dt> | |
<xsl:value-of select="name()"/> | |
</dt> | |
<dd> | |
<xsl:value-of select="." disable-output-escaping="yes" /> | |
</dd> | |
</dl> | |
</xsl:template> | |
</xsl:stylesheet> |
Hey Chriztian,
I wrote it for a forum post reply: http://our.umbraco.org/forum/using/ui-questions/19140-How-to-get-an-overview-of-a-site
Not using it for my own debugging... I do all that mentally! (oh and with XMLDump too!) ;-)
Cheers, Lee.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm actually aiming for XMLDump v1.0 to allow you to use your own "Renderer" stylesheet - i.e., you could hook this one up to do the output if you so like...
Are you using this for debugging?
/Chriztian