Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Schema refactoring tools

From: Dennis Sosnoski <dms@--------.--->
To: Michael Kay <mike@--------.--->
Date: 7/13/2007 12:28:00 PM
I was looking at refactoring from the standpoint of the data represented 
rather than the XML documents, but it's true that changing an attribute 
to a child element is probably not the best example. Still a useful 
feature for a tool, though.

A better example would be to convert local to global types and elements, 
with automatic substitution of the new global type wherever appropriate. 
Better still if the tool allowed me to do things such as select the 
first three child elements from an existing complexType/sequence to be 
made into a new type definition, converting the existing type to an 
extension of the new type. So:

  <complexType name="old">
    <sequence>
      <element name="a" type="string"/>
      <element name="b" type="string"/>
      <element name="c" type="string"/>
      <element name="d" type="string"/>
    </sequence>
  </complexType>

to:

  <complexType name="new">
    <sequence>
      <element name="a" type="string"/>
      <element name="b" type="string"/>
      <element name="c" type="string"/>
    </sequence>
  </complexType>

  <complexType name="old">
    <complexContent>
      <extension base="tns:new">
        <sequence>
          <element name="d" type="string"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  - Dennis

Michael Kay wrote:
>> Does anyone know of tools with support for schema 
>> refactoring? By that I mean structural changes, not just 
>> renaming things. The tools I've tried can't even handle 
>> something as basic as changing an attribute to a child 
>> element in a complexType definition.
>>     
>
> Surely "refactoring" usually means finding a different way to say the same
> thing, that is, changing the way in which the schema is written without
> changing the language it describes? You seem to be looking for something
> rather different...
>
> But no, I'm not aware of tools in either area.
>
> Michael Kay
> http://www.saxonica.com/
>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent