| Author |
importing a schema into another
|
Enrico Scantamburlo
Greenhorn
Joined: Apr 09, 2008
Posts: 7
|
|
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
|
 |
Nitesh Kant
Bartender
Joined: Feb 25, 2007
Posts: 1638
|
|
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. Something like: [ April 10, 2008: Message edited by: Nitesh Kant ]
|
apigee, a better way to API!
|
 |
Enrico Scantamburlo
Greenhorn
Joined: Apr 09, 2008
Posts: 7
|
|
|
Thanks a lot this solved my problem
|
 |
Raghavan Muthu
Ranch Hand
Joined: Apr 20, 2006
Posts: 3327
|
|
|
That's a good article. Thanks Nitesh Kant :thumb:
|
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
|
 |
 |
|
|
subject: importing a schema into another
|
|
|