Xsd

From Informatics

Jump to: navigation, search

Contents

General

xsd is in XML format. Basicly, xsd contains data type information in your UML model you created in EA.

Create/Generate

We create xsd file using EA, then manually modify it in text editor or xmlspy so it can be used by introduce.

  1. create a UML model in EA.
  2. export XML schema to xsd format

then

We modify the header (as described in CaGrid_Datatypes) to something like:

 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" 
 xmlns:mobius="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" 
 targetNamespace="gme://cagrid.geworkbench.columbia.edu/1/edu.columbia.geworkbench.cagrid.foo" 
 elementFormDefault="qualified" attributeFormDefault="unqualified">

and change the "String" type to "xs:string" manually. (detail see CaGrid_Datatypes)

Limitation

  • EA won't generate xsd for methods, it only generate xsd for class data types.
  • It won't let you export two models at once, which means you'll need to export models separatly and combine the xsd file manually. (It's just an XML file, you can do it easily)

Check

  • Check your comments are in xsd. If you put your comments in notes field in EA, it should be exported. Thus, the java code generated by introduce using this xsd file will have these comments.
Personal tools