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

  • 相关阅读:
    协程基础及其创建和使用方法
    创建进程池与线程池concurrent.futures模块的使用
    线程队列queue的使用
    线程操作之锁的使用
    linux内核调试指南
    在开发板Linux上挂载"驱动"挂载不成功,出现提示server 172.27.52.100 not responding, still trying
    LPC1788 SDRAM运行程序
    Altium designer 原理图库快速创建
    NFS挂载启动
    网站记录
  • 原文地址:https://www.cnblogs.com/czy/p/2432590.html
Copyright © 2011-2022 走看看