We need to catch the case when user edits XML with nodes where "xmlns" attribute is different from "targetNamespace" and "xmlns" defined in XSD.
For example, lets take your SyntaxEditor Demo called "XML Editor (Web Lang. Add-on)".
This demo contains XSD file "Mammals.xsd" which is intended to validate documents with namespace "http://ActiproSoftware/Mammals".
Now let's switch to XML file from this example - "Mammals-Dog.xml". It contains root element that looks as following:
<mammal xmlns="http://ActiProSoftware/Mammals" species="Dog" locomotion="terrestrial">
In case if I change value of "xmlns" attribute in this "mammal" element or just delete the attribute at all, SyntaxEditor will stop performing XSD validation of "mammal" node inner contents.
In this case I would like to get validation message saying that "mammal" element is not expected here (or some custom message).
For example, MS Visual Studio's 2010 editor in this case shows message "Could not find schema information for the element 'mammal'"
Is there any easy way to achieve this behavior? Please suggest a direction to move.
Thank you in advance