为什么
wrapper.instance().handleUnauth()
产量20170101 20170301 20170101 20170501(即重复未删除)
但将其应用于序列的雾化版本
(<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170301</benefitEndDate>,
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170501</benefitEndDate>)/distinct-values(.)
收益
20170701 20170301 20170501
答案 0 :(得分:3)
(
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170301</benefitEndDate>,
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170501</benefitEndDate>
)/distinct-values(.)
与:
不同distinct-values(
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170301</benefitEndDate>,
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170501</benefitEndDate>
)
后者返回元素序列的不同值。
您的代码返回每个元素的distinct-values,就像调用:
(
distinct-values(<benefitStartDate>20170101</benefitStartDate>),
distinct-values(<benefitEndDate>20170301</benefitEndDate>),
distinct-values(<benefitStartDate>20170101</benefitStartDate>),
distinct-values(<benefitEndDate>20170501</benefitEndDate>)
)
另一种返回预期结果的变体是:
(
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170301</benefitEndDate>,
<benefitStartDate>20170101</benefitStartDate>,<benefitEndDate>20170501</benefitEndDate>
) => distinct-values()
最佳
迈克尔