This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

how to compare two int ?

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Holger Prause
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it helped me,

p.s strange syntax i think ...

but thx, its workin now

Holger

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!