Umbraco-Xsl-Development-Template

Recommended tools

  1. Visual Studio Express
  2. Foxe

 

Visual Studio

It provides intelligence prompt for the xsl key words to facilitate the work on the xsl.

image

Foxe

It provides a tree-nodes like view on the xml document to facilitate the navigation on the umbraco.config cache file.

image

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 "&#x00A0;">
]>
<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.

  1. value-of
  2. select
  3. attribute
  4. for-each
  5. sort
  6. if

The following key words are commonly used when you write the xsl.

  1. parent::*
  2. child::*
  3. [@attributeName expression]

Have a fun in coding with xsl for umbraco.config.

 

Supported by Nova Umbraco

转载于:https://www.cnblogs.com/czy/archive/2012/04/04/2432590.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值