Click here to Skip to main content
15,888,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Have two XSD schema files and i want to merge them into a single XSD and then want to apply some transformation.

What I have tried:

I am able to merge these files with the below lines but facing issues with the Root element.

<xsd:import namespace="http://schemas.datacontract.org/2004/07/A" schemaLocation="A.xsd"/>
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/B" schemaLocation="B.xsd"/>


I want A's root element as the Root element of the combined xsd file and B's Root element as the child of Combined XSD file.

Thanks in advance.
Posted
Updated 7-May-20 2:35am
v2

1 solution

A Google Search: merge XSDs[^]

found this: java - How to merge more than one XSD file to one XSD file? - Stack Overflow[^]

which has examples and points to these documents for further information:
* Schema Component Reuse - "include", "redefine" or "import"[^]
* Schemas That Use Other Schemas[^]
 
Share this answer
 
Comments
Ch3shireDev 8-Jun-22 4:56am    
This is literally the second link on google after searching "merge XSD". Congrats, you create a recursion.
Graeme_Grant 8-Jun-22 5:04am    
Look at the date of when the question was asked and the date of when I replied... The question was marked as answered by the OP.

Any reason for your comment?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900