XSD 1.1 - Element not found
Tuesday, 22 January 2019 · 3 messages
HR
Hans-Juergen Rennau22 Jan 2019 15:15 #
Dear BaseX team,
trying to use XSD 1.1, I encounter a problem.
As indicated in the documentation, I added to the lib folder the jar files from the newest Xerxes distribution (Xerces-J-bin.2.12.0-xml-schema-1.1.zip, download from http://xerces.apache.org/mirrors.cgi#binary ). The problem: when using the schema attribute vc:minVersion="1.1", validation fails with the message:
1:41: cvc-elt.1.a: Cannot find the declaration of element 'Foo'.
But the element is there, and the namespace matches the target namespace. When changing the attribute vc:minVersion="1.0", validation works, but, of course, cannot cope with 1.1 features. (The same applies to validation after removing the attribute.) I tried both - copying only the four jar files named in the documention,
cupv10k-runtime.jar
org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
xercesImpl.jar
xml-apis.jar
and then I tried copying all jars:
cupv10k-runtime.jar
icu4j.jar
org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
resolver.jar
serializer.jar
xercesImpl.jar
xercesSamples.jar
xml-apis.jar
Any suggestions would be welcome!
With kind regards,Hans-Jürgen
PS: I use Java version 1.8.0_181-b13
ZD
Zimmel, Daniel22 Jan 2019 15:43 #
With 1.1, I found that
validate:xsd() requires you to explicitly give ‘1.1’ as third parameter. Having vs:minVersion is not being honored by BaseX.
DanielQuoted text · Hans-Juergen Rennau · 28 lines
Von: Hans-Juergen Rennau [mailto:hrennau at yahoo.de] Gesendet: Dienstag, 22. Januar 2019 15:15 An: BaseX Support Betreff: [basex-talk] XSD 1.1 - Element not found Dear BaseX team, trying to use XSD 1.1, I encounter a problem. As indicated in the documentation, I added to the lib folder the jar files from the newest Xerxes distribution (Xerces-J-bin.2.12.0-xml-schema-1.1.zip, download from http://xerces.apache.org/mirrors.cgi#binary ). The problem: when using the schema attribute vc:minVersion="1.1", validation fails with the message: 1:41: cvc-elt.1.a: Cannot find the declaration of element 'Foo'. But the element is there, and the namespace matches the target namespace. When changing the attribute vc:minVersion="1.0", validation works, but, of course, cannot cope with 1.1 features. (The same applies to validation after removing the attribute.) I tried both - copying only the four jar files named in the documention, cupv10k-runtime.jar org.eclipse.wst.xml.xpath2.processor_1.2.0.jar xercesImpl.jar xml-apis.jar and then I tried copying all jars: cupv10k-runtime.jar icu4j.jar org.eclipse.wst.xml.xpath2.processor_1.2.0.jar resolver.jar serializer.jar xercesImpl.jar xercesSamples.jar xml-apis.jar Any suggestions would be welcome! With kind regards, Hans-Jürgen PS: I use Java version 1.8.0_181-b13
HR
Hans-Juergen Rennau22 Jan 2019 17:09 #
Many thanks, Daniel!
Now it works.
Kind regards,Hans-Jürgen
Am Dienstag, 22. Januar 2019, 15:43:23 MEZ hat Zimmel, Daniel <D.Zimmel at ESVmedien.de> Folgendes geschrieben:
#yiv5615938040 #yiv5615938040 -- _filtered #yiv5615938040 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv5615938040 {panose-1:2 2 6 9 4 2 5 8 3 4;} _filtered #yiv5615938040 {panose-1:2 2 6 9 4 2 5 8 3 4;} _filtered #yiv5615938040 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv5615938040 {panose-1:2 2 6 9 4 2 5 8 3 4;}#yiv5615938040 #yiv5615938040 p.yiv5615938040MsoNormal, #yiv5615938040 li.yiv5615938040MsoNormal, #yiv5615938040 div.yiv5615938040MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:New;}#yiv5615938040 a:link, #yiv5615938040 span.yiv5615938040MsoHyperlink {color:blue;text-decoration:underline;}#yiv5615938040 a:visited, #yiv5615938040 span.yiv5615938040MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv5615938040 span.yiv5615938040E-MailFormatvorlage17 {color:#1F497D;}#yiv5615938040 .yiv5615938040MsoChpDefault {font-size:10.0pt;} _filtered #yiv5615938040 {margin:70.85pt 70.85pt 2.0cm 70.85pt;}#yiv5615938040 div.yiv5615938040WordSection1 {}#yiv5615938040 With 1.1, I found that
validate:xsd() requires you to explicitly give ‘1.1’ as third parameter.
Having vs:minVersion is not being honored by BaseX.
DanielQuoted text · Hans-Juergen Rennau · 28 lines
Von: Hans-Juergen Rennau [mailto:hrennau at yahoo.de] Gesendet: Dienstag, 22. Januar 2019 15:15 An: BaseX Support Betreff: [basex-talk] XSD 1.1 - Element not found Dear BaseX team, trying to use XSD 1.1, I encounter a problem. As indicated in the documentation, I added to the lib folder the jar files from the newest Xerxes distribution (Xerces-J-bin.2.12.0-xml-schema-1.1.zip, download fromhttp://xerces.apache.org/mirrors.cgi#binary ). The problem: when using the schema attribute vc:minVersion="1.1", validation fails with the message: 1:41: cvc-elt.1.a: Cannot find the declaration of element 'Foo'. But the element is there, and the namespace matches the target namespace. When changing the attribute vc:minVersion="1.0", validation works, but, of course, cannot cope with 1.1 features. (The same applies to validation after removing the attribute.) I tried both - copying only the four jar files named in the documention, cupv10k-runtime.jar org.eclipse.wst.xml.xpath2.processor_1.2.0.jar xercesImpl.jar xml-apis.jar and then I tried copying all jars: cupv10k-runtime.jar icu4j.jar org.eclipse.wst.xml.xpath2.processor_1.2.0.jar resolver.jar serializer.jar xercesImpl.jar xercesSamples.jar xml-apis.jar Any suggestions would be welcome! With kind regards, Hans-Jürgen PS: I use Java version 1.8.0_181-b13
Written for BaseX 9.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery