I have a situation where I have different XMLs that will have different types of properties. Sometimes the element HEADER could have just a node or some XMLs co
If the instances already exist, and you can't change them, and you are trying to write an XSD schema to describe them, and it has to be one schema that describes them all, then your options are very limited. As far as I'm aware the only solution is to define HEADER with mixed content -- and that's a lousy solution. It can be improved a bit (though not much) by using XSD 1.1 assertions.
If you can remove any of these requirements (e.g if you can change the instance documents, or if you can use RelaxNG to do the validation, or if you can use a different schema for each document type) then you have a chance of a more satisfactory solution.