Subject: RE: [xsl] testing for text in one of many elements From: "Marty McKeever" <marty.mckeever@xxxxxxxxxx> Date: Thu, 19 Jun 2003 11:20:37 -0400 |
Assuming User as the context node, i think all you need to do is: <xsl:if test="Function='Function Uno'"> ... </xsl:if> HTH I~I~ <>< www.martymckeever.com www.vigilancematters.com > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mattison > Sent: Thursday, June 19, 2003 11:09 AM > To: XSL-List > Subject: [xsl] testing for text in one of many elements > > > Greetings > > Here is the problem in a nutshell. I've got xml that looks like this: > > <User> > <Name>Joe User</Name> > <Function>Function Uno</Function> > <Function>Function Cinco</Function> > <Function>Function Dos</Function> > </User> > > Using this I need to put xsl:if statements on a series of links (which > aren't in a neat list), so the links only display if the user has that > function. I have some ability to control the xml, though not the function > names which do have spaces in them. > > In psuedo-code I want to be like this: > > <xsl:if test="IfOneOfTheFunctionTagsHasThisValue('Function Uno')"> > <a href="function_one.asp">Func One</a> > </xsl:if> > > Any suggestion are welcome, including, "really you shouldn't set your xml > up that way, try this instead". Though the constraint of the function > names do have spaces, so <Function_Uno>Yes</Function_Uno> isn't an option. > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] testing for text in one of ma, Mattison | Thread | Re: [xsl] testing for text in one o, Jeni Tennison |
RE: [xsl] testing for text in one o, Stuart Brown | Date | Re: [xsl] testing for text in one o, Jeni Tennison |
Month |