• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSLT: conditional with "or"

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

can you do conditionals with "or" in XSLT? (equiv. of "||" in a java conditional...)

I don't think <xsl:choose> would accomplish same goal, as I don't want to have to repeat content in XSLT..

I want to say IF a certain param in custom-tag equals this or that or that other THEN put this content here..

thank you very much..
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can. And if you were trying to ask how, well, the XSLT "or" operator is "or".
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe Veronica Damian is asking how to match 2 different elements by using the same template.

I think the or operator is "|".

The same code for identity template:
 
Veronica Damian
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much.. that's what I thought (since for 'and' it's 'and'..;)
but it's being ignored..
ok, thanks again..

Originally posted by Paul Clapham:
Yes, you can. And if you were trying to ask how, well, the XSLT "or" operator is "or".

 
Paul Clapham
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Veronica Damian:
but it's being ignored..

That would be because you are expecting it to do something different than what you really told it to do. If you are still having a problem and would like help with it, don't hesitate to post the details here.
[ November 26, 2007: Message edited by: Paul Clapham ]
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic