Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL IF TEST

Status
Not open for further replies.

markSaunders

Programmer
Jun 23, 2000
196
0
0
GB
any obvious errors with this code?

Code:
<xsl:if test=&quot;DESCR.[.[ignore]&quot;[/ignore]HOT TAP[ignore]&quot;[/ignore]]&quot;>
	TIS TRUE SO IT IS!!
</xsl:if test>

i want to simply test if the field [tt]DESCR[/tt] is equal to HOT TAP. i do realise that there are other ways but i specifically want to use this construct from other tests (example, checking if a particular field is empty etc.

i have no idea what the relevance of the .'s either side of the square brackets, but this is at it appears on MSDN - i've tried with one,both,none of them to no avail!

PS the speech marks either side of HOT TAP are actually in my code as & q u o t (cant stop this ruddy thing from reformatting them ;-)) Mark Saunders :)
 
Hi.

Try the following:

<xsl:if test=&quot;DESCR[.=&quot;HOT TAP&quot;]&quot;>
TIS TRUE SO IT IS!!
</xsl:if test>

regards, Kirilla

 
Sorry. There is an Error:

<xsl:if test=&quot;DESCR[.='HOT TAP']&quot;>
TIS TRUE SO IT IS!!
</xsl:if test>

regards, Kirilla
 
still no joy with this same syntax!

is there some dependancy on factors such as if i use ..
xsl:stylesheet xmlns:xsl=&quot;
or the one with the TRANSFORM text on the end etc?

it seems that everytime i view a tutorial/example etc the 'version?' being used differs - consequently it seems that certain elements of the xsl are not applied if you put the same syntax in another document refering to a different namespace?

any idea of where i can read about the relevance of these differences? or the benefits of one over the other?

cheers
m Mark Saunders :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top