• DataForm Webpart Inside (1)


    the most simplest xsl format:

     <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
                       version="1.0" exclude-result-prefixes="xsl msxsl ddwrt"
                       xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
                       xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
                       xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
                       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                       xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                       xmlns:SharePoint="Microsoft.SharePoint.WebControls"
                       xmlns:ddwrt2="urn:frontpage:internal">
                  <xsl:output method="html" indent="no"/>
                  <xsl:decimal-format NaN=""/>
                  <xsl:param name="dvt_apos">'</xsl:param>
                  <xsl:param name="ManualRefresh"></xsl:param>
                  <xsl:param name="dvt_firstrow">1</xsl:param>
                  <xsl:param name="dvt_nextpagedata" />
                  <xsl:variable name="dvt_1_automode">0</xsl:variable>
                  <xsl:template match="/">
                  </xsl:template>
    </xsl:stylesheet>
    

    what is xmlns?

    check here

    http://www.xml.com/pub/a/2003/09/03/trxml.html

    http://www.ibm.com/developerworks/cn/xml/x-xsltext/

    http://hi.baidu.com/daijun2007/blog/item/2b0ae31863c1580a34fa4142.html

    what is inside sharepoint xmlns?

    ddwrt:

    it contains many useful extension function:
        AutoHyperLink
        AutoNewLine
        ConnEnclode
        Counter
        FieldFilterImageUrl
        FieldFilterOptions
        FieldPrefix
        FieldSortImageUrl
        FieldSortParameters
        FilterLink
        FormatDate
        FormatDateTime
        GenDisplayName
        GenFireConnection
        GenFireServerEvent
        GetFileExtension
        GetStringBeforeSeparator
        GetVar
        IfNew
        IsPrivilegedUser
        Limit
        ListProperty
        MapToAll
        MapToControl
        MapToIcon
        NameChanged
        PresenceEnabled
        SelectOptions
        SetVar
        ThreadStamp
        Today
        TodayIso
        UrlBaseName
        UrlDirName
        UrlEncode
        URLLookup
        UserLookup

    find in here:http://msdn.microsoft.com/en-us/library/aa505323.aspx

    example:

    <xsl:template name="dvt_1.rowview">
           <xsl:value-of select="ddwrt:UserLookup('domain\avmin','ID')"/> 
           <xsl:value-of select="@Title"/><Br/>
    </xsl:template>
    

    HTML Result:

    xmlns:asp

    it allow you add asp.net webcontrol to server in your xslt;

    example:

    <xsl:template name="dvt_1.rowview">
        <xsl:value-of select="@Title"/>    
        <asp:TextBox id="myControl1{generate-id()}" runat="server"/>
    </xsl:template>
    
    xmlns:_designer 
    http://www.bryancook.net/2009/09/understanding-sharepoints-ddwrtdatabind.html
    it mainly bind form control to using updating, inserting, and deleting item data
    <SharePoint:FormField runat="server" id="ff1{$Pos}" 
        ControlMode="Edit" FieldName="Field1"
        __designer:bind="{
            ddwrt:DataBind(
                'u', 
                concat('ff1',$Pos), 'Value', 'ValueChanged'
                'ID', ddwrt:EscapeDelims(@ID), '@Field1'
            )}"
        />
    

    Sharepoint blocked the msxsl:script , so we can ignore msxsl tag.

  • 相关阅读:
    为什么要设计好目录结构?
    python 程序退出方式
    mysql超出最大连接数解决方法
    服务器网络连接状态
    Python判断文件是否存在的三种方法【转】
    Nginx日志中的金矿 -- 好文收藏
    vsphere中的linux虚拟机安装vmware-tools
    vsphere中的vcenter创建esxi模板虚拟机新建无法连接网络
    linux同步系统时间
    Linux内核中TCP SACK机制远程DoS预警通告
  • 原文地址:https://www.cnblogs.com/frankzye/p/2015727.html
Copyright © 2020-2023  润新知