I have an XML schema and an instance document I get from a customer. For example the document can be:
<doc>
<carId>12</carId>
</doc>
And it is valid according to the schema.
I would like to annotate this with my attributes:
<doc>
<carId myns:valid="true">12</carId>
</doc>
I would like the annotated document to be valid according to some schema - I don't care which schema, I guess it would be based on the original one.
My question is if there is some way to "extend" the original schema in a new schema without changing it? Alternatively is adding such attributes always legal provided that they are valid according their own schema?
I cannot assume anything about the original schema, i.e. it does not necessarily declare that xsd:anyAttribute is allowed on its elements.