[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Passing in parameter used in matching
Hi Katie, > 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? It's hard to tell. The path looks OK from the XML that you're provided. Are you sure that the parameter is being passed through to the stylesheet correctly? (Try printing out the parameter value on the generated page.) Also, try removing the predicate from the end of the path, to see whether it's managing to find any Borrower elements at all (let alone those with a specific LastName). I assume that here: > <xsl:when > test=\"ReturnResultSet/LoanSearchSet/Loan/LoanBorrowerSet/Borrower[contains(LastName, > $nameSearchValue)]\"> the \s before the "s were typos in the email and aren't present in the XSLT (if they were, then you should get a big error from the XSLT processor). Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|