xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mukul Gandhi <muk...@apache.org>
Subject Re: Xerces-J 2.12.0 vs. Saxon: XSD 1.1 gYearMonth comparison is failing
Date Thu, 09 Aug 2018 05:18:15 GMT
Hi Yitzhak,

On Wed, Aug 8, 2018 at 8:41 PM, Yitzhak Khabinsky <
Yitzhak.Khabinsky@millicom.com> wrote:

>             <xs:assert test="empty(r/Date[xs:gYearMonth(xs:date(.)) ne
> ../../xs:gYearMonth(@DataFeed)])"

I can't exactly debug your above XPath expression quickly. I'm sure,
someone from Xerces team or community will offer advise about above XPath
expression asap, in relation to XSD 1.1 <assert>.

In the meantime, I can offer following XPath 2.0 expressions as workaround
for your usecase, which seem to work with Xerces.

empty(r/Date[substring(string(.),0,8) ne string(../../@DataFeed)])


every $d in r/Date satisfies substring(string($d),0,8) eq string(@DataFeed)

Mukul Gandhi

View raw message