|
From: Dan M. <dan...@gm...> - 2010-09-13 20:50:07
|
If you have this
<item>
<gender>1</gender>
try something like this:
let $gender :=
if ($item/gender/text() = '1')
then 'Male'
else 'Female'
- Dan
2010/9/13 xx rvt <xx...@wi...>
> Hi all,
>
> I would like to know if xquery returns text arguments.
> what i mean is that in Tsql I would write that following:
>
> select case
> when Male = 1
> then 'Male'
> else 'Female'
> end as gender
> from trainers
>
> How can I write the upper statement in xquery?
>
> Thank you
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>
--
Dan McCreary
Semantic Solutions Architect
office: (952) 931-9198
cell: (612) 986-1552
|