in reply to
Automatically creating data validation module from XSD
I wouldn't do it. If you're having trouble writing code that validates from a .xsd, what about reversing the input into xsd form - seems an illogical thing to do given that actual data should not be a schema, but the effect is to reduce the validation requirement to a single fixed generic routine of about half a page to compare the two xsd trees.
^M Free your mind!