Book a Demo

Author Topic: Generate Reference attribute from model  (Read 2250 times)

axp28

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Generate Reference attribute from model
« on: January 26, 2013, 05:16:28 am »
I am trying to create UML to model classes that refers to each other e.g. Author and Book. I need to generate xsd from this model.

I have tried setting containment to reference  in connectivity properties between Author and Book. However, the xsd it generates still shows only one way direction. Below is the sample xsd it generated

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="Author" type="Author"/>
      <xs:complexType name="Author">
            <xs:sequence>
                  <xs:element name="Book" type="Book" minOccurs="1" maxOccurs="unbounded"/>
            </xs:sequence>
      </xs:complexType>
      <xs:element name="Book" type="Book"/>
      <xs:complexType name="Book">
            <xs:sequence/>
      </xs:complexType>
</xs:schema>

As you can see, book does not provide reference to Author. Also it does not generate ref attribute either.

What do I do in the UML to fix this?

Thanks,
« Last Edit: January 29, 2013, 04:50:40 am by ashish.pandit »