I
IMS.Rushikesh
Hi Friends,
I need a XPath query, whcih ll return me subset of data....
check below xml stream
<label id="MyExpenseDetails_lbl" xlink:role="terseLabel">Short Expense
Details</label>
<label id="MyExpenseDetails_lbl" xlink:role="displayLabel">Expense
Details</label>
<label id="InternalExpense_lbl" xlink:role="displayLabel">Internal
Expense</label>
<label id="ExternalExpense_lbl" xlink:role="terseLabel">Short External
Expense</label>
See above xml data having 4 label elements out of which 3 different IDs
and 2 different role.
MyExpenseDetails_lbl contain all 2 role, InternalExpense_lbl having
displayLabel and ExternalExpense_lbl having terseLabel
Now i want such XPath query or XQL command that return me collection of
label.
if user pass "terseLabel" label then label with role = "terseLabel"
should be return and the other one "InternalExpense_lbl" should also
return.
If user pass "displayLabel" label then label with only role =
"displayLabel" should be return.
Cond1: role = "terseLabel"
MyExpenseDetails_lbl (Short Expense Details) (only one record with role
= terseLabel )
InternalExpense_lbl (Internal Expense)
ExternalExpense_lbl (Short External Expense)
Cond2: role = "displayLabel"
MyExpenseDetails_lbl (Expense Details) (only one record with role =
displayLabel )
InternalExpense_lbl (Internal Expense)
There r also other more label roles , so i need it using XPath / XQL
query not by any hard coding
I tried below XPath Query but it's returning all 4 labels and i only
need as per my requirements. I mean if other label not exist for any
label then the default one i.e displayLabel should taken.
default:label[@xml:lang and @xlink:role=("terseLabel" or
"displayLabel")]
Thanks in advance
Regards
Rushikesh
I need a XPath query, whcih ll return me subset of data....
check below xml stream
<label id="MyExpenseDetails_lbl" xlink:role="terseLabel">Short Expense
Details</label>
<label id="MyExpenseDetails_lbl" xlink:role="displayLabel">Expense
Details</label>
<label id="InternalExpense_lbl" xlink:role="displayLabel">Internal
Expense</label>
<label id="ExternalExpense_lbl" xlink:role="terseLabel">Short External
Expense</label>
See above xml data having 4 label elements out of which 3 different IDs
and 2 different role.
MyExpenseDetails_lbl contain all 2 role, InternalExpense_lbl having
displayLabel and ExternalExpense_lbl having terseLabel
Now i want such XPath query or XQL command that return me collection of
label.
if user pass "terseLabel" label then label with role = "terseLabel"
should be return and the other one "InternalExpense_lbl" should also
return.
If user pass "displayLabel" label then label with only role =
"displayLabel" should be return.
Cond1: role = "terseLabel"
MyExpenseDetails_lbl (Short Expense Details) (only one record with role
= terseLabel )
InternalExpense_lbl (Internal Expense)
ExternalExpense_lbl (Short External Expense)
Cond2: role = "displayLabel"
MyExpenseDetails_lbl (Expense Details) (only one record with role =
displayLabel )
InternalExpense_lbl (Internal Expense)
There r also other more label roles , so i need it using XPath / XQL
query not by any hard coding
I tried below XPath Query but it's returning all 4 labels and i only
need as per my requirements. I mean if other label not exist for any
label then the default one i.e displayLabel should taken.
default:label[@xml:lang and @xlink:role=("terseLabel" or
"displayLabel")]
Thanks in advance
Regards
Rushikesh