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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: building an object model of a XML schema



I apologise due to my Dev Knowledge being of the M$ type.

Firstly M$ MDAC2.6 there active data objects library can use XML as a
recordset object. This has a ODBC style API. My knowledge is limited but you
can take any ADO recordset and create a XML stream that can be received as a
recordset object.
To what extent any data typing or recordset objects such as schema, fields
and there likes.
Search MSDN for MDAC2.6 & SOAP they have a lot of data on there site just
not the easiest to navigate.
Then SQL2000 supports links to IIS so that URL XML queries can pass sql
style syntax and function via a simple url API.

Sun for my ignorance but they also have a libraries for JDBC and API object
models Jena ?

At the present MS have a more complete package with .NET with SUN hot on
there heals but one of my problems has been the speed of development in this
area makes it near impossible to put your finger on a solution.

I can really see a valid reason for the usage of objects as a document model
negates the use of encapsulation. There is another method which is a Valid
XML method where a schema can represent a object model which provides the
translation of a series of HTTP API calls to return data fragments. Again I
am returning to .NET and SOAP but there are many alternatives out there and
is my problem.

One thing that has struck me is how RDF bridges the gap between XML schema
and Object model.
<QUOTE> The base element of the RDF model is the triple : a resource (the
subject) is linked to another resource (the object) through an arc labelled
with a third resource (the predicate). We will say that <subject> has a
property <predicate> valued by <object>. <QUOTE>

The above is a XML pair <QUOTE> but who's it from and this is about as
simply as I can explain RDF :-
<rdf:QUOTE about="http://www.theauthor.html">
The base element of the RDF model is the triple : a resource (the subject)
is linked to another resource (the object) through an arc labelled with a
third resource (the predicate). We will say that <subject> has a property
<predicate> valued by <object>.
</rdf:QUOTE>

As you can see RDF is very simple but that simple triple allows inheritance
which is essential to many modelling languages such as UML. Classes and sub
classes can be expressed very easily via a RDF method which isn't a
possibility with XML pairs. Meta-Metadata, Metadata, Data packets in the
form of simple triples can map objects. Having the link with the pair takes
some thought but it is a very simple and logical model.
The W3C have a wealth of information on RDF so maybe it might be of
interest.

There are also many initiatives out there DAML, TOPIC mapping, the CORBA
people all providing solutions or trying.

Is the problem the DOM, a method of changing the model to suit the map? But
there are solutions out there and to say that object representation and
manipulation isn't where it is at, is very short sighted.

Problems with security, concurrency and scalability and notions that XML is
of a type will provide in the future a major problem with XML legacy
systems.

Somewhere the Klondike schema's and the romantics of the Semantic web will
converge but with the wealth of opinion who knows.


-----Original Message-----
From: Amit Bhatiani [mailto:amit@invertica.com]
Sent: 10 July 2001 23:49
To: Ronald Bourret; Bullard, Claude L (Len)
Cc: xml-dev@lists.xml.org
Subject: RE: building an object model of a XML schema


> "Bullard, Claude L (Len)" wrote:
> >
> > An excellent paper, BTW.
> >
> > In it, you suggest that it is better NOT to
> > generate classes from XML Schemas.  It is better use
> > a data modeling language such as UML and generate the
> > schema from that.  Do you still support that position?
>
> Yes, although it's based on theoretical work, not real-world experience.
>
> XML Schemas are designed to model XML documents, not objects.
> Consequently, you get some weirdnesses when trying to map the schema
> data model to an object model. If your application really thinks in
> terms of objects, better to start with an object/generic modelling
> language and go the other direction. That way, the XML schema is just a
> serialization syntax, not a model.
>

I can give you some real-world reasons why you should start with objects and
not schemas.

1. As business requirements change, they require both data and behavior
changes. This obviously means that you design, code and test your changes in
the object model. This means you want the object model to be your ongoing
starting point, not the schema.

2. Expressing type constraints in the xml schema is cumbersome at best.
Strong type checking is important in most application scenarios.


------------------------------------------------------------------
The xml-dev list is sponsored by XML.org, an initiative of OASIS
<http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@lists.xml.org