aspose file tools*
The moose likes XML and Related Technologies and the fly likes how to compare two int ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to compare two int ?" Watch "how to compare two int ?" New topic
Author

how to compare two int ?

Holger Prause
Ranch Hand

Joined: Oct 09, 2000
Posts: 47
Hello,
i cant help myself but i think XSLT is quite difficult , isnt it?
I am just searching for a possebility to compare to int
<xsl:variable name="pattern">1</xsl:variable>
<xsl:variable name="pattern2">2</xsl:variable>

<xsl:if $pattern="$pattern2">isnt doing what i want , boolean and xsl:when also not
it cant be too difficult i think, i just want to compare to values ..
Thx,
Holger
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Try this and see if it works

<xsl:if test="$pattern = $pattern2">
// whaterver
</xsl:if>
Hope that helps
------------------

Ajith Kallambella M.
Sun Certified Programmer for the Java2 Platform.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Holger Prause
Ranch Hand

Joined: Oct 09, 2000
Posts: 47
yes it helped me,

p.s strange syntax i think ...

but thx, its workin now

Holger

Chris McGuirk
Greenhorn

Joined: Jan 16, 2001
Posts: 7
The syntax isn't strange, <xsl:if $pattern=$pattern2> is not a well formed XML element, but <xsl:if test="$pattern=$pattern2"> is . XSL is built on XML.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to compare two int ?