[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
One of my pages has a field that allows the user to enter a last name and then click the "search" button. The results should display all loans that have a borrower with a last name that matches the criteria entered by the user (partial match). The name entered by the user is passed as a parameter to the XSL stylesheet. With the XSL below, the "No results were found" is displayed on the search results page, even when I enter a name (or partial name) that matches one of the borrower's last names in the XML. What am I doing wrong?
XSL:
<xsl:template match='/'>
<xsl:choose>
<xsl:when test=\"ReturnResultSet/LoanSearchSet/Loan/LoanBorrowerSet/Borrower[contains(LastName, $nameSearchValue)]\">
...xsl here creates table of loans with borrower last name matching criteria...
</xsl:template>
XML:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
[xsl] Passing in parameter used in matching
Subject: [xsl] Passing in parameter used in matching From: "Katie McNally" <kmcnally9@xxxxxxxxxxx> Date: Thu, 18 Oct 2001 08:00:10 -0500 |
One of my pages has a field that allows the user to enter a last name and then click the "search" button. The results should display all loans that have a borrower with a last name that matches the criteria entered by the user (partial match). The name entered by the user is passed as a parameter to the XSL stylesheet. With the XSL below, the "No results were found" is displayed on the search results page, even when I enter a name (or partial name) that matches one of the borrower's last names in the XML. What am I doing wrong?
XSL:
<xsl:param name="nameSearchValue"> </xsl:param>
<xsl:template match='/'>
<xsl:choose>
<xsl:when test=\"ReturnResultSet/LoanSearchSet/Loan/LoanBorrowerSet/Borrower[contains(LastName, $nameSearchValue)]\">
...xsl here creates table of loans with borrower last name matching criteria...
</xsl:when> <xsl:otherwise> <xsl:text>No results were found.</xsl:text> </xsl:otherwise> </xsl:choose>
</xsl:template>
XML:
<ReturnResultSet> <LoanSearchSet> <Loan> <LoanNumber>123</LoanNumber> <LoanBorrowerSet> <Borrower> <LastName>Smith</LastName> </Borrower> </LoanBorrowerSet> </Loan> <Loan> <LoanNumber>456</LoanNumber> <LoanBorrowerSet> <Borrower> <LastName>Jones</LastName> </Borrower> </LoanBorrowerSet> </Loan> <Loan> <LoanNumber>789</LoanNumber> <LoanBorrowerSet> <Borrower> <LastName>Stills</LastName> </Borrower> </LoanBorrowerSet> </Loan> ... </LoanSearchSet> </ReturnResultSet>
Thanks, Katie
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] recent benchmarks, advanc, Eugene Kuznetsov | Thread | RE: [xsl] Passing in parameter used, Eric Wallet |
[xsl] recent benchmarks, advanced t, Antoine Quint | Date | Re: [xsl] Case conversion in XSL?, David Carlisle |
Month |
Keywords