Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » XMI 2.0 spec. questions
XMI 2.0 spec. questions [message #43917] Fri, 07 May 2004 13:29 Go to next message
Eclipse UserFriend
Originally posted by: arno.leist.io-software.com

Hi all,

can someone explain the meaning of the <xsd:element ref='xmi:extension'
/> tag to me, which is included in every class content (see rule 4c in
the XMI 2.0 spec.), regardless whether the enclosing complex type is
derived or not?

Another point is, that I think the XMI 2.0 spec is not clear about how
attributes and compositions are inherited. On page 34 point 1.8.7 is
stated, that for attributes and compositions copy-down inheritance is
required. Contrarily is rule 4c on page 57, which states that only local
attributes, references, and compositions are included if the
org.omg.xmi.useSchemaExtensions is set to true.
What do you think about this?


Thanks,
Arno
Re: XMI 2.0 spec. questions [message #43948 is a reply to message #43917] Fri, 07 May 2004 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Arno,

I'm not all that familiar with the details of the spec, but I'll explain
what I understand. The spec allows instances to contain <xmi:extension>
tags pretty much anywhere to act as extensions, so every schema for every
instance has to explicitly declare that these are allowed. Note that a
couple of weeks ago we added support to EMF's XMI resource implementation to
support these.

By using XML Schema's complex type <extension> support, it's possible to
model inheritance more accurately, but it sounds like that's an optional
thing. When it isn't used, you would need to duplicate all the content
model of the base type(s). When multiple inheritance is present,
<extension> can't adequately describe the model because XML Schema doesn't
support multiple inheritance.

In general, I think that XMI schemas do a poor job of describing the syntax.
They are too stylized and there are too many holes where they simply turn
validation off. You can't reconstruct a decent model from the XMI schema
alone...


Arno Leist wrote:

> Hi all,
>
> can someone explain the meaning of the <xsd:element ref='xmi:extension'
> /> tag to me, which is included in every class content (see rule 4c in
> the XMI 2.0 spec.), regardless whether the enclosing complex type is
> derived or not?
>
> Another point is, that I think the XMI 2.0 spec is not clear about how
> attributes and compositions are inherited. On page 34 point 1.8.7 is
> stated, that for attributes and compositions copy-down inheritance is
> required. Contrarily is rule 4c on page 57, which states that only local
> attributes, references, and compositions are included if the
> org.omg.xmi.useSchemaExtensions is set to true.
> What do you think about this?
>
> Thanks,
> Arno
Re: XMI 2.0 spec. questions [message #43979 is a reply to message #43948] Fri, 07 May 2004 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arno.leist.io-software.com

See below...

Thanks,
Arno


Ed Merks wrote:

> Arno,
>
> I'm not all that familiar with the details of the spec, but I'll explain
> what I understand. The spec allows instances to contain <xmi:extension>
> tags pretty much anywhere to act as extensions, so every schema for every
> instance has to explicitly declare that these are allowed. Note that a
> couple of weeks ago we added support to EMF's XMI resource implementation to
> support these.
>
> By using XML Schema's complex type <extension> support, it's possible to
> model inheritance more accurately, but it sounds like that's an optional
> thing. When it isn't used, you would need to duplicate all the content
> model of the base type(s). When multiple inheritance is present,
> <extension> can't adequately describe the model because XML Schema doesn't
> support multiple inheritance.

I know that you have the possibility to decide between using the XSD
extension mechanism and copy-down inheritance, using the
org.omg.xmi.useSchemaExtensions tag. But if I don't misunderstand the
following part from page 34 of the spec, attributes and compositions
have to be inherited by copy-down inheritance, regardless of which way
you choose.


"XML schemas have a mechanism for extending types, but it does not
support extending
from more than one type, and using that mechanism imposes an order on
the content
models of the types that are derived from other types. Since XMI
attempts to minimize
order dependencies, XMI by default does not use schema extension to
represent
inheritance. In its place, XMI specifies that inheritance will be
copy-down inheritance.
For attributes and compositions, copy-down inheritance is required. For
associations
(AssociationEnds with references), the actual class referenced is used,
and subclasses
may be used on the other end of the reference."


And here is the contrary part of page 57:


"If
org.omg.xmi.useSchemaExtensions is false or not present, inherited
Attributes, References, and Compositions
are included; otherwise, only local Attributes, References, and
Compositions are included."

> In general, I think that XMI schemas do a poor job of describing the syntax.
> They are too stylized and there are too many holes where they simply turn
> validation off. You can't reconstruct a decent model from the XMI schema
> alone...

Regarding my current understanding of this issue, I agree with you that
there is no decent way back from such a XSD.

>
> Arno Leist wrote:
>
>
>>Hi all,
>>
>>can someone explain the meaning of the <xsd:element ref='xmi:extension'
>>/> tag to me, which is included in every class content (see rule 4c in
>>the XMI 2.0 spec.), regardless whether the enclosing complex type is
>>derived or not?
>>
>>Another point is, that I think the XMI 2.0 spec is not clear about how
>>attributes and compositions are inherited. On page 34 point 1.8.7 is
>>stated, that for attributes and compositions copy-down inheritance is
>>required. Contrarily is rule 4c on page 57, which states that only local
>>attributes, references, and compositions are included if the
>>org.omg.xmi.useSchemaExtensions is set to true.
>>What do you think about this?
>>
>>Thanks,
>>Arno
>
>
Re: XMI 2.0 spec. questions [message #44010 is a reply to message #43979] Fri, 07 May 2004 15:40 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Arno,

As I said, I'm not really an expert on the XMI schema spec, so it's best to ask
the folks responsible for that spec.


Arno Leist wrote:

> See below...
>
> Thanks,
> Arno
>
> Ed Merks wrote:
>
> > Arno,
> >
> > I'm not all that familiar with the details of the spec, but I'll explain
> > what I understand. The spec allows instances to contain <xmi:extension>
> > tags pretty much anywhere to act as extensions, so every schema for every
> > instance has to explicitly declare that these are allowed. Note that a
> > couple of weeks ago we added support to EMF's XMI resource implementation to
> > support these.
> >
> > By using XML Schema's complex type <extension> support, it's possible to
> > model inheritance more accurately, but it sounds like that's an optional
> > thing. When it isn't used, you would need to duplicate all the content
> > model of the base type(s). When multiple inheritance is present,
> > <extension> can't adequately describe the model because XML Schema doesn't
> > support multiple inheritance.
>
> I know that you have the possibility to decide between using the XSD
> extension mechanism and copy-down inheritance, using the
> org.omg.xmi.useSchemaExtensions tag. But if I don't misunderstand the
> following part from page 34 of the spec, attributes and compositions
> have to be inherited by copy-down inheritance, regardless of which way
> you choose.
>
> "XML schemas have a mechanism for extending types, but it does not
> support extending
> from more than one type, and using that mechanism imposes an order on
> the content
> models of the types that are derived from other types. Since XMI
> attempts to minimize
> order dependencies, XMI by default does not use schema extension to
> represent
> inheritance. In its place, XMI specifies that inheritance will be
> copy-down inheritance.
> For attributes and compositions, copy-down inheritance is required. For
> associations
> (AssociationEnds with references), the actual class referenced is used,
> and subclasses
> may be used on the other end of the reference."
>
> And here is the contrary part of page 57:
>
> "If
> org.omg.xmi.useSchemaExtensions is false or not present, inherited
> Attributes, References, and Compositions
> are included; otherwise, only local Attributes, References, and
> Compositions are included."
>
> > In general, I think that XMI schemas do a poor job of describing the syntax.
> > They are too stylized and there are too many holes where they simply turn
> > validation off. You can't reconstruct a decent model from the XMI schema
> > alone...
>
> Regarding my current understanding of this issue, I agree with you that
> there is no decent way back from such a XSD.
>
> >
> > Arno Leist wrote:
> >
> >
> >>Hi all,
> >>
> >>can someone explain the meaning of the <xsd:element ref='xmi:extension'
> >>/> tag to me, which is included in every class content (see rule 4c in
> >>the XMI 2.0 spec.), regardless whether the enclosing complex type is
> >>derived or not?
> >>
> >>Another point is, that I think the XMI 2.0 spec is not clear about how
> >>attributes and compositions are inherited. On page 34 point 1.8.7 is
> >>stated, that for attributes and compositions copy-down inheritance is
> >>required. Contrarily is rule 4c on page 57, which states that only local
> >>attributes, references, and compositions are included if the
> >>org.omg.xmi.useSchemaExtensions is set to true.
> >>What do you think about this?
> >>
> >>Thanks,
> >>Arno
> >
> >
Re: XMI 2.0 spec. questions [message #586853 is a reply to message #43917] Fri, 07 May 2004 14:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Arno,

I'm not all that familiar with the details of the spec, but I'll explain
what I understand. The spec allows instances to contain <xmi:extension>
tags pretty much anywhere to act as extensions, so every schema for every
instance has to explicitly declare that these are allowed. Note that a
couple of weeks ago we added support to EMF's XMI resource implementation to
support these.

By using XML Schema's complex type <extension> support, it's possible to
model inheritance more accurately, but it sounds like that's an optional
thing. When it isn't used, you would need to duplicate all the content
model of the base type(s). When multiple inheritance is present,
<extension> can't adequately describe the model because XML Schema doesn't
support multiple inheritance.

In general, I think that XMI schemas do a poor job of describing the syntax.
They are too stylized and there are too many holes where they simply turn
validation off. You can't reconstruct a decent model from the XMI schema
alone...


Arno Leist wrote:

> Hi all,
>
> can someone explain the meaning of the <xsd:element ref='xmi:extension'
> /> tag to me, which is included in every class content (see rule 4c in
> the XMI 2.0 spec.), regardless whether the enclosing complex type is
> derived or not?
>
> Another point is, that I think the XMI 2.0 spec is not clear about how
> attributes and compositions are inherited. On page 34 point 1.8.7 is
> stated, that for attributes and compositions copy-down inheritance is
> required. Contrarily is rule 4c on page 57, which states that only local
> attributes, references, and compositions are included if the
> org.omg.xmi.useSchemaExtensions is set to true.
> What do you think about this?
>
> Thanks,
> Arno


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XMI 2.0 spec. questions [message #586866 is a reply to message #43948] Fri, 07 May 2004 15:20 Go to previous message
Eclipse UserFriend
Originally posted by: arno.leist.io-software.com

See below...

Thanks,
Arno


Ed Merks wrote:

> Arno,
>
> I'm not all that familiar with the details of the spec, but I'll explain
> what I understand. The spec allows instances to contain <xmi:extension>
> tags pretty much anywhere to act as extensions, so every schema for every
> instance has to explicitly declare that these are allowed. Note that a
> couple of weeks ago we added support to EMF's XMI resource implementation to
> support these.
>
> By using XML Schema's complex type <extension> support, it's possible to
> model inheritance more accurately, but it sounds like that's an optional
> thing. When it isn't used, you would need to duplicate all the content
> model of the base type(s). When multiple inheritance is present,
> <extension> can't adequately describe the model because XML Schema doesn't
> support multiple inheritance.

I know that you have the possibility to decide between using the XSD
extension mechanism and copy-down inheritance, using the
org.omg.xmi.useSchemaExtensions tag. But if I don't misunderstand the
following part from page 34 of the spec, attributes and compositions
have to be inherited by copy-down inheritance, regardless of which way
you choose.


"XML schemas have a mechanism for extending types, but it does not
support extending
from more than one type, and using that mechanism imposes an order on
the content
models of the types that are derived from other types. Since XMI
attempts to minimize
order dependencies, XMI by default does not use schema extension to
represent
inheritance. In its place, XMI specifies that inheritance will be
copy-down inheritance.
For attributes and compositions, copy-down inheritance is required. For
associations
(AssociationEnds with references), the actual class referenced is used,
and subclasses
may be used on the other end of the reference."


And here is the contrary part of page 57:


"If
org.omg.xmi.useSchemaExtensions is false or not present, inherited
Attributes, References, and Compositions
are included; otherwise, only local Attributes, References, and
Compositions are included."

> In general, I think that XMI schemas do a poor job of describing the syntax.
> They are too stylized and there are too many holes where they simply turn
> validation off. You can't reconstruct a decent model from the XMI schema
> alone...

Regarding my current understanding of this issue, I agree with you that
there is no decent way back from such a XSD.

>
> Arno Leist wrote:
>
>
>>Hi all,
>>
>>can someone explain the meaning of the <xsd:element ref='xmi:extension'
>>/> tag to me, which is included in every class content (see rule 4c in
>>the XMI 2.0 spec.), regardless whether the enclosing complex type is
>>derived or not?
>>
>>Another point is, that I think the XMI 2.0 spec is not clear about how
>>attributes and compositions are inherited. On page 34 point 1.8.7 is
>>stated, that for attributes and compositions copy-down inheritance is
>>required. Contrarily is rule 4c on page 57, which states that only local
>>attributes, references, and compositions are included if the
>>org.omg.xmi.useSchemaExtensions is set to true.
>>What do you think about this?
>>
>>Thanks,
>>Arno
>
>
Re: XMI 2.0 spec. questions [message #586879 is a reply to message #43979] Fri, 07 May 2004 15:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Arno,

As I said, I'm not really an expert on the XMI schema spec, so it's best to ask
the folks responsible for that spec.


Arno Leist wrote:

> See below...
>
> Thanks,
> Arno
>
> Ed Merks wrote:
>
> > Arno,
> >
> > I'm not all that familiar with the details of the spec, but I'll explain
> > what I understand. The spec allows instances to contain <xmi:extension>
> > tags pretty much anywhere to act as extensions, so every schema for every
> > instance has to explicitly declare that these are allowed. Note that a
> > couple of weeks ago we added support to EMF's XMI resource implementation to
> > support these.
> >
> > By using XML Schema's complex type <extension> support, it's possible to
> > model inheritance more accurately, but it sounds like that's an optional
> > thing. When it isn't used, you would need to duplicate all the content
> > model of the base type(s). When multiple inheritance is present,
> > <extension> can't adequately describe the model because XML Schema doesn't
> > support multiple inheritance.
>
> I know that you have the possibility to decide between using the XSD
> extension mechanism and copy-down inheritance, using the
> org.omg.xmi.useSchemaExtensions tag. But if I don't misunderstand the
> following part from page 34 of the spec, attributes and compositions
> have to be inherited by copy-down inheritance, regardless of which way
> you choose.
>
> "XML schemas have a mechanism for extending types, but it does not
> support extending
> from more than one type, and using that mechanism imposes an order on
> the content
> models of the types that are derived from other types. Since XMI
> attempts to minimize
> order dependencies, XMI by default does not use schema extension to
> represent
> inheritance. In its place, XMI specifies that inheritance will be
> copy-down inheritance.
> For attributes and compositions, copy-down inheritance is required. For
> associations
> (AssociationEnds with references), the actual class referenced is used,
> and subclasses
> may be used on the other end of the reference."
>
> And here is the contrary part of page 57:
>
> "If
> org.omg.xmi.useSchemaExtensions is false or not present, inherited
> Attributes, References, and Compositions
> are included; otherwise, only local Attributes, References, and
> Compositions are included."
>
> > In general, I think that XMI schemas do a poor job of describing the syntax.
> > They are too stylized and there are too many holes where they simply turn
> > validation off. You can't reconstruct a decent model from the XMI schema
> > alone...
>
> Regarding my current understanding of this issue, I agree with you that
> there is no decent way back from such a XSD.
>
> >
> > Arno Leist wrote:
> >
> >
> >>Hi all,
> >>
> >>can someone explain the meaning of the <xsd:element ref='xmi:extension'
> >>/> tag to me, which is included in every class content (see rule 4c in
> >>the XMI 2.0 spec.), regardless whether the enclosing complex type is
> >>derived or not?
> >>
> >>Another point is, that I think the XMI 2.0 spec is not clear about how
> >>attributes and compositions are inherited. On page 34 point 1.8.7 is
> >>stated, that for attributes and compositions copy-down inheritance is
> >>required. Contrarily is rule 4c on page 57, which states that only local
> >>attributes, references, and compositions are included if the
> >>org.omg.xmi.useSchemaExtensions is set to true.
> >>What do you think about this?
> >>
> >>Thanks,
> >>Arno
> >
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XMI 2.0 spec. questions
Next Topic:XSDAnnotation notifications
Goto Forum:
  


Current Time: Fri Apr 19 04:13:53 GMT 2024

Powered by FUDForum. Page generated in 0.02159 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top