1

I'm looking for a tool that can parse an XSD file and convert from one layout to another.

I have two XSD files that I would like to merge, but they have a lot of elements with same names but different meaning, data type, or properties. So using a tool to automate the merging results in an invalid XSD, because the tool is unable to resolve the duplicates. (I'm currently using Liquid XML Studio).

Sample file 1:

  <xsd:element name="Title" type="xsd:string"/>
  <xsd:element name="Author" type="xsd:string"/>
  <xsd:element name="CatalogueID" type="xsd:string"/>
  <xsd:element name="Book">
    <xsd:complexType> 
      <xsd:sequence> 
        <xsd:element ref="Title"/> 
        <xsd:element ref="Author"/>
        <xsd:element ref="CatalogueID"/>
      </xsd:sequence> 
    </xsd:complexType>
  </xsd:element>

Sample file 2:

  <xsd:element name="Publisher" type="xsd:string" minOccurs="0"/>
  <xsd:element name="CatalogueID" type="xsd:integer"/>
  <xsd:element name="WebArticle">
    <xsd:complexType> 
      <xsd:sequence> 
        <xsd:element name="Title" type="xsd:string"/>
        <xsd:element ref="Publisher"/>
        <xsd:element ref="CatalogueID"/>
      </xsd:sequence> 
    </xsd:complexType>
  </xsd:element>

I believe this happens because the XSD files follow the Salami Slice design, so their individual elements are declared at the top level.

So one workaround I could think of is first re-format the files from Salami Slice to Russian Doll, to limit the scope of the similarly-named elements.

Is there a tool that could help me do this in a fully or semi automated manner?

(I will gladly accept answers even weeks, months or years from now. Thank you.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.