This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
Referring local element of a different namespace in another xsd?
posted 4 years ago
Requirement is such that I want only some elements defined in xsd's to be accessible as root elements.
So, for that the approach is to make all the other elements local by declaring complex types and referring them.
But, if those non-accessible or local elements are required in another xsd definition, in other words, they can be child elements of the elements belonging to some other namespace defined in a different xsd.
How to achieve this kind of schema definition?
For e.g In the following
say I only want A:root and custom:root to be valid roots not inner:A, so I declared innerA under the root element and referred the type, while A:innerA can come under the <custom:root> element?
I cannot define innerA in B.xsd, bcz it will make the innerA to be in B.xsd's targetnamespace i.e custom namespace.
The Fourth last line in above B.xsd causes error. How can I refer the innerA element. Any suggetions?