I would like to import some elements of another schema into a new one, they have different namespaces. I can do it successfully, however, I have problems validating the xml. The xml will be elaborated by an external program and there should not be any prefixes before the name of the tag (pe <tns:root> ... </tns:root> ) or xmlns attributes in nodes other than the root.
Example: this works
this works too
but i want this
Is this feasible? I have tried many combinations of elementFormDefault in both the schemas but I could not pull it off. thanks in advance
In the example that you want to work, the element imported_element will belong to "no namespace", is that what you want? (This article has more on namespaces) If not, then you must specify the namespace of this element in the root (because according to the rules you have specified, you can not have it in the child element.) and use the prefix of the namespace with this element.
[ April 10, 2008: Message edited by: Nitesh Kant ]