Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    Da dove prende il valore ?

    Salve, ho un problema riguardante la seguente riga di codice (appartenente alla pagina in allegato):

    <xsl:for-each select="/DAV:multistatus/DAV:response[0]/DAV:propstat/DAV:prop">

    Non riesco a capire a cosa si riferisce il valore assegnato a 'select'.

    Grazie.
    Immagini allegate Immagini allegate
    Datemi tempo che poi me la faccio una firma ; )

  2. #2
    :quote: Il codice dentro l'immagine e' illeggibile. Puoi copiarlo e incollarlo sul forum? Vorrei evitare di diventare cieco, thanx
    Are you alive?
    No, but I was written with LOVE. A new scripting language.
    www.frequenze.it

  3. #3
    :dhò: cho combatuto 2 ore per farlo diventare di 25 K :)
    io di posto tutto l'XML (che per la cronaca e' una pagina di digital dashboard )


    <?xml version="1.0" ?>
    - <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:WP="urn:schemas-microsoft-com:webpart:" xmlns:DAV="DAV:" xmlns:DDF="urn:schemas-microsoft-com:dashboardfactory:">
    - <xsl:template match="/">
    + <xsl:script language="JavaScript">
    + <![CDATA[ function GetFormattedDate(node)
    {
    var strDate = node.text;

    // We need to check the date format
    // we are seeing. It may differ based on
    // which store type last set the date on this
    // part. If it is alredy in "GMT" mode, we'll
    // just leave it alone and return.
    //



    if( (strDate.length-3) != strDate.lastIndexOf("GMT") ){

    // This is an exchange format
    var strSubStr = strDate.substring(5,7);
    var dte = new Date();

    if (strSubStr.charAt(0) == "0")
    {
    strSubStr = strSubStr.charAt(1);
    }

    dte.setUTCFullYear(Number(strDate.substring(0,4))) ;
    dte.setUTCMonth(Number(strSubStr)-1);
    dte.setUTCDate(Number(strDate.substring(8,10)));
    dte.setUTCHours(Number(strDate.substring(11,13)));
    dte.setUTCMinutes(Number(strDate.substring(14,16)) );
    dte.setUTCSeconds(Number(strDate.substring(17,19)) );
    return (dte.toUTCString());
    }

    return strDate;
    }

    ]]>
    </xsl:script>
    - <HTML>
    + <HEAD>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    - <title>
    <xsl:apply-templates select="//String[@_locID='L_PageCaption_Text']" />
    "
    <xsl:value-of select="/DAV:multistatus/DAV:response[0]/DAV:propstat/DAV:prop/WP:Title" />
    "
    </title>
    - <xsl:if test="/DAV:multistatus/DDF:Settings/DDF:BaseHref[.!='']">
    - <BASE>
    - <xsl:attribute name="href">
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDF:BaseHref" />
    </xsl:attribute>
    </BASE>
    </xsl:if>
    - <xsl:choose>
    - <xsl:when test="/DAV:multistatus/DDF:Settings/DDF:IE5OrGreater[.='1']">
    <link rel="stylesheet" HREF="cust.css" />
    </xsl:when>
    - <xsl:otherwise>
    <link rel="stylesheet" HREF="cust_nav.css" />
    </xsl:otherwise>
    </xsl:choose>
    - <xsl:if test="/DAV:multistatus/DDF:Settings/DDF:AdditionalStyleSheet[.!='']">
    - <link rel="stylesheet">
    - <xsl:attribute name="href">
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDF:AdditionalStyleSheet" />
    </xsl:attribute>
    </link>
    </xsl:if>
    </HEAD>
    - <BODY leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="White">
    - <FORM METHOD="POST" ACTION="dbcontent.asp">
    - <table class="CustOuterTable" height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    - <!-- Begin Mask Area
    -->
    + <tr>
    + <td colspan="2" class="CustMaskAreaTop">
    + <xsl:choose>
    + <xsl:when test="/DAV:multistatus/DDF:Settings/DDF:CustomTitleBar[.!='']">
    <xsl:apply-templates select="/DAV:multistatus/DDF:Settings/DDF:CustomTitleBar" />
    </xsl:when>
    - <xsl:otherwise>
    [img]pixel.gif[/img]
    </xsl:otherwise>
    </xsl:choose>
    </td>
    + <td rowspan="3" class="CustMaskAreaRight">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <!-- End Mask Area
    -->
    - <!-- Gold highlight
    -->
    - <tr>
    + <td colspan="2" style="background-color:#ffcc00">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <!-- Begin Content Area
    -->
    - <tr height="100%">
    + <td style="vertical-align: top; background-color:#ffcc00">
    [img]pixel.gif[/img]
    </td>
    - <td style="vertical-align: top">
    - <!--
    There should only be one dashboard in our XML, but
    just in case, select the first one explicitly

    -->
    - <xsl:for-each select="/DAV:multistatus/DAV:response[0]/DAV:propstat/DAV:prop">
    - <table class="CustContentTable" height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    - <!-- Begin Content Header
    -->
    - <tr>
    - <td class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    - <xsl:choose>
    - <xsl:when test="/DAV:multistatus/DDF:Settings/DDF:CustomTitleBar[.!='']">
    - <td class="CustSidebarSpacer" width="110px" align="center">
    [img]home.gif[/img]
    </td>
    </xsl:when>
    - <xsl:otherwise>
    - <td class="CustSidebarSpacer" align="center">
    [img]settingsicon.gif[/img]
    </td>
    </xsl:otherwise>
    </xsl:choose>
    - <td class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    - <td class="CustTitleArea">
    - <xsl:choose>
    - <xsl:when test="/DAV:multistatus/DDF:Settings/DDF:CustomTitleBar[.!='']">
    <xsl:value-of select="/DAV:multistatus/DAV:response[0]/DAV:propstat/DAV:prop/WP:Title" />


    </xsl:when>
    - <xsl:otherwise>
    <xsl:apply-templates select="//String[@_locID='L_PageTitle_Text']" />


    </xsl:otherwise>
    </xsl:choose>
    - <SPAN class="CustCaption">
    <xsl:apply-templates select="//String[@_locID='L_PageCaption_Text']" />
    "
    <xsl:value-of select="WP:Title" />
    "
    </SPAN>
    </td>
    - <td class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <tr>
    - <td class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    - <td colspan="3" style="background-color:#5f8ac5">
    [img]pixel.gif[/img]
    </td>
    - <td class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <tr>
    - <td colspan="5" class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <!-- End Content Header
    -->
    - <!-- Begin content body
    -->
    - <tr height="100%">
    - <!-- Indent area with vertical dot separator
    -->
    - <td>
    <xsl:eval no-entities="t">""</xsl:eval>
    </td>
    - <td>
    [img]pixel.gif[/img]
    </td>
    - <td width="6px" class="CustVerticalDots">
    <xsl:eval no-entities="t">""</xsl:eval>
    </td>
    - <!-- Area that contains all the sections of content
    -->
    - <td style="vertical-align:top">
    <xsl:apply-templates select="//String[@_locID='L_PageDescription_Text']" />



    - <!-- Begin Section "Current Web Parts"
    -->
    - <div class="UserGenericHeader">
    <xsl:apply-templates select="//String[@_locID='L_WebParts_Text']" />
    </div>
    - <div class="UserGenericBody">
    <xsl:apply-templates select="//String[@_locID='L_AvailableParts_Text']" />
    </div>
    - <div class="UserGenericBody">
    + <INPUT TYPE="hidden" NAME="DashboardID">
    - <xsl:attribute name="VALUE">
    <xsl:value-of select="/DAV:multistatus/DAV:response[0]/DAV:propstat/DAV:prop/DDF:ID" />
    </xsl:attribute>
    </INPUT>
    - <xsl:choose>
    - <xsl:when test="/DAV:multistatus/DAV:response/DAV:propstat/DAV:prop[DAV:contentclass='urn:schemas-microsoft-com:webpart']">
    - <!-- Begin Parts Table
    -->
    - <table width="95%" border="0" cellspacing="0" cellpadding="0">
    - <tr>
    - <th>
    <xsl:eval no-entities="t">""</xsl:eval>
    </th>
    - <th width="60%">
    <xsl:apply-templates select="//String[@_locID='L_Name_Text']" />
    </th>
    - <th width="20%" nowrap="" style="padding-left: 2px; padding-right: 2px">
    <xsl:apply-templates select="//String[@_locID='L_Position_Text']" />
    </th>
    - <th width="20%" nowrap="" style="padding-left: 2px; padding-right: 2px">
    <xsl:apply-templates select="//String[@_locID='L_LastModified_Text']" />
    </th>
    </tr>
    - <xsl:for-each select="/DAV:multistatus/DAV:response/DAV:propstat/DAV:prop[DAV:contentclass='urn:schemas-microsoft-com:webpart']" order-by="WP:Title">
    - <tr style="overflow: hidden">
    - <td style="VERTICAL-ALIGN: middle; TEXT-ALIGN:center">
    - <xsl:choose>
    - <xsl:when test="/DAV:multistatus/DDF:Settings/DDF:BrowserSupportsDisabled[.='1']">
    - <INPUT class="CustCheckBox" TYPE="checkbox" style="display:none">
    - <xsl:attribute name="name">
    chkOld
    <xsl:value-of select="DDF:ID" />
    </xsl:attribute>
    - <xsl:if test="WP:IsIncluded[.='1']">
    <xsl:attribute name="CHECKED" />
    - <xsl:if test="WP:AllowRemove[.='0']">
    <xsl:attribute name="DISABLED" />
    </xsl:if>
    </xsl:if>
    - <xsl:if test="DDF:CanPersonalize[.='0']">
    <xsl:attribute name="DISABLED" />
    </xsl:if>
    </INPUT>
    - <INPUT class="CustCheckBox" TYPE="checkbox">
    - <xsl:attribute name="name">
    chkNew
    <xsl:value-of select="DDF:ID" />
    </xsl:attribute>
    - <xsl:if test="WP:IsIncluded[.='1']">
    <xsl:attribute name="CHECKED" />
    - <xsl:if test="WP:AllowRemove[.='0']">
    <xsl:attribute name="DISABLED" />
    </xsl:if>
    </xsl:if>
    - <xsl:if test="DDF:CanPersonalize[.='0']">
    <xsl:attribute name="DISABLED" />
    </xsl:if>
    </INPUT>
    </xsl:when>
    - <xsl:otherwise>
    - <xsl:choose>
    - <xsl:when test="WP:AllowRemove[.!='0' and ../DDF:CanPersonalize!='0']">
    - <INPUT TYPE="hidden">
    - <xsl:attribute name="name">
    chkOld
    <xsl:value-of select="DDF:ID" />
    </xsl:attribute>
    - <xsl:if test="WP:IsIncluded[.='1']">
    <xsl:attribute name="value">1</xsl:attribute>
    </xsl:if>
    </INPUT>
    - <INPUT class="CustCheckBox" TYPE="checkbox">
    - <xsl:attribute name="name">
    chkNew
    <xsl:value-of select="DDF:ID" />
    </xsl:attribute>
    - <xsl:if test="WP:IsIncluded[.='1']">
    <xsl:attribute name="CHECKED" />
    </xsl:if>
    </INPUT>
    </xsl:when>
    - <xsl:otherwise>
    [img]pixel.gif[/img]
    </xsl:otherwise>
    </xsl:choose>
    </xsl:otherwise>
    </xsl:choose>
    </td>
    - <td NOWRAP="" style="VERTICAL-ALIGN: middle" width="40%">
    - <xsl:choose>
    - <xsl:when test="DDF:CanPersonalize[.='1']">
    - <A>
    - <xsl:attribute name="name">
    __
    <xsl:value-of select="WP:Title" />
    </xsl:attribute>
    - <xsl:attribute name="HREF">
    <xsl:value-of select="DDF:EditPartURL" />
    </xsl:attribute>
    <xsl:value-of select="WP:Title" />
    </A>
    </xsl:when>
    - <xsl:otherwise>
    <xsl:value-of select="WP:Title" />
    </xsl:otherwise>
    </xsl:choose>
    </td>
    - <td NOWRAP="" style="VERTICAL-ALIGN: middle; padding-left: 2px; padding-right: 2px" width="20%">
    - <xsl:choose>
    - <xsl:when test="WP:Zone[.='1']">
    <xsl:apply-templates select="//String[@_locID='L_Left_Text']" />
    </xsl:when>
    - <xsl:when test="WP:Zone[.='2']">
    <xsl:apply-templates select="//String[@_locID='L_Right_Text']" />
    </xsl:when>
    - <xsl:when test="WP:Zone[.='3']">
    <xsl:apply-templates select="//String[@_locID='L_Middle_Text']" />
    </xsl:when>
    - <xsl:when test="WP:Zone[.='4']">
    <xsl:apply-templates select="//String[@_locID='L_Header_Text']" />
    </xsl:when>
    - <xsl:when test="WP:Zone[.='5']">
    <xsl:apply-templates select="//String[@_locID='L_Footer_Text']" />
    </xsl:when>
    <xsl:otherwise>Middle</xsl:otherwise>
    </xsl:choose>
    </td>
    - <td STYLE="VERTICAL-ALIGN: middle; padding-left: 2px; padding-right: 2px" width="40%" nowrap="">
    - <xsl:for-each select="WP:LastModified">
    <xsl:eval>GetFormattedDate(this)</xsl:eval>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    - <!-- End Parts Table
    -->
    </xsl:when>
    - <xsl:otherwise>
    - <font color="red">
    <xsl:apply-templates select="//String[@_locID='L_EmptyDashboard_Text']" />
    </font>
    </xsl:otherwise>
    </xsl:choose>
    </div>
    Datemi tempo che poi me la faccio una firma ; )

  4. #4
    - <!-- End Section "Current Web Parts"
    -->
    - <xsl:if test="/DAV:multistatus/DAV:response[0]/DAVropstat/DAVrop/DDF:CanInsertParts[.='1']">
    - <!-- Begin Section "Import Web Parts"
    -->
    - <div class="UserGenericHeader">
    <xsl:apply-templates select="//String[@_locID='L_Catalogs_Text']" />
    </div>
    - <div class="UserGenericBody">
    - <xsl:for-each select="//DDF:WebPartCatalog">
    - <div class="UserGenericBulletItem">
    [img]navlink.gif[/img]
    <xsl:eval no-entities="t">""</xsl:eval>
    - <a>
    - <xsl:attribute name="name">
    __
    <xsl:value-of select="DDF:CatalogName" />
    </xsl:attribute>
    - <xsl:attribute name="href">
    <xsl:value-of select="DDF:href" />
    - <xsl:for-each select="DDF:href">
    - <xsl:choose>
    <xsl:when expr="String(this.text).indexOf('?') >= 0">&</xsl:when>
    <xsltherwise>?</xsltherwise>
    </xsl:choose>
    </xsl:for-each>
    PostURL=
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDF:PostURLEnc" />
    </xsl:attribute>
    <xsl:value-of select="DDF:CatalogName" />
    </a>


    </div>
    </xsl:for-each>
    </div>
    - <!-- End Section "Import Web Parts"
    -->
    - <div class="UserGenericHeader">
    <xsl:apply-templates select="//String[@_locID='L_ImportOrCreate_Text']" />
    </div>
    - <div class="UserGenericBody">
    - <!-- Begin Section "Import a Web Part File"
    -->
    - <xsl:if test="/DAV:multistatus/DAV:response[0]/DAVropstat/DAVrop/DDF:CanInsertParts[.='1']">
    - <div class="UserGenericBulletItem">
    [img]redsquare.gif[/img]
    <xsl:eval no-entities="t">""</xsl:eval>
    - <a name="__ImportWebPartFile">
    <xsl:attribute name="href">javascript:alert("Sorry, not yet implemented.")</xsl:attribute>
    <xsl:apply-templates select="//String[@_locID='L_ImportWebPart_Text']" />
    </a>


    </div>
    </xsl:if>
    - <!-- End Section "Import a Web Part File"
    -->
    - <!-- Begin Section "Create New Subdashboard"
    -->
    - <div class="UserGenericBulletItem">
    [img]redsquare.gif[/img]
    <xsl:eval no-entities="t">""</xsl:eval>
    - <a name="__CreateNewDB">
    - <xsl:attribute name="href">
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDF:NewDashboardURL" />
    </xsl:attribute>
    <xsl:apply-templates select="//String[@_locID='L_CreateDashboard_Text']" />
    </a>


    </div>
    - <!-- End Section "Create New Subdashboard"
    -->
    - <!-- Begin Section "Create New Web Part"
    -->
    - <div class="UserGenericBulletItem">
    [img]redsquare.gif[/img]
    <xsl:eval no-entities="t">""</xsl:eval>
    - <a name="__CreateNewPart">
    - <xsl:attribute name="href">
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDF:NewPartURL" />
    </xsl:attribute>
    <xsl:apply-templates select="//String[@_locID='L_CreateWebPart_Text']" />
    </a>


    </div>
    - <!-- End Section "Create New Web Part"
    -->
    </div>
    </xsl:if>


    - <!-- Horizontal rule and extra space
    -->
    - <table width="100%" cellpadding="0" cellspacing="0" border="0">
    - <tr>
    - <td style="background-color:#5f8ac5">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <tr>
    - <td colspan="2" class="CustSpacer">
    [img]pixel.gif[/img]
    </td>
    </tr>
    - <!-- Begin Button Section
    -->
    - <tr style="vertical-align: top">
    - <td style="vertical-align: top">
    - <table width="100%" border="0" cellspacing="0" cellpadding="0">
    - <tr>
    - <td class="CustButtonSectionRight" nowrap="">
    - <nobr>
    - <INPUT width="80px" class="CustButton" name="__Save" TYPE="Submit">
    - <xsl:attribute name="value">
    <xsl:apply-templates select="//String[@_locID='L_OKButton_Text']" />
    </xsl:attribute>
    </INPUT>
    - <INPUT width="80px" class="CustButton" name="__Cancel" TYPE="button">
    - <xsl:attribute name="onclick">
    window.location.href='
    <xsl:value-of select="/DAV:multistatus/DDF:Settings/DDFashboardURL" />
    '
    </xsl:attribute>
    - <xsl:attribute name="value">
    <xsl:apply-templates select="//String[@_locID='L_CancelButton_Text']" />
    </xsl:attribute>
    </INPUT>
    </nobr>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    - <tr>
    - <td>
    [img]pixel.gif[/img]
    </td>
    </tr>
    </table>
    - <!-- End Button Section
    -->
    </td>
    - <td class="CustSpacer">
    <xsl:eval no-entities="t">""</xsl:eval>
    </td>
    </tr>
    </table>
    </xsl:for-each>
    </td>
    </tr>
    - <!-- End Content Area
    -->
    </table>
    </FORM>
    </BODY>
    </HTML>
    </xsl:template>
    + <xsl:template match="/DAV:multistatus/DDF:Settings/DDF:CustomTitleBar">
    - <DIV name="strNavbar">
    <xsl:eval no-entities="t">this.text</xsl:eval>
    </DIV>
    </xsl:template>
    + <xsl:template match="String">
    <xsl:eval no-entities="t">this.nodeTypedValue</xsl:eval>
    </xsl:template>
    </xsl:stylesheet>
    Datemi tempo che poi me la faccio una firma ; )

  5. #5
    ho dovuto dividere la pagina in 2 post perchè non entrava in uno solo

    cmq grazie anticipatamente per l'aiuto
    Datemi tempo che poi me la faccio una firma ; )

  6. #6

    Re: Da dove prende il valore ?

    Originariamente inviato da Dott.Zeius
    Salve, ho un problema riguardante la seguente riga di codice (appartenente alla pagina in allegato):

    <xsl:for-each select="/DAV:multistatus/DAV:response[0]/DAVropstat/DAVrop">

    Non riesco a capire a cosa si riferisce il valore assegnato a 'select'.

    Grazie.
    Scusa per il ritardo. Usa lo spazio dei nomi definito in

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:WP="urn:schemas-microsoft-com:webpart:" xmlnsAV="DAV:" xmlnsDF="urn:schemas-microsoft-com:dashboardfactory:">

    per il resto fa riferimento alla gerarchia XML
    Are you alive?
    No, but I was written with LOVE. A new scripting language.
    www.frequenze.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.