• 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.

  • 相关阅读:
    科学计算和可视化,做数据分析与雷达图。
    Leetcode 429 N叉树的层序遍历
    Leetcode 867转置矩阵
    Leetcode 832 翻转图像
    Leetcode 1052 爱生气的书店老板
    Leetcode 337打家劫舍 III
    Leetcode 766 托普利茨矩阵
    Leetcode 1438绝对差不超过限制的最长连续子数组
    Leetcode 697 数组的度
    Leetcode 567 字符串的排列
  • 原文地址:https://www.cnblogs.com/frankzye/p/2015727.html
Copyright © 2020-2023  润新知