RE: Xerces-J 2.12.0 vs. Saxon: XSD 1.1 CTA validation errors

Yitzhak Khabinsky <[email protected]> Mon, 6 Aug 2018 14:00:11 +0000
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <AM6PR09MB26293D3E2A2A10FB70A7646D8D200@AM6PR09MB2629.eurprd09.prod.outlook.com>
Hi Mukul,

With or without “-fx” parameter, the XSD validation is not picking up the full XPath 2.0 for the CTAs.
Please see its screen shot below.

It is a pure command line execution, no any APIs calls are involved.
I provided both screen shots, with and without “-fx” parameter, for a comparison.

Please advise.

[cid:[email protected]]


Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL  33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
[email protected]<mailto:[email protected]>
www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millicom.com%2F&data=02%7C01%7CMalcolm.Stewart%40microsoft.com%7C9338023699c2494d08be08d4ad12ce55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636323743686702678&sdata=DxQ9dfL259rpdVZ9seOAcR6bvgxRobyIerOgvTgPc90%3D&reserved=0>

From: Yitzhak Khabinsky
Sent: Friday, August 3, 2018 8:58 AM
To: '[email protected]' <[email protected]>
Cc: [email protected]
Subject: RE: Xerces-J 2.12.0 vs. Saxon: XSD 1.1 CTA validation errors

Hi Mukul,


  1.  I am providing a screen shot of the XSD validation at the command prompt.
It shows that all the needed parameters were passed, i.e. -xsd11 and -fx
I attached 3 files, including a command file cta.cmd, so you can reproduce the behavior on your side.
  2.  Please confirm that the base-uri(.) function behavior is a bug.
Saxon validator is working properly.
Please see a screen shot below.

[cid:[email protected]]

 [cid:[email protected]]
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL  33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
[email protected]<mailto:[email protected]>
www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millicom.com%2F&data=02%7C01%7CMalcolm.Stewart%40microsoft.com%7C9338023699c2494d08be08d4ad12ce55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636323743686702678&sdata=DxQ9dfL259rpdVZ9seOAcR6bvgxRobyIerOgvTgPc90%3D&reserved=0>

From: Mukul Gandhi [mailto:[email protected]]
Sent: Friday, August 3, 2018 1:04 AM
To: Yitzhak Khabinsky <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: Xerces-J 2.12.0 vs. Saxon: XSD 1.1 CTA validation errors

Hi Yitzhak,

On Thu, Aug 2, 2018 at 6:57 PM, Yitzhak Khabinsky <[email protected]<mailto:[email protected]>> wrote:

  1.  The CTA expression continues to trip on search in sequences.
The error message says  “…couldn't compile successfully…”
  2.  The CTA expression doesn’t accept “eq” instead of “=”.
The error message says  “…couldn't compile successfully…”
I did test your XML and XSD sample that you attached most recently. While doing XSD 1.1 validation using the Xerces sample jaxp.SourceValidator, when I don't give an option -fx I get errors for CTA XPath expressions saying, "couldn't compile successfully". But when I give option -fx, I don't get that error.

It seems, there's some other issue on your side that I don't reproduce.



  1.
  2.  It seems that the base-uri(.) function call is failing to return the fully qualified path to the XML file that is being validated.

     *   Saxon’s base-uri(.) function call correctly emits the following:
file:///d:/Temp/CDW/IFRS/Tanzania/id2938_TZ20171231_IFRS15_CBCInput_3TZ005.xml
You seem to be using the base-uri(.) function in your xs:assert. As I said earlier, Xerces's xs:assert evaluation does not preserve the URI of XML file that is being validated, that can be returned by the base-uri(.) call in an xs:assert. Therefore, while using XSD 1.1 validation (specifically using xs:assert) with Xerces, you shouldn't rely on the value of base-uri(.).





--
Regards,
Mukul Gandhi
image003.png (image/png, 40.7 KB) - not displayed
image004.png (image/png, 40.8 KB) - not displayed
image005.png (image/png, 16.6 KB) - not displayed