0

I have an older application that uses a jar named xerces.jar. Looking at this I can see that it is the same as xercesImpl-2.9.1.jar from the maven repository.

When I run the application the xml validation behaves differently depending on if the jar is named xerces.jar or xercesImpl-2.9.1.jar.

I suspect there is something going on with the order that it it found on the classpath but I don't fully understand what is going on.

Any ideas as to what is going on?

The particular change is this: The start tag looks like:

<Message xmlns="http://www.foo.com/messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" release="006" version="010" xsi:schemaLocation="file:///C:/SOME/PATH">

When the jar is named "xerces.jar" this accepted when the app validates against a specific schema. When the jar is named "xercesImpl-2.9.1.jar" then it gives the error: Attribute 'xsi:schemaLocation' is not allowed to appear in element

Dave
  • 13,518
  • 7
  • 42
  • 51

0 Answers0