Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools for merging multiple xsd files

Tags:

I've got a XML schema which is split to multiple XSD files. Now we need to merge them into one big XSD file. Anyone knows a good tools I can use to do it? Manually merging would be too cumbersome, and error-prone.

Thanks very much.


To make the question a bit clearer: What I'm facing is that

  • Case 1 I've got WSDL which reference multiple xsd files, I use soapUI to generate Web service, but soapUI cannot handle those multiple xsd references because the refrence URLs in all files are still referencing to web sites which are not available, unless I manually hack those URLs to reference local xsd files. But this is tedious, each time I have to do it when WSDL changes. So I need a tools to put all XSD file's content inside the WSDL file. So soapUI will accept it.

  • Case 2 I also initially had a big XSD file, but client asked to split a particular path in the main XSD to a seperate XSD file, and removed this from the main XSD then, for example.

the initial Main XSD's struct:

-root node - 1st level node 1 - 2nd level node 1
                              - 2nd level node 2
           - 1st level node 2 - 2nd level node 3
                              - 2nd level node 4
                              - 2nd level node 5

now, after split, it become two xsd files:

-root node - 1st level node 1 - 2nd level node 1
                              - 2nd level node 2
           - 1st level node 2 - 2nd level node 5

-root node - 1st level node 2 - 2nd level node 3
                              - 2nd level node 4

the problem is that I use .net xsd.exe tool to generate classes from those xsd files. After splitting to 2 xsd files which are compensatory, when I use xsd.exe to generate classes again, it will produce conflict classes for the root level's and 1st level's nodes.

so I need a tool to merge these XSD files into a single one again for generating classes.

Any ideas?