Xerces-J 2.* On JDK 9

Mark Raynsford <[email protected]> Tue, 5 Dec 2017 21:18:39 +0000
Newsgroups gmane.text.xml.xerces-j.user
Organization io7m.com
Message-ID <[email protected]>
Hello.

Is it possible to use Xerces in a (modular) JDK 9 project?

I'm trying to do SAX parsing with XSD schema validation, and in order
to resolve schema locations, I need to be able to set a resolver. I
can't do this using the JDK's included SAXParser as it appears to
conform to an older interface (1.4?) which doesn't provide a way to set
a resolver.

If I attempt to use Xerces-J 2.11.0, however, I get a ton of
compilation errors because packages in Xerces conflict with those in
the JDK:

Error:java: the unnamed module reads package org.w3c.dom.html from both xercesImpl and xml.apis
Error:java: the unnamed module reads package javax.xml.datatype from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.transform.dom from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.ranges from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.transform from both xml.apis and java.xml
Error:java: the unnamed module reads package org.xml.sax.ext from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.namespace from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.ls from both xml.apis and java.xml
Error:java: the unnamed module reads package org.xml.sax.helpers from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.validation from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.transform.stax from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.bootstrap from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.parsers from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.stream.events from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.views from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.xpath from both xml.apis and java.xml
Error:java: the unnamed module reads package org.xml.sax from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.events from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.transform.sax from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.stream from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.stream.util from both xml.apis and java.xml
Error:java: the unnamed module reads package org.w3c.dom.traversal from both xml.apis and java.xml
Error:java: the unnamed module reads package javax.xml.transform.stream from both xml.apis and java.xml

Is there any timeline for getting this working (if it's happening at
all)?

-- 
Mark Raynsford | http://www.io7m.com
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEgWja4isV0+3HIsI9DxW30G+oDLgFAlonDS8ACgkQDxW30G+o
DLj7kBAAjk+AYbVq7ZEh1BzOJghqs4CFaQuT6jdfiXiog9WwIkBrep5U8AIcrVlS
25amOeGr9M80QORapjIwbKAKA0SwmXVogLnrj5db2luGKO0Iw2ddYl0gocrxWh25
aEMeGwN+xz9WTlF9MXDE30g0D77fZRfPw9q8pUaU/a82G5HHAHSKPGK5k5zqChvK
QZgLcg7ElThY+FPsXtMGJO4KZvRBhKtu7LHXpm7gR0DGnB3g/AV7bnv326AkwL7F
zNBkYyE6awpslAbCMfXxWXcgpZs2vZyTPs3URLMawxLsCT0QhxhxluK0s4f8Bny/
S1dcaTP74SE9/yzw3TGT6oQzhoiuOLzss4Ci9i3SHZBxcSoiz4qqm6HuUfbYUiFx
VuKowfTcMmQrHIZvKecMnc9Zkh0OfLcbsyy4KofYCPGgZaA7qBiXkqs1IFuQCvBB
neJGxTVSwxQEPGq6KYl5TBZetwtml0mOu9fwo3d0TBDyT4aMG1Oj/r0BE0vezezF
Wik7reHLk38rm6clPN7KcPKVBIz2Ozx5ITDCdoNd4mtFxrdYcHbkoyqR+/79xgKk
3kMIwUr40lsc8+8oZeOrMUqSgNZ9QzNsRJjeiBVQO/j02G6l4Zu/o4u404tW3pQx
c/hNGESa0qq3fEyGaS5OaxTUC4FMj/5rlh9XGKcr0aPEIh8cXDI=
=ORbF
-----END PGP SIGNATURE-----