OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-cmsc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: [ubl-cmsc] FW: [Fwd: Re: questions about XSD and RELAX NG]


Title: RE: [ubl-cmsc] FW: [Fwd: Re: questions about XSD and RELAX NG]

Matt:

It's pretty clear that James Clark doesn't understand what having type relationships expressed in the schema language buys you. I personally don't care much about multiple inheritance, since it is used so very little in java (such as it is), but I think we're in agreement about the need for it.

Again, my enthusiasm for RELAXNG is somewhat dimmed by reading this.

Cheers,

Arofan

-----Original Message-----
From: Matthew Gertner [mailto:matthew.gertner@schemantix.com]
Sent: Monday, December 17, 2001 5:32 AM
To: 'ubl-cmsc@lists.oasis-open.org'
Subject: [ubl-cmsc] FW: [Fwd: Re: questions about XSD and RELAX NG]


Here is the mail about RELAX NG that I mentioned. The comments by James
Clark at the end are also very interesting (although I disagree with them).

Matt

-----Original Message-----
> a) There appear to be no tools that support XSD restrictions except Henry
Thompson's
> xsv, and even this one does it in what I believe was characterized as a
hack and
> in a non-complete way. Why is this? Is there an inherent problem with XSD
restrictions?
> Are restrictions defined in a way that makes them extremely hard to
implement? Or
> is it rather that vendors don't see a market demand for them?

Your understanding about XSV is correct. Xerces claims that they
implemented it completely, and I tend to believe it, but there is no
test suite to check that.

I think this is mainly because restrictions are defined in a way that
implementing them correctly and completely needs a lot of efforts, if not
hard. And vendors tends to skip implementing this check, because usually
users won't notice even if a tool doesn't support it.

Also, it's very likely that they change this restriction in the 1.1 or
2.0 of XML Schema. So vendors probably won't implement it until the
restriction is simplified.

> b) Is there any way to do type derivation in RELAX NG?
>    -If not, would type derivation introduce complexities into RELAX NG
that would stop
>     it from being a clean, simple, coherent schema language?
>    -If the answer to the previous bullet is "no, it would not introduce
unwanted
>     complexities into RELAX NG", why isn't it there? And would it be
possible to
>     do it?

I think the rationale of not having type derivation in RELAX NG is that
it can be layered on top of RELAX NG. In fact, there are some attempt
for this like http://www.asahi-net.or.jp/~eb2m-mrt/oo.html

The following text, written by James Clark, may answer this question
better.

> One of the most significant differences between RELAX NG and W3C XML
> Schema is that RELAX NG does not have any concept of inheritance. The
> support for inheritance in W3C XML Schema is probably the major
> contributor to the considerable complexity of W3C XML Schema Part 1. Yet,
> the inheritance mechanisms in W3C XML Schema do not allow W3C XML Schema
> to express any constraints that cannot be expressed in RELAX NG.
> Although W3C XML Schema has a very complex type system with two type
> hierarchies, one for elements (called substitution groups) and one for
> complex types, it supports only single inheritance. However, modern
> object-oriented languages, such as Java and C#, support multiple
> inheritance (at least for interfaces). Thus, in general the inheritance
> structure of a class hierarchy cannot be represented in a schema.
> Inheritance has proven to be very useful in modeling languages such as
> UML. However, I would argue that trying to make an XML schema language
> also be a modeling language is not a good idea. An XML schema language
> has to be concerned with syntactic details, such as whether to use
> elements or attributes, which are irrelevant to the conceptual model.
> Instead, I believe it is better to use a standard modeling language such
> as UML, which provides full multiple inheritance, to do conceptual
> modeling, and then generate schemas and class definitions from the model
> [5]. If a schema language is used in this way, then there is no need for
> it to support inheritance; the role of the schema language is purely to
> describe the XML syntax used to represent the conceptual model. RELAX NG
> has the advantage in this role that it provides more flexibility in the
> choice of syntax. For example, in W3C XML Schema the xsi:type attribute
> is a special case; it is the only attribute that can affect the content
> model of an element. In RELAX NG, any attribute can affect the content
> model in a quite general way. Thus, in situations where W3C XML Schema
> forces the use of the xsi:type attribute, RELAX NG allows the schema
> designer to choose the attribute name (or indeed choose to use a
> subelement instead of an attribute).

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC