The moose likes XML and Related Technologies and the fly likes Overloading a XSD section Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Overloading a XSD section" Watch "Overloading a XSD section" New topic

Overloading a XSD section

Randy Miller
Ranch Hand

Joined: Feb 13, 2012
Posts: 44
Hi ranchers!

I am currently working on some new features of my XML processing tool and occured a problem working with the XML scheme. Basically, my tool generates a user GUI based on a XML scheme(=XSD) and a corresponding XML. I use a GUI Engine to dynamically generate the GUI based on the XSD and fill the generated blank formular with the information provided by the XML. But there´s a problem in displaying the "<any...>" elements. The problem is simply caused by the underlying XSD declarations, but I am not allowed to change the XSD period. So, I got the idea to just temporarly alter the XSD to successfully process the now correctly displayed data. My basic idea goes something like this:

I wanna provide a mechanism to overload the problematic XSD section with a correct one. Just like this:

Basic XSD section:

Wanted XSD section:

So,I basically wanna exchange the basic XSD section in XSD file 1 with the wanted XSD section in XSD file 2. Again, I cannot change the basic XSD for good, just temporarely.
I just want to allow the user to easily overload a section by for example click a button.
The problem with the "any"-section just is, that ANYTHING can be written in there, so the GUI engine I am currently using, just has no clue what elements are inside the section <variableParameters> because the elements are not mentioned inside the XSD.

Long story, short question: Is there any way to realize the overloading process of a XSD?I searched for days now but haven´t found anything yet...
I agree. Here's the link: http://aspose.com/file-tools
subject: Overloading a XSD section
Similar Threads
How to ensure some mandatory and some optional elements under complextype in xml?
servlets and xml
XML schema fails to load
Need to create nested element with name