Validate and Validate with …

Hi, I am sure I am just missing something obvious, but here goes! I have a document like <http://kjc-fs2.kjc.uni-heidelberg.de:8600/exist/apps/tamboti/modules/search/source.xql?id=uuid-b0de7aeb-c208-4290-8466-1bb0d9af5172&clean=yes> When I simply "Validate" this, that is click the red checkmark, I get SystemID: http://cluster-schemas.uni-hd.de/modsCluster.xsd Main validation file: /Users/jens/Desktop/Untitled1.xml Schema: http://cluster-schemas.uni-hd.de/modsCluster.xsd Engine name: Saxon-EE 9.3.0.5 Severity: fatal Description: The attributeGroup {simpleLink} is referenced, but has not been declared Start location: 1051:0 … The MODS schema in question references the XLink schema which declares the xlink:simpleLink attributeGroup, but the link to the XLink schema is obviously not de-referenced. However, when I choose "Validate with …" by clicking on the arrow to the right of the checkmark and feed the schemaLocation contained in the MODS document (namely, <http://cluster-schemas.uni-hd.de/modsCluster.xsd>), the document validates. In this case then, the XLink schema must be referenced. What explains this difference? When I open the schema at <http://cluster-schemas.uni-hd.de/modsCluster.xsd>, the XLink schema is also not de-referenced. Best, Jens oXygen 13.0 on Max OS X 10.6.8.

Hi Jens, I tested and if you validate the XML using the default validation engine (Xerces) the XML is validated. From what your error message looks like:
Engine name: Saxon-EE 9.3.0.5
you probably defined a custom validation scenario for your XML file and configured as a validation engine Saxon EE. When using "Validate with..." action then Xerces is used for validation and this is why validation is successful. So the question is why Saxon EE reports the XML Schema as invalid. The schema "modsCluster.xsd" has a reference to the "xlink.xsd" like:
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.loc.gov/standards/xlink/xlink.xsd"/>
reference which is correct. We'll investigate this and get back with more details. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 10/7/2011 2:13 PM, Jens Østergaard Petersen wrote:
Hi,
I am sure I am just missing something obvious, but here goes!
I have a document like
When I simply "Validate" this, that is click the red checkmark, I get
SystemID: http://cluster-schemas.uni-hd.de/modsCluster.xsd Main validation file: /Users/jens/Desktop/Untitled1.xml Schema: http://cluster-schemas.uni-hd.de/modsCluster.xsd Engine name: Saxon-EE 9.3.0.5 Severity: fatal Description: The attributeGroup {simpleLink} is referenced, but has not been declared Start location: 1051:0 …
The MODS schema in question references the XLink schema which declares the xlink:simpleLink attributeGroup, but the link to the XLink schema is obviously not de-referenced.
However, when I choose "Validate with …" by clicking on the arrow to the right of the checkmark and feed the schemaLocation contained in the MODS document (namely,<http://cluster-schemas.uni-hd.de/modsCluster.xsd>), the document validates. In this case then, the XLink schema must be referenced.
What explains this difference?
When I open the schema at<http://cluster-schemas.uni-hd.de/modsCluster.xsd>, the XLink schema is also not de-referenced.
Best,
Jens
oXygen 13.0 on Max OS X 10.6.8. _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello, The difference is explained by the different XML Schema processor applied by the "Validate with" action. The "Validate" action applies the XML Schema processor set in the user preferences (if the user sets a processor explicitly in the Options -> Preferences dialog) or the default XML Schema processor which is Xerces. From your error message I think you set Saxon EE as the default XML Schema validation engine from Options -> Preferences -> XML -> XML Parser -> Saxon EE Validation. The "Validate with" action uses always the Xerces processor instead of applying the same user preferences as the "Validate" action. We will correct this problem in the next version so that you get the same errors with the two validation actions. The modsCluster.xsd schema seems valid and I think Xerces is right when it reports no validation errors on this schema. I validated this schema with both processors and the difference between the two results is the one that you reported. I will ask on the Saxon user mailing list why Saxon reports the xlink:simpleLink validation error. It could be a bug in the Saxon processor or it could be a different interpretation of the XML Schema specification. Regards, Sorin Jens Østergaard Petersen wrote:
Hi,
I am sure I am just missing something obvious, but here goes!
I have a document like
When I simply "Validate" this, that is click the red checkmark, I get
SystemID: http://cluster-schemas.uni-hd.de/modsCluster.xsd Main validation file: /Users/jens/Desktop/Untitled1.xml Schema: http://cluster-schemas.uni-hd.de/modsCluster.xsd Engine name: Saxon-EE 9.3.0.5 Severity: fatal Description: The attributeGroup {simpleLink} is referenced, but has not been declared Start location: 1051:0 …
The MODS schema in question references the XLink schema which declares the xlink:simpleLink attributeGroup, but the link to the XLink schema is obviously not de-referenced.
However, when I choose "Validate with …" by clicking on the arrow to the right of the checkmark and feed the schemaLocation contained in the MODS document (namely, <http://cluster-schemas.uni-hd.de/modsCluster.xsd>), the document validates. In this case then, the XLink schema must be referenced.
What explains this difference?
When I open the schema at <http://cluster-schemas.uni-hd.de/modsCluster.xsd>, the XLink schema is also not de-referenced.
Best,
Jens
oXygen 13.0 on Max OS X 10.6.8.
participants (3)
-
Jens Østergaard Petersen
-
Radu Coravu
-
Sorin Ristache