xsl-list
[Top] [All Lists]

RE: Re: Conditional Processing in XSLT & JS

2003-01-03 05:05:04
I have the following evaluation :

      <xsl:if test="'{name}' = 'return bpr_name()'">  

if the contents of 'name' node and the string returned by the 
javascript function are equal the it will perform the following tasks.

For some reason or other it is not evaluating the bpr_name function.

Can anybody give me some hint of what maybe is happening??

It is comparing the string "{name}" to the string "return bpr_name()"
and deciding that they are not equal.

If you want the contents of the node called name, write

  name 

not

  '{name}' 

If you want to evaluate a function called bpr_name, then write

  bpr_name()

not

  'return bpr_name()'

(But the spec doesn't allow you to have a function called this -
user-defined functions must always be namespace-prefixed).

Many people posting questions on this list invent strange language
constructs in the hope that they might mean something, but this is one
of the more creative efforts I have seen recently.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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