Re: Re: Possible Bug: Xerces 2.12.1 for XML Validation with XSD 1.1 Schema under Java - Plain Text

JOHN Morris <[email protected]> Sun, 23 Aug 2020 14:53:17 +0100 (BST)
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <[email protected]>
Hi Mukul,
Thanks.
I have followed the steps you suggested in using jave -Djava.endorsed.dirs=
=3D... and jaxp.SourceValidator (although I am using java version "1.8.0_26=
1") but the validation results are unaffected.
I still get 9 validation violations from test1.xml but none at all from the=
 essentially identical test2.xml.
Where can we go from here? I can only think of asking you to double check t=
hat both of your test runs are not on the same XML data somehow. (Recall th=
at test2.xml should have those XML comment lines at lines 40, 158 and 195, =
displacing the previously erroneous lines to other line numbers, where they=
 now seem (in my validation) harmless).
... or do you have any other further suggested steps in order to achieve co=
nsistency from our two sets of results?
Thank you also for the clarification about the characters outside the UTF-8=
 encoding scheme. I should have thought about those accented letters.

best regards,
John.

> On 23 August 2020 at 10:43 Mukul Gandhi <[email protected]> wrote:=20
>=20
>=20
> On Sun, Aug 23, 2020 at 2:13 PM JOHN Morris <[email protected]=
lid> wrote:=20
>=20
> > I think that the first steps in achieving convergence between the valid=
ation behaviour that you observe and mine is for me to try switching to jax=
p.SourceValidator and to ensure that I am using the same environment as you=
. To that (second) end, I would ask you to provide a (Windows) batch file, =
embodying the environment that you use to run your tests (unless your tests=
 were made using the environment in my batch file).
> Following are the contents of batch file that I use, to run XSD 1.1 valid=
ation using Xerces-J sample jaxp.SourceValidator,
> =C2=A0
>=20
> @echo off
> =C2=A0
> java -Djava.endorsed.dirs=3DF:\xerces-2_12_1-xml-schema-1.1 jaxp.SourceVa=
lidator -i %1 -a %2 -f -fx -xsd11
>=20
> =C2=A0
> (please replace=C2=A0F:\xerces-2_12_1-xml-schema-1.1 with Xerces-J's path=
 on your environment)
> =C2=A0
> The above batch file needs to be invoked as:  xmlFile_name xsdFile_name
> =C2=A0
> I'm currently using java 1.8.0_241 from Oracle.
> > =C2=A0
> >=20
> >=20
> > I would also ask you which characters in my XML files were unable to be=
 represented in the default UTF-8 encoding, in case they are the result typ=
os that I haven't noticed.
> When I specify the XML prolog as=C2=A0<?xml version=3D"1.0"?>, for the XM=
L document that is validated, I get following errors,
> =C2=A0
> [Fatal Error] test1.xml:10:93: Invalid byte 2 of 3-byte UTF-8 sequence.=
=20
> =C2=A0
> (that is the line=C2=A0Copyright (C) 2005 - 2017 [joomla.fr](http://jooml=
a.fr) et Open Source Matters. Tous droits r=C3=A9serv=C3=A9s within your XM=
L document)
> =C2=A0
> Specifying the XML prolog as=C2=A0<?xml version=3D"1.0" encoding=3D"ISO-8=
859-1"?>, solves this problem for me.
>=20
>=20
> --=20
>=20
>=20
> Regards,=20
> Mukul Gandhi