Author Topic: XSD Schema Generator - Thoughts  (Read 1252 times)

jwall

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
XSD Schema Generator - Thoughts
« on: May 05, 2003, 12:49:07 pm »
I have been testing the XML schema generator and have been pleased with the results so far.   There is one interesting piece that could really improve the generator and it revolves around leveraging Attribute Groups in One to Many relationships.  An example is below (borrowed from VBXML.COM)

<attributeGroup name="bookInfo">
   <attribute name="href" type="URI"/>
   <attribute name="price" type="float" pattern="\d*(.\d{2})+"/>
   <attribute name="isbn" type="string" pattern="\d{10}"/>
</attributeGroup>

<complexType name="book">
   <attributeGroup ref="bookInfo"/>
</complexType>


The advantage of an attribute group is space.   I have been working with some very large XML documents that were serialized out into a Database, then I pulled the model into EA.  I then used the Schema Generator to see how close it was to the original XML document.   The XSD was an isomporphic equivalent, but the documents would be much larger as the size of the XML document grew (repeating elements), this is due to the attributes being repeated everytime vs a reference.  

Since the relationship of the tables is maintained in EA, it should be possible to take advantage of Attribute Groups in future releases of the Schema Generator.

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 199
  • Karma: +0/-0
    • View Profile
Re: XSD Schema Generator - Thoughts
« Reply #1 on: May 07, 2003, 03:17:56 pm »
Hi jwall,

Thanks for the thoughts.  It is intended that the generator will support an XSDattributeGroup stereotype(among others) in a future release.

Thanks again.

Ben.