Subject:Complex condition in Predicate Author:(Deleted User) Date:24 Nov 2005 10:41 PM
Hardik,
Firstly, when using [val1 < val2] in a select= use [val1 < val2]. Your complex select should work properly if you use < with and:
[val1 < val2 and val3 < val4]
Subject:Complex condition in Predicate Author:(Deleted User) Date:25 Nov 2005 06:31 AM
Hardik,
If you assign a nodeset to a variable with
<xsl:variable name="a" select="...."/>
then the XSLT processor understands that the variable contains a nodeset and allows you to use it as a nodeset in a later XPATH expression.
On the other hand, if you assigne a nodeset to a variable like this:
<xsl:variable name=x">
blah blah
</xsl:variable>
then some processors won't recognize that the variable contains a nodeset and will give various error messages. The fix is processor dependent. See this thread for more info. http://www.stylusstudio.com/SSDN/default.asp?action=9&read=4442&fid=48
In your case, I would try something which puts everything into 1 predicate:
<xsl:variable name="node" select="[some-nodes/node-of-interest[sub1 = 'test1' and ( $variable = "true" or sub2 = 'test2')]"/>
Subject:Complex condition in Predicate Author:(Deleted User) Date:28 Nov 2005 10:20 AM
Hardik,
When using xalan, you can try this. The namespace declaration is:
xmlns:xalan="http://xml.apache.org/xalan
And the nodeset function would be
xalan:nodeset($varname)