This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]