Geekality

Geekality

Search
Skip to content
Software Development

XSLT: Conditional variable select and castable as

October 2, 2013 Torleif Leave a comment

Quick simple conditional select when creating a variable in XSLT 2.0. Also shows the castable as check.

<variable name="id" select="if(id castable as xs:integer) then id else 0" />
XSLTXSLT-2.0

Post navigation

Previous PostVim: Change color schemeNext PostSettings for VLC dynamic range compression

Greetings! I am Torleif Berger, and I’m a Software Engineer. I’m a Seventh-Day Adventist, an introvert, an ISFJ-T, and an HSP. Currently into forest hikes and indoor rock climbing; also dabble a bit with indoor rowing, juggling, and other fun activities, but most of my time is spent in front of a screen… c”,)

Stack Overflow

Google Twitter Facebook LinkedIn YouTube Vimeo RSS

Recent Posts

  • How to split an earlier git commit into multiple ones
  • When did my Windows 10 last boot up?
  • NVDA shortcuts I keep forgetting
  • How to increase heap size for node
  • Node: Control depth when logging objects
  • Drop in use SQL Server database
  • How to clear local NuGet cache

Categories

Archives

Creative Commons License

With a hint of Social Ineptitude

Proudly powered by WordPress