[thelist] XSL:IF Question

darren darren at web-bitch.co.uk
Thu Sep 6 12:36:25 CDT 2001

Evenin' all...

i think my brain has finally turned to mush, so if anyone can help with

i have an xml document with the following sort of structure:

      <generalinfo index="1">some text</generalinfo>
      <generalinfo index="2">some more text</generalinfo>
      <generalinfo index="3">even more text</generalinfo>

if there has been no text entered the first value is defaulted to '//'
with the second two being random gibberish.  what i want to do is test to
see if the first field is '//' and if so not show anything, otherwise
show the text.

i've managed to get either nothing or everything so far, which i think is
a problem with matching the //'s.  i've tried escaping them with \'s so
you would have something like:

   <xsl:if test="//booking/generalinfo != '\/\/'">

and various variations on that theme...and i always get either everything
or nothing regardless of what the data is.

anyone any ideas??

and as a final question, has anyone got any recommendation for xml site
that give *good* examples of the various bits??  most of them i've come
across seem to stop at a rather basic level.

thanks for any help,


More information about the thelist mailing list