Replace XSD path when transforming with Xalan

I am working an XSLT to transform various XML documents supplied by my client. Each of these documents define the XSD in the header.

Like -

<root xmlns="http://www.mycustomer.com/si/schemas/MyCustomersSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.mycustomer.com/si/schemas/MyCustomersSchema.xsd">

The transformation fails because it can't find the XSD http://www.mycustomer.com/si/schemas/MyCustomersSchema.xsd

I do have a local version of the XSD at c:\work\MyCustomersSchema.xsd

As a workaround I've edited all the clients files and everything works fine

<root xmlns="file:///c:/work/MyCustomersSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///c:/work/MyCustomersSchema.xsd">

I'm uncomfortable with the fact that I'm editing all my test cases.

Is there any way I can instruct xalan to replace one URI with another?

I see that Transformer has a setProperties method and a setURLResolver method but can find no examples of their use. I'm not convinced that these will solve my problems. Anyone got any pointers?

[1282 byte] By [thebobster] at [2007-9-30 19:30:12]
# 1
Or is there someway I can tell the Transformer not to validate the input source when transforming?(sorry about the formatting above - I should have previewed)
thebobster at 2007-7-6 23:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Check out this thread. This should answer your question: http://forum.java.sun.com/thread.jsp?forum=34&thread=159320The topic you should be looking for is URI Resolver.Good luck.
syncmaster710m at 2007-7-6 23:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...