Hi, I have a work around which I am now in the process of testing.
I have downloaded http://ftp.fau.de/apache//xerces/j/binaries/Xerces-J-bin.2.12.0.zip from which I extracted the xercesImpl.jar. Then in the org.opengis.cite.xerces/xercesImpl-xsd11 pom I renamed the xercesImpl-xsd11-2.12-beta-r1667115.jar to xercesImpl-xsd11-2.12-beta-r1667115.old.jar and replaced it with the new jar. The changes to the original source from clojars are as follows: (System/setProperty "javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1" "org.apache.xerces.jaxp.validation.XMLSchema11Factory") (defn- validator-from-schemas [sources] (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1") (.newSchema sources) (.newValidator))) Then I ran this against an example of an xsd with an 'alternative' clause in it and no errors were produced. vxsd.core=> (def is-valid-xml? (vxsd.core/create-validation-fn (slurp xsd-path))) #'vxsd.core/is-valid-xml? Now I am beginning testing against an xml document that should validate. Assuming that this has resolved my issue, could you recommend some steps to make a publicly acceptable resolution i.e. one that isn't a boj? Thank you. -- Regards Stephen. On Wednesday, 30 May 2018 10:02:51 UTC+1, Stephen Feyrer wrote: > > Hi Sean, > > Now that you mention it (a second time - so maybe you do need to tell me > twice :[ ), that does make sense. Thank you. > > This brings us to a new and perhaps more interesting error message: > > vxsd.core=> (def is-valid-xml? (vxsd.core/create-validation-fn (slurp > xsd-path))) > > CompilerException java.lang.IllegalArgumentException: No matching method > found: newSchema for class > org.apache.xerces.jaxp.validation.XMLSchema11Factory, > compiling:(form-init2829816141741533722.clj:1:20) > > > -- > Regards > > Stephen. > > > > On Monday, 28 May 2018 23:23:20 UTC+1, Stephen Feyrer wrote: >> >> Hi there, >> >> I would to validate some XML documents in XSD version 1.1. This cutting >> edge standard is now all of six years old. So perhaps it is understandable >> that it hasn't reached the mainstream stable branches of either the Java or >> .NET eco-systems. >> >> For XSD version 1.0 there is https://clojars.org/clj-xml-validation and >> that works very well. >> >> >> Now there is a library which is available to Java which claims XSD 1.1 >> compliance: >> >> :dependencies [[org.clojure/clojure "1.9.0"] >> [org.opengis.cite.xerces/xercesImpl-xsd11 >> "2.12-beta-r1667115"]] >> >> >> >> So I have included that in my project.clj and copied the source of the >> above clojar into my pet project on my PC (Java HotSpot(TM) 64-Bit Server >> VM 10.0.1+10). That is as far as I've gotten. Nothing seems to pick up on >> the XSD version 1.1. >> >> >> I have tried: >> >> (System/setProperty "javax.xml.validation.SchemaFactory: >> http://www.w3.org/XML/XMLSchema/v1.1" >> "org.apache.xerces.jaxp.validation.XMLSchema11Factory") >> >> (defn- validator-from-schemas >> [sources] >> (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1") >> (.newSchema sources) >> (.newValidator))) >> >> >> Then I run: >> >> user=> (def is-valid-xml? (create-validation-fn (slurp xsd-path))) >> >> CompilerException java.lang.RuntimeException: Unable to resolve symbol: >> create-validation-fn in this context, >> compiling:(C:\cygwin64\tmp\form-init15757041316465825177.clj:1:20) >> >> My theory is that libraries like javax.xml and org.xml.sax are now in >> modules which is probably just one of many problems. >> >> Any insights are gratefully received? >> >> >> -- >> Regards >> >> Stephen. >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.