Recommended tools
- Visual Studio Express
- Foxe
Visual Studio
It provides intelligence prompt for the xsl key words to facilitate the work on the xsl.
Foxe
It provides a tree-nodes like view on the xml document to facilitate the navigation on the umbraco.config cache file.
Template Codes
With the help of the two utility, copy the following code to start your umbraco xslt development.
<?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%22
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon"
xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes"
xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath"
xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions"
xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings"
xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!--The code here-->
</xsl:template>
</xsl:stylesheet>
The xslt file is stored in the ~/xslt/ folder. The target xml file is at ~/App_Data/umbraco.config.
The following key words are commonly used when you write the xsl.
- value-of
- select
- attribute
- for-each
- sort
- if
The following key words are commonly used when you write the xsl.
- parent::*
- child::*
- [@attributeName expression]
Have a fun in coding with xsl for umbraco.config.
Supported by Nova Umbraco