zoukankan      html  css  js  c++  java
  • UmbracoXslDevelopmentTemplate CQ

    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

  • 相关阅读:
    在线免费生成IntelliJ IDEA 15.0注册码
    SQL logic error or missing database
    angularJs 动态添加upload
    正则表达式 用于验证数字组合(数字之间以逗号分隔)
    angularJs select ng-options 绑定int型的时候绑定失效的坑
    BigDecimal类处理高精度计算
    HttpClient
    activeMQ
    基于SpringMvc图片上传
    SpringMvc实现日期转换
  • 原文地址:https://www.cnblogs.com/czy/p/2432590.html
Copyright © 2011-2022 走看看