Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pooja 15 posts 35 karma points
    Sep 23, 2011 @ 12:30
    pooja
    0

    use multiple msxsl:node-set() in single page.

    i have used  msxsl:node-set($variable)  function then it is not showing any data then i have used this fumction as msxsl:node-set($variable) /* then it is showing data but. sfter that i am using this function in same page then my next data is not displayed

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Sep 23, 2011 @ 13:22
    Chriztian Steinmeier
    0

    Hi pooja,

    If possible, you should really post the code for us to see - it's pretty hard to figure out what the real problem is - but there is no problem with using that same function multiple times on a page; It's just a function.

    /Chriztian

  • pooja 15 posts 35 karma points
    Sep 23, 2011 @ 14:54
    pooja
    0

    Thanks  chriztian,

    here is my code

    <XSL<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="UserID">CurrentUserName</xsl:param>

         <xsl:param name="useringroup" select="'PO'"></xsl:param>
    <xsl:variable name="dvt_1_automode">0</xsl:variable>
        <xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
            <xsl:call-template name="dvt_1"/>
     </xsl:template>
        
        <xsl:template name="dvt_1">
            <xsl:variable name="dvt_StyleName">RepForm3</xsl:variable>
            <xsl:variable name="test" >
      <xsl:choose>
      <xsl:when test="$useringroup='PO'">
      <xsl:copy-of select="/dsQueryResponse/Process/Rows/Row[@ActiveState='1' and string(substring-after(substring-after(substring-before(string(@ProcessOwner),'&lt;/A&gt;'),'ID='),'&gt;')) = $UserID  and  string(@ProcessState)!='New']"></xsl:copy-of>
      </xsl:when>
      <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
      </xsl:variable>

    <xsl:variable name="Rows" select="msxsl:node-set($test)/*"></xsl:variable>
            <xsl:variable name="dvt_RowCount" select="count($Rows)" />
            <xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
            <table border="0" width="100%">
                <xsl:call-template name="dvt_1.body">
                    <xsl:with-param name="Rows" select="$Rows"/></xsl:call-template>
      </table></xsl:template>
        <xsl:template name="dvt_1.body">
            <xsl:param name="Rows"/><xsl:for-each select="$Rows">
                <xsl:call-template name="dvt_1.rowview" />
            </xsl:for-each>
     </xsl:template>
        <xsl:template name="dvt_1.rowview">
      <tr>
       <td>
        <table border="0" cellspacing="0" width="100%">
         <tr>
          <td width="25%" class="ms-vb">
           <xsl:call-template name="dvt_2">
           <xsl:with-param name="Id" select="string(@ID)"></xsl:with-param>
           </xsl:call-template>
           <b>Process Short Description:</b>
          </td>
          <td width="75%" class="ms-vb">
           <xsl:value-of select="@Title"/>
          </td>
         </tr>
            <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
          <tr>
           <td colspan="99" class="ms-vb">
            <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
           </td>
          </tr>
         </xsl:if>
        </table>
       </td>
      </tr>
     </xsl:template>
        <xsl:variable name="dvt_2_automode">0</xsl:variable>
        <xsl:template name="dvt_2">
        <xsl:param name="Id"/>
        <xsl:variable name="test2" >
      <xsl:choose>
      <xsl:when test="$useringroup='PO'">
      <xsl:copy-of select="../../../ControlTest/Rows/Row"></xsl:copy-of>
      </xsl:when>
      <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
      </xsl:variable>
        ID:-<xsl:value-of select="$Id"></xsl:value-of>
            <xsl:variable name="dvt_StyleName">Table</xsl:variable>
               <xsl:variable name="Rows" select="msxsl:node-set($test2)/*"></xsl:variable>
            <table border="0" width="100%" cellpadding="2" cellspacing="0">
       <tr valign="top">
           <xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
         <th class="ms-vh" width="1%" nowrap="nowrap"></th>
        </xsl:if>
           <th class="ms-vh" nowrap="">Process Short Description</th>
           
       </tr>
                <xsl:call-template name="dvt_2.body">
                    <xsl:with-param name="Rows" select="$Rows" />
                    <!--<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />-->
                </xsl:call-template>
            </table>
        </xsl:template>
        <xsl:template name="dvt_2.body">
            <xsl:param name="Rows" />
            <!--<xsl:param name="dvt_ParentRow" />-->
            <xsl:for-each select="$Rows">
                <xsl:call-template name="dvt_2.rowview" />
            </xsl:for-each>
        </xsl:template>
        <xsl:template name="dvt_2.rowview">
      <tr>
          <xsl:if test="position() mod 2 = 1">
              <xsl:attribute name="class">ms-alternating</xsl:attribute>
          </xsl:if>
          <xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
        <td class="ms-vb" width="1%" nowrap="nowrap">
         <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
        </td>
       </xsl:if>
          <td class="ms-vb">
        <xsl:value-of select="@Title" />
       </td>
          
      </tr></xsl:template>
    </xsl:stylesheet>

    </XSL>

    when i am using the function 2nd time it is not working please help me out. i stuck over there from last 3 days

Please Sign in or register to post replies

Write your reply to:

Draft