[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Schema refactoring tools

  • From: Dennis Sosnoski <dms@s...>
  • To: Michael Kay <mike@s...>
  • Date: Sat, 14 Jul 2007 00:27:41 +1200

Re:  Schema refactoring tools
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/
>   


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.