for $PurchaseOrderLine in /*:ProcessPurchaseOrder/*:DataArea/*:PurchaseOrder/*:PurchaseOrderLine
let $d:= $PurchaseOrderLine/*:Item/*:ItemID/*:ID
return
<ResponseDetail>
The lines
if ($d/text()="") then
<ItemNumber source ="">
{$PurchaseOrderLine/*:Item/*:ItemID/*:ID/text()}
</ItemNumber>
fail to work and always the result in the else loop is displayed.
>> what i m trying to do is when $PurchaseOrderLine/*:Item/*:ItemID/*:ID/text = null then the tags holding the null information should be
<ItemNumber source ="">
</ItemNumber>
and when not null the tags should be
<ItemNumber source ="UI">
<ItemNumber source ="">
{$PurchaseOrderLine/*:Item/*:ItemID/*:ID/text()}
</ItemNumber>
and similarily for the other tags too.
I don't know if i m missing something or if my approach is wrong.Any help would be greatly appreciated.I m using the saxon processor to generate java code from the following xquery, and run it.