[great-users] XML-generating translators
Sandeep Neema
sandeep.neema at vanderbilt.edu
Mon Jul 24 09:47:26 CDT 2006
Sumant,
You may have to check with Endre (or Zsolt Kalmar) for the exact
details, however to the extent I recall in order to get an XML with
<fwdBW> 100 </fwdBW>, you have to declare a class fwdBW, and include an
attribute (lets call it val) flagged with the text keyword. Then UDM
will spit out the XML you are looking for. The caveat offcourse is that
you can have atmost one text attribute for each class.
Alternately, Feng's solution works in that you can generate an XML like
<fwdBW val="100"/> and then XSLT it to what you are looking for.
HTH,
Sandeep
--
Sandeep Neema
Research Scientist,
Institute of Software Integrated Systems, Vanderbilt University
Phone: 615-343-9996
Email: sandeep.k.neema at vanderbilt.edu
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu
[mailto:great-users-
> bounces at list.isis.vanderbilt.edu] On Behalf Of Sumant Tambe
> Sent: Friday, July 21, 2006 6:24 PM
> To: great-users
> Subject: Re: [great-users] XML-generating translators
>
> Hi Sandeep,
>
> If I understand you right, then you are talking about a "text" type
> attribute of a class. An example of such a text attribute would be
> "address : text". But that is not what I am looking for. I want to
> generate an XML file in which the elements carry the contents.
Something
> like given below:
>
> <connectionName> UniqueName1 </connectionName>
> <fwdBW> 100 </fwdBW>
> <revBW> 100 </revBW>
> <qos> HIGH_PRIORITY </qos>
>
> I am still interested in knowing if that can be done although Feng has
> replied saying it is not supported.
>
> Thanks,
>
> Sumant.
>
> Sandeep Neema wrote:
> > Hi Sumant,
> > I believe that the current UDM does have support for text
attributes.
> > All you have to do is add a keyword 'text' to the definition of the
> > attribute in the UML class diagram.
> >
> > HTH,
> > Sandeep
> >
> > --
> > Sandeep Neema
> > Research Scientist,
> > Institute of Software Integrated Systems, Vanderbilt University
> > Phone: 615-343-9996
> > Email: sandeep.k.neema at vanderbilt.edu
> >
> >
> >>-----Original Message-----
> >>From: great-users-bounces at list.isis.vanderbilt.edu
> >
> > [mailto:great-users-
> >
> >>bounces at list.isis.vanderbilt.edu] On Behalf Of Feng Shi
> >>Sent: Wednesday, July 05, 2006 12:00 PM
> >>To: great-users
> >>Subject: RE: [great-users] XML-generating translators
> >>
> >>Hi Sumant,
> >>
> >>The GReAT/Udm cannot generate the XML file in which the elements
carry
> >>the contents. You can use attribute instead, like:
> >><connectionQoS>
> >> <connectionName name="UniqueName1"/>
> >> <fwdBW value="100"/>
> >> <qos category="HIGH_PRIORITY"/>
> >> <revBW value="100"/>
> >></connectionQoS>
> >>
> >>In your UML diagram, these attributes should be defined. To obtain
the
> >>desired XML format, you can apply XSLT or other transformation tools
> >
> > on
> >
> >>the XML file generated by GReAT/Udm.
> >>
> >>Hope this helps,
> >>
> >>Thanks,
> >>Feng
> >>
> >>-----Original Message-----
> >>From: great-users-bounces at list.isis.vanderbilt.edu
> >>[mailto:great-users-bounces at list.isis.vanderbilt.edu] On Behalf Of
> >>Sumant Tambe
> >>Sent: Wednesday, July 05, 2006 11:47 AM
> >>To: great-users
> >>Subject: [great-users] XML-generating translators
> >>
> >>Hi folks,
> >>
> >>Can you please point me at a (or a few) non-toy example of
> >>XML-generating translator written in GReAT? I mean, a more
> >
> > sophisticated
> >
> >>example than MatchAnyAssoc sample that comes with GReAT or any other
> >>xml-generating translator.
> >>
> >>Specifically, I am interested in generating a file which looks like
> >>this:
> >><connectionQoS>
> >> <connectionName> UniqueName1 </connectionName>
> >> <fwdBW> 100 </fwdBW>
> >> <revBW> 100 </revBW>
> >> <qos> HIGH_PRIORITY </qos>
> >> </connectionQoS>
> >>
> >>But I am not able to "put" values such as 100, HIGH_PRIORITY between
> >>opening and closing tags. But I am able to generate an xml which
looks
> >>like this:
> >> <connectionQoS>
> >> <connectionName/>
> >> <fwdBW/>
> >> <qos/>
> >> <revBW/>
> >> </connectionQoS>
> >>
> >>For this, I just showed a composition relationship in the UML
diagram
> >>between connectionQoS and the other contained elements in the UML
> >
> > model.
> >
> >>The values (100, ...) are there in the source model (ofcourse).
> >>
> >>thanks,
> >>
> >>Sumant.
> >>_______________________________________________
> >>great-users mailing list
> >>great-users at list.isis.vanderbilt.edu
> >>http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
> >>_______________________________________________
> >>great-users mailing list
> >>great-users at list.isis.vanderbilt.edu
> >>http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
> >
> > _______________________________________________
> > great-users mailing list
> > great-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
More information about the great-users
mailing list