My current project merges XML data from different sources and performs server-side processing with XSL stylesheets. Here's what I'm trying to accomplish:
Data Source 1 (example)
<flag1>
true
</flag1>
<flag2>
false
</flag2>
Obviously flag1 and flag2 would be unique entities in the above data. In my case, they're coming from a database.
Data Source 2 (example)
<displayMe btnName="Button1.gif" useFlag="flag1">
<displayMe btnName="Button2.gif" useFlag="flag2">
I want to evaluate the CONTENTS of the field listed in useFlag, effectively getting the value-within-a-value. Or stated another way, how do I get the value 'true' by only referencing useFlag (I don't want to code all of the possible flag names into the XSL sheet.)
So what I don't want, is
<xsl:if test="@useFlag='flag1' and flag1='true'">
blah blah
</xsl:if>
because the flags are dynamic and numerous.
Any suggustions?
Thanks!
Brian
Data Source 1 (example)
<flag1>
true
</flag1>
<flag2>
false
</flag2>
Obviously flag1 and flag2 would be unique entities in the above data. In my case, they're coming from a database.
Data Source 2 (example)
<displayMe btnName="Button1.gif" useFlag="flag1">
<displayMe btnName="Button2.gif" useFlag="flag2">
I want to evaluate the CONTENTS of the field listed in useFlag, effectively getting the value-within-a-value. Or stated another way, how do I get the value 'true' by only referencing useFlag (I don't want to code all of the possible flag names into the XSL sheet.)
So what I don't want, is
<xsl:if test="@useFlag='flag1' and flag1='true'">
blah blah
</xsl:if>
because the flags are dynamic and numerous.
Any suggustions?
Thanks!
Brian