Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > XSLForum: Main > XSL Coding General

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-19-2008, 10:54 PM
Dennis Owen
 
Posts: n/a

Default selecting similar data



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]">


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 06:00 AM
Dimitre Novatchev
 
Posts: n/a

Default Re: selecting similar data


"Dennis Owen" <DennisOwen@discussions.microsoft.com> wrote in message
news:8C13BD5C-3F7E-4339-8044-091E7FA5607C@microsoft.com...
>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


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 11:57 AM.
Style Developed by Epic Designz