Re: Xerces-J 2.12.0 vs. Saxon: XSD 1.1 gYearMonth comparison is failing

Mukul Gandhi <[email protected]> Thu, 9 Aug 2018 10:48:15 +0530
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <CABuuzNMHq3u1mjo13QSDbbbG1AwtsjyR1p6w4=9f5foGzLwvCw@mail.gmail.com>
Hi Yitzhak,

On Wed, Aug 8, 2018 at 8:41 PM, Yitzhak Khabinsky <
[email protected]> 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)])

or

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





-- 
Regards,
Mukul Gandhi