Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XSD-XSD Mapping

Tags:

xsd

I have two XSD files (source and target)... on what basis should I map these two files to get an XSLT? I know how MapForce helps in mapping but I worked with the sample project ..Now I wanted to know on what basis should I map these file that my client sent me..

like image 380
Swapna Avatar asked Apr 25 '26 06:04

Swapna


1 Answers

I don't think there could be any general way to generate an XSLT given two XSD (if this is what your are after). The XSDs describe the structure of the XML files, but they don't say anything about what is the data they contain (their semantics if you will).

E.g.

<Customer>
   <Name>ACME</Name>
   <Address>9 Main Street, Anytown, USA</Address>
</Customer>

and

<Customer Name="ACME" City="Anytown" Country="USA" Address="9 Main Street"/>

are two XML describing more or less the same thing - but there is no way to know reading their XSD that the <Address> element in one correspond to three different attributes Address, City and Country in the other.

I am afraid you have to create the XSLT manually - and my suggestion would be to start from sample XML files, not the XSDs - much easier.

like image 54
MiMo Avatar answered May 05 '26 09:05

MiMo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!