This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Capturing/testing results of a boolean expression.


Edward L. Knoll wrote:
> I have a variable which will have a string value.  I wish to compare
> that string value to another string value (which happens to be a literal
> value).  I've done this directly in a xsl:if or xsl:when before, but now
> I'm trying to capture the results of the expression in a variable.
> 
> <xsl:variable name="X" ..../>
> 
> <xsl:variable name="flag" select="$X = 'literal-string-value'" />

That does in fact do exactly what you want.

Wherever that flag variable is in scope, it is a boolean object
and you can use $flag in an XPath expression as such.

You will need to post more details of how this is not doing what
you expect. What type of object is $X, for example?

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]