|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: UML 2.4 schema [message #1386633 is a reply to message #1386584] |
Wed, 18 June 2014 21:21 |
Marc-Florian Wendland Messages: 83 Registered: January 2013 |
Member |
|
|
Hi Ed,
I was just surprised when I started to learn more about XMI that nobody
thinks XSD for a specific XMI makes sense. So what are the XML schema
production rules for in the XMI standard. Aren't they explicetly
incorporated for being able to expresss an XSD. If there is no use for a
XSD, the spec could remove the production rules completely, couldn' it?
But at least the MOF and non-MOF-based world is not a theoretic construct
but reality. Specs like ReqIF and TestIF have been deliberately abandoned
XMI as serialization format, since in the enviroments that work with those
languages are usually non-MOF-based environments.
Regards,
Marc-Florian
"Ed Willink" wrote in message news:lnru8p$ab$2@xxxxxxxxe.org...
Hi
It seems to me that you will always be able to isolate your self from
good tools.
What you had to live in a non-XSD or non-XMI or non-XML or non-ASCII world?
If you want total independence then you must re-invent the wheel.
Regards
Ed Willink
On 18/06/2014 12:14, Marc-Florian Wendland wrote:
> Hi Ed,
>
> the only thing I am worried about in your statement is
>
> "or Ecore"
>
> What happens if you want to check your XMI in a non-Eclipse (or non-MOF)
> world? What will be then alerady there?
>
> To my understanding this is the situation (and it is requested sometimes)
> where an XSD might help, right?
>
> Regards,
> Marc-Florian
>
>
>
> "Ed Willink" wrote in message news:ln69pk$e7s$1@xxxxxxxxe.org...
>
> Hi
>
> Not clear at all.
>
> Even less clear why you want XSD. In 10 years working with Eclipse I
> think I've only ever used XSD for dubious compatibility requirements.
>
> Use real models; UML or Ecore. They're already there and have all the
> information you need.
>
> Regards
>
> Ed Willink
>
>
> On 09/06/2014 21:11, Ayman Yassin Mohamed wrote:
>> ok sorry for that i will try to clarify and provide more details our case
>> is:
>> transforming Coloured Petri Net (CPN) to UML 2 diagrams(activity and use
>> cases)
>>
>> we have the CPN xml schema and trying to get UML 2 activity
>> diagram/Usecases schema or DTD to perform the required mapping but
>> according to OMG there is no XSD for UML 2 published as stated on the
>> website!!
>> another issue: the UML diagrams like activity is represented into XMI
>> format when trying to get the published XMI schema 2.4 from OMG it's not
>> expressive we can't find the activity diagrams elements like nodes and so
>> on for mapping
>>
>> i hope it's clear now and sorry again for any ambiguity
>
|
|
|
Re: UML 2.4 schema [message #1386652 is a reply to message #1386633] |
Thu, 19 June 2014 07:36 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Marc-Florian,
Comments below.
On 18/06/2014 11:21 PM, Marc-Florian Wendland wrote:
> Hi Ed,
>
> I was just surprised when I started to learn more about XMI that
> nobody thinks XSD for a specific XMI makes sense. So what are the XML
> schema production rules for in the XMI standard.
To give a nice cozy, yet delusional, feeling that your XMI isn't just
parsed as xsd:anyType.
> Aren't they explicetly incorporated for being able to expresss an XSD.
Indeed, it's a question of what does a validating parser really
accomplish using that schema. Primarily the result is to parse pretty
much everything as xsd:anyType, so I claim it's the most complex way of
turning off validation that I've ever seen.
> If there is no use for a XSD, the spec could remove the production
> rules completely, couldn' it?
That's a discussion to have with those spec authors. Having
implemented the XML Schema specification and having implemented the
mapping from Ecore to an "XMI Schema" I do have a little bit of
experience with these things, so I've told you my experienced opinion...
>
> But at least the MOF and non-MOF-based world is not a theoretic
> construct but reality.
So take my word for it that an XMI Schema is not useful, it's a
synthetic construct of effectively zero value. So in reality, don't
expect any reasonable amount of validation for an XMI serialization
unless you write an XMI deserializer, and for that you need the MOF
model, not an XML Schema.
> Specs like ReqIF and TestIF have been deliberately abandoned XMI as
> serialization format, since in the enviroments that work with those
> languages are usually non-MOF-based environments.
So that's further evidence to argue that if it's important to process
the XML directly with other tools that have no understanding of MOF,
you'll need to think carefully about defining that serialization format
with a properly designed XML Schema rather than expect an XMI Schema to
do that job.
If you avoid multiple inheritance and avoid using XMIResourceImpl in
favor of XMLResourceImpl, the XML Schema exported for your Ecore model
likely will serve your purpose much better.
>
> Regards,
> Marc-Florian
>
>
>
>
> "Ed Willink" wrote in message news:lnru8p$ab$2@xxxxxxxxe.org...
>
> Hi
>
> It seems to me that you will always be able to isolate your self from
> good tools.
>
> What you had to live in a non-XSD or non-XMI or non-XML or non-ASCII
> world?
>
> If you want total independence then you must re-invent the wheel.
>
> Regards
>
> Ed Willink
>
> On 18/06/2014 12:14, Marc-Florian Wendland wrote:
>> Hi Ed,
>>
>> the only thing I am worried about in your statement is
>>
>> "or Ecore"
>>
>> What happens if you want to check your XMI in a non-Eclipse (or
>> non-MOF) world? What will be then alerady there?
>>
>> To my understanding this is the situation (and it is requested
>> sometimes) where an XSD might help, right?
>>
>> Regards,
>> Marc-Florian
>>
>>
>>
>> "Ed Willink" wrote in message news:ln69pk$e7s$1@xxxxxxxxe.org...
>>
>> Hi
>>
>> Not clear at all.
>>
>> Even less clear why you want XSD. In 10 years working with Eclipse I
>> think I've only ever used XSD for dubious compatibility requirements.
>>
>> Use real models; UML or Ecore. They're already there and have all the
>> information you need.
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 09/06/2014 21:11, Ayman Yassin Mohamed wrote:
>>> ok sorry for that i will try to clarify and provide more details our
>>> case is:
>>> transforming Coloured Petri Net (CPN) to UML 2 diagrams(activity and
>>> use cases)
>>>
>>> we have the CPN xml schema and trying to get UML 2 activity
>>> diagram/Usecases schema or DTD to perform the required mapping but
>>> according to OMG there is no XSD for UML 2 published as stated on
>>> the website!!
>>> another issue: the UML diagrams like activity is represented into
>>> XMI format when trying to get the published XMI schema 2.4 from OMG
>>> it's not expressive we can't find the activity diagrams elements
>>> like nodes and so on for mapping
>>>
>>> i hope it's clear now and sorry again for any ambiguity
>>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: UML 2.4 schema [message #1387174 is a reply to message #1387081] |
Tue, 24 June 2014 15:35 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Ayman,
Comments below.
On 24/06/2014 3:35 AM, Ayman Yassin Mohamed wrote:
> Hello All,
> when translating XML documents
What kind of documents?
> into UML diagrams one can choose to execute the actual transformation
> in either the XML or the MDA technical space.
In what tool?
> i think if we will use the MDA technical space there are many known
> approaches and depends on your problem then u will need MOF and ECORE.
> if u will go to XML technical space (no MOF) i think we will need XSD
For what do you need an XML Schema? Only the original XML?
I'll assert yet again that an XSD for UML's XMI serialization can't
possibly be useful. For example, consider
http://git.eclipse.org/c/uml2/org.eclipse.uml2.git/tree/plugins/org.eclipse.uml2.uml/model/UML.uml.
You can see it uses xmi:type extensively, but as far as the XML Schema
for this attribute, it's just data, i.e., validated that it's a well
formed QName. It's not even xsi:type that an XML Schema processor would
recognize as a directive to process the content of the element according
to the complex type specified by that QName.
Now consider one example of the use of an xmi:type:
| <packagedElement xmi:type="uml:Association" xmi:id="_epbu4EzPEeO2z-YY6ENIIA" name="A_clientDependency_client" memberEnd="_lGLv4EzPEeO2z-YY6ENIIA _sD4acEzSEeO2z-YY6ENIIA">
<ownedEnd xmi:id="_lGLv4EzPEeO2z-YY6ENIIA" visibility="private" type="_rEDGkGwKEdq7X4sGURiZYA" association="_epbu4EzPEeO2z-YY6ENIIA">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_BHS38EzVEeO2z-YY6ENIIA"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_rQyQ8EzPEeO2z-YY6ENIIA" value="*"/>
</ownedEnd>
</packagedElement>
|
Here we have a packagedElement and the xmi:type tells us (an XMI
processor) that it's an Association. That's what we need to know to
know that attributes like "memberEnd" and elements like "ownedElement"
are valid and meaningful in this context. Unfortunately, none of this
can be meaningfully expressed as an XML Schema so none of this can be
known and validated by a standard conforming XML processor. Only a
standard XMI processor can validate this type of XML, and it must have
knowledge of the model, i.e., UML.ecore or its EMOF analog.
So not only do I think you don't need an XML Schema, I think if you
actually had one you'd find it completely useless with respect to
processing XMI serializations.
> Regards
> Ayman
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: UML 2.4 schema [message #1387421 is a reply to message #1387348] |
Wed, 25 June 2014 04:11 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Ayman,
Comments below.
On 25/06/2014 3:19 AM, Ayman Yassin Mohamed wrote:
> Ed Merks,
>
> for sure you are right but actually not all cases are the same for
> example:
> if your source model is represented in XML+XSD not XMI
Yes of course if there is an XSD you could work with it. EMF also
provides a mapping from XSD -> Ecore which can be used to read such XML...
> and you don't have it's metamodel
XSD is a metamodel so if you have the XSD, you implicitly have an Ecore
model...
> on the other hand the target model is UML 2 diagrams without XML or
> XSD but with XMI and MOF.
> so i think one of the solutions to bridge the gab between two
> technical spaces is to have UML 2 models(Activity...)represented in
> XML and with XSD
Given that UML support multiple inheritance and XML Schema does not,
that seems technically infeasible. Furthermore, given XSD's very poor
support for cross references (untyped xsd:IDREF and xsd:anyURI which is
semantically no different from xsd:string), processing cross references
in a meaningful way also seems technically infeasible. Therefore, given
that XSD maps to Ecore, it seems technically superior to do mapping by
assuming you always have a model, rather than trying to come up with a
different serialization for UML for which there is a schema so you can
do processing at such a dumbed-down level.
> so we can perform the mapping and required validation
> Regards
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|