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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to