1

What XML validator does XMLspy uses? I am running into an issue that I can validate an XML file against the schema using Oxygen but yet it is not valid when I use XMLSpy! does anyone has any general thoughts regarding this?

Thanks a lot :)

tigris
  • 107
  • 1
  • 8

2 Answers2

3

XMLSpy uses its own validation engine. Usually the problem is the other way around, that XMLSpy accepts things which other schema processors reject. Notoriously, Altova chose not to enforce the Unique Particle Attribution constraint.

Oxygen can be configured to use either Xerces or Saxon. Both are highly conformant with the W3C specifications, though there are a few grey areas (such as complex sequences of xs:redefines) where you will rarely get two processors to agree. Some things are explicitly implementation-defined in the W3C specs, such as limits on the range of dates accepted.

If you want more specific help you'll have to tell us what the schema, the instance, and the error messages from both products look like.

It's more common to get differences between products as to whether or not a schema is valid, rather than differences as to whether an instance is valid.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • Thanks Micheal, we got it to validate there was a required element that was missing.. but what is confusing me is why XMLSpy is the only validator that caught it!! Thanks a lot for your reply :) – tigris Sep 12 '11 at 23:17
  • I'd love to know, but as I said in my response, you'll have to reveal rather more about what you are doing. It must be something very strange. – Michael Kay Sep 14 '11 at 14:27
1

You can tell Oxygen to use a different validation engine through the configuration settings. If I'm not mistaken the default one is Xalan and you could trade it for MSXML or Saxon or ...

From the looks of it you can't do that in Altova and you're stuck with Altova's own validation engine (which is very strict apparently). I've read one forum post that hints to the use of a macro in XMLSpy to make use of an external system / validation engine. If you're up to it you could get that to work.

Without going into a discussion of which one of these programs (or others in its niche) is the better one and avoiding a similar discussion about the different validation engines available, I'd recommend you (and your team) pick one, preferably based on some research of course, and stick to it. If at one point the schema is also to be used by external parties, it will be the challenge of getting them to use the same one as you do. Depending on the case the external party or you will have to adjust preferences.

Wivani
  • 2,036
  • 22
  • 28
  • Thanks Wim, I think I should stick to XMLSpy since we don't know what other teams are going to use! so we might stick to the strict validator.. – tigris Sep 12 '11 at 14:27
  • You might have to come back from that if the validation is to be done in code (Java or whatever). I doubt you can find a library with Altova's engine you can add to your project. – Wivani Sep 12 '11 at 14:33
  • yes, so this is an input for a stage that uses informatica data transformation which uses a strict validation, so if the input is not valid we won't be able to run the next stage.. – tigris Sep 12 '11 at 14:53
  • 1
    In order to use Xerces in XMLSpy take the XML ValidatorBuddy plugin from [xml-tools.com](http://xml-tools.com/download.htm). You get Schematron support and access to the Xerces validation engine in an easy way. – Clemens Aug 28 '12 at 17:26
  • Sounds and looks like a valid option, Clemens. Thanks for the info. – Wivani Aug 29 '12 at 12:48