This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've got about five XML Schemas with each schema calling an include to the one before it, so it's basically a one-branch tree. For instance my schema Dog.xsd would include Mammal.xsd, Mammal.xsd would include Animal.xsd, and then Animal.xsd would include Organism.xsd. This way, everything in Dog.xsd can access everything in Mammal.xsd, Animal.xsd, and Organism.xsd.
My question then is, is there a way to put all the schemas into one file so that i could request any element in any .xsd at any time?
For instance, in the code below, i'm getting the attribute of one of the elements in Dog.xsd.
What i want to be able to do is just search through all the schemas for a specific attribute.
So is there any way to combine all the schema files into one, and then be able to search through that file for specific attributes, all with Java code?
That way, i could replace the above "./Dog.xsd" with "/.AllSchemas.xsd" (AllSchemas being the xsd that holds everything inside each schema.
So my main question is, how do i write the file AllSchemas in Java to include all those smaller schema files i already have?
And i need to keep the schemas separate (so i am unable to just write one entire schema file from the beginning), i only want to combine them temporarily for this search.
Joined: Feb 14, 2005
No one has any ideas for this?
I was recently informed that there was a method you could call in Java that takes in an XML and as many schemas as you want and verifies against them.