Book a Demo

Author Topic: Set package file name in transformation templates  (Read 4436 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Set package file name in transformation templates
« on: July 23, 2010, 07:57:16 pm »
This one is a bit odd- does anyone know which is the correct keyword for setting the file name of a package in a transformation template?

The XSD code engeneering seems to rely on the package file name but actually I fail to set it correctly as it always returns with an error.
It works ok for classes so I suspect it is labelled differently.

Should look like this:

Code: [Select]
Package
{
  %TRANSFORM_CURRENT("stereotype")%
  stereotype="XSDSchema"
  namespaceroot="true"
  [b]filename="weghweh.xsd"[/b]

%list="Class" @separator="\n" @indent="  "%
}

Thanks in advance,

Oliver

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Set package file name in transformation templa
« Reply #1 on: July 26, 2010, 06:25:37 pm »
Either that is too easy to be answered or it is too complicated.
Hello, earth to Sparx and community, any ideas?

Any time I use the filename statement on package level it spits out an error though it works for classes. There must be a way to set it, this package property exists...

Oliver

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Set package file name in transformation templa
« Reply #2 on: July 27, 2010, 09:05:44 am »
Hi Oliver,
While I'm not 100% certain, I don't think it's possible to set the filename property for Package objects via transformation at this time.  Packages do not expose all the same properties as Classes in the transformation templates.  See:
http://www.sparxsystems.com/uml_tool_guide/mda_transformations/transformingobjects.htm

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Set package file name in transformation templa
« Reply #3 on: July 29, 2010, 10:39:20 pm »
Quote
Hi Oliver,
While I'm not 100% certain, I don't think it's possible to set the filename property for Package objects via transformation at this time.  Packages do not expose all the same properties as Classes in the transformation templates.  See:
http://www.sparxsystems.com/uml_tool_guide/mda_transformations/transformingobjects.htm

Hello Aaron, thanks for the answer.
This would be a bit unfortunate as the filename property for packages is existing, it can be set manually.
For XSD transformation it is required to be set automatically so that the correct file is generated. Actually I have to set it manually after the transformation and before creating the file.

Oliver