SharePoint XSL problem - InfoPath Dev
in

InfoPath Dev

SharePoint XSL problem

Last post 03-26-2010 11:48 AM by ben.oates. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-26-2010 11:43 AM

    SharePoint XSL problem

    Now I know this is an Infopath site but the people on here are so brilliant with XSL and XML I thought I would try this one anyway.

    I am trying to filter a data view web part in SharePoint 2003 but only when the filter is actually populated.

    <xsl:choose>
     <xsl:when test="boolean($FilterFirstLetter)">
      <xsl:variable name="RowFilter">/dsQueryResponse/Rows/Row[substring(@Title,1,1)=$FilterFirstLetter]</xsl:variable>
     </xsl:when>
     <xsl:otherwise>
      <xsl:variable name="RowFilter">/dsQueryResponse/Rows/Row</xsl:variable>
     </xsl:otherwise>
    </xsl:choose>

    <xsl:variable name="Rows" select="$RowFilter" />

    This is my attempt so far. $FilterFirstLetter is a parameter passed in the URL and I know that works because with the following on its own I can filter the list:

    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[substring(@Title,1,1)=$FilterFirstLetter]" />

    I want the list to show everything when the filter is empty. Do you have any ideas please? The error I get is "Failed setting processor stylesheet : 0x80004005 : A reference to variable or parameter 'RowFilter' cannot be resolved. The variable or parameter may not be defined, or it may not be in scope.

  • 03-26-2010 11:48 AM In reply to

    Ok... I have added the xsl:param RowFilter further up and now the error message is:

    "XSLT transform failed : 0x80004005 : Reference to variable or parameter 'Rows' must evaliate to a node list."

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.