Jump to content

Testing a variable with a boolean value


Khisanth Magus

Recommended Posts

I have a variable created that is supposed to hold whether something exists within the source document.<xsl:variable name="BSExists" select="boolean(aamc:SECTION/aamc:SECTIONNAME[contains(.,'BS')])" />I am using XMLSpy, and when using the debugger the variable tracker says that BSExists is true. However, when I try and test it in a <choose>-<when> function I cannot get the program to go into the when. I have tried the following:<when test="BSExists"><when test="BSExists = true"><when test="BSExists = 'true'"><when test="BSExists = true()>I'm running out of things I can try. None of these allowed the translation to step into the when case, it always skipped to the <otherwise> case.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...