
June 23rd, 2004, 09:22 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Help needed... can't get XSL:IF to do what I want!
...and not only that there isn't a single helpful page on the internet, at least not for what I'm trying to do. Probably because it's impossible or something, but I'll give it a try here just in case. Basically what I would like to do is use xsl:if to test IF the the contents of one tag includes another tag. Can I do this? Can I have something like
<xml1>
<datatype>
<integer>1</integer>
</datatype>
</xml1>
and
<xml2>
<datatype>
<nominal>'A' means 'Awesome'</nominal>
</datatype>
</xml2>
What I want to do when prompted with pieces of code in this example is, check IF the <datatype> tag contains a tag entitled <nominal> or <integer>, and then output a certain value based on IF it is nominal. I don't particularly care about the data in <nominal> and <integer> in this case, I just need to know which tag is present. Is there any way at all to do this? I'd greatly appreciate any help I can get, thanks a lot in advance!!!
|