Hi Francois,

See below:

----- Original Message ----- 
From: "Fran�ois Eric" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 2:09 PM
Subject: [Andromda-user] Model level stereotypes


Hello,

I am currently working with andromda 2.1.2 and am trying to generate a
simple xsd file based on the model.  Therefore, I have a stereotype on
my model (Model).  here is what my template looks like (just a draft):
==========================
#set ($model = $class)
#set ($packages = $model.packages)
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
          targetNamespace="http://www.elapsetech.com";
          xmlns="http://www.elapsetech.com";
          elementFormDefault="qualified">
<xs:element name="${model.name}">
#foreach($ref in $packages)
TEST: package $ref.name
#end
</xs:element>
</xs:schema>
=========================

The output of the xsd does not have any packages ("TEST" lines) even
though my model has many of them.   The ${model.name} returns the
correct name but the $packages does not seem to return anything.

--  I'm not too sure about 2.x since I didn't use it and I'm now working on
3.x, but for debugging purposes, you could print out the name of your
    model class to see what class your model is an instance of, that would
give you a clue as to why packages may not be returning anything (i.e.
${model.getClass()})...in other words getPackages() may
    not exist on the class you're accessing?

Does anyone know what I am doing wrong?  Is it simply not possible to
generate a document from a model level stereotype.  I know someone had
the same problem on the attribute level stereotypes.  Can we only
generate from the class level?

--- No, it is possible, you can generate from any model element to which you
give a stereotype (in 3.x we have better support for adding groups of
stereotyped model elements to one generated file).

Any help would be greatly appreciated,

Thanks,

Fran�ois




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to