On Sun, Aug 23, 2020 at 2:13 PM JOHN Morris <j.morri...@ntlworld.com.invalid>
wrote:

> I think that the first steps in achieving convergence between the
> validation behaviour that you observe and mine is for me to try switching
> to jaxp.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
validation using Xerces-J sample jaxp.SourceValidator,

*@echo off*

*java -Djava.endorsed.dirs=F:\xerces-2_12_1-xml-schema-1.1
jaxp.SourceValidator -i %1 -a %2 -f -fx -xsd11*

(please replace F:\xerces-2_12_1-xml-schema-1.1 with Xerces-J's path on
your environment)

The above batch file needs to be invoked as: <batch_file_name> xmlFile_name
xsdFile_name

I'm currently using java 1.8.0_241 from Oracle.

> 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
> typos that I haven't noticed.
>
When I specify the XML prolog as <?xml version="1.0"?>, for the XML
document that is validated, I get following errors,

[Fatal Error] test1.xml:10:93: Invalid byte 2 of 3-byte UTF-8 sequence.

(that is the line <copyright>Copyright (C) 2005 - 2017 joomla.fr et Open
Source Matters. Tous droits réservés</copyright> within your XML document)

Specifying the XML prolog as <?xml version="1.0" encoding="ISO-8859-1"?>,
solves this problem for me.



-- 
Regards,
Mukul Gandhi

Reply via email to