Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: selecting similar data [Thread Next] Re: selecting similar dataTo: NULL Date: 11/20/2008 5:29:00 AM Figured out how to do it. Dimitre's suggestion made me think a little harder and I came up with this. <xsl:for-each select="class[grade=concat($grade, '*') or grade=$grade]"> "Dennis Owen" wrote: > That works fine unless someone enters a 1, then they get all 1, 10, 11, etc. > I'll have to check the data to see if that is possible. > > Thanks. > > "Dimitre Novatchev" wrote: > > > > > "Dennis Owen" <DennisOwen@d...> wrote in message > > news:8C13BD5C-3F7E-4339-8044-091E7FA5607C@m...... > > >I have a production xsl file that I need to edit to change the selection > > > behavior on one of the fields. The user can search on a grade like "17" > > > and > > > the xsl returns all nodes with grades = 17. What I need is for the xsl to > > > return all the "17" and "17*" grades when 17 is entered by the user. > > > > > > The current code is like > > > > > > <xsl:for-each select="class[grade=$grade]"> > > > > > > > > > Use: > > > > class[starts-with(grade, $grade)] > > > > > > > > Cheers, > > Dimitre Novatchev > > > > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
