Book a Demo

Author Topic: Package includes in XML UML Modelling ...  (Read 3192 times)

bennido

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Package includes in XML UML Modelling ...
« on: October 03, 2006, 07:09:59 pm »
Hi all,

I've been trying out UML modelling for XML schema and hitting a basic (?) problem.

I've created a simple class diagram and included (by drag drop as a Simple link) an XSD element from another package onto the class diagram.

According to EA help file, this should cause code generation to automatically produce an "xsd:include" statement for the linked package in the schema.

But it doesn't and as a result the XML schema is not valid the XSD element being referenced is not defined.

Is there a setting in EA that I missed or am I missing the point completely ?

Can someone please help ? Thanks !

VK

  • EA Administrator
  • EA User
  • *****
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Package includes in XML UML Modelling ...
« Reply #1 on: October 05, 2006, 07:20:24 pm »
When you drag and drop an element from the Project Browser onto the current diagram using the option "as Simple Link", the element will appear in the current diagram as a simple reference back to the original source element. Changes to this element in the diagram will affect all other links to this element (refer to the EA Help file under the topic : Modeling with UML -> Common Diagram Tasks -> Pasting from the Project Browser).

For XSD Generation, just pasting an element as a Simple Link does not guarantee its inclusion in the generated schema. Consider the following diagram with a sample package structure and the package tagged-values.



Generate the Schema from the package "PA" and you will see that the generated XSD will have an "include" element.

bennido

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Package includes in XML UML Modelling ...
« Reply #2 on: October 10, 2006, 05:33:13 pm »
Ah ok, I see where I went wrong now.

I had the targetNamespace defined correctly but I was missing the extra tagged value for "schemaLocation" for the package to be included.

Thanks for the help !