[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] What is a sematic data model?
- From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
- To: Hans-Juergen Rennau <hrennau@yahoo.de>,Roger L Costello <costello@mitre.org>,Michael Kay <mike@saxonica.com>
- Date: Fri, 12 Nov 2021 16:47:36 -0500
At 2021-11-12 16:10 +0000, Hans-Juergen Rennau wrote:
"You create a semantic data model for a problem
domain (for example, in UML), and then you
define XML or JSON representations of the data
in that domain. The conceptual data model comes
first, the concrete realisations come second." Michael Kay
This sounds to straightforward, intuitive,
compelling - that it puzzles me why it seems to
be done only very rarely, and concerning the
approach how to do it there does not seem to be
any established good practice. The OASIS work
Ken points to looks exactly like a step in that
direction, but probably very few people are aware of it?
I wish more people were aware of what we have been doing.
The UBL project turned 20 years old last month.
We've been using CCTS for modeling and our NDRs
(an OASIS innovation) since soon after the
project inception, though the NDRs have evolved a
lot over the years. The JSON clauses in the NDRs
are a quite recent addition to the XML clauses.
The use of github for non-technical committee
members to generate XSD and JSON-schema
constraint expressions is new in version 2.3. The
sources are fully exposed in the repository (I'm
not using my obfuscation techniques).
Going from CCTS to XSD and, separately, from CCTS
to JSON-schema means we aren't trying to convert
our XSD expressions directly into JSON-schema
expressions. Perhaps they can be, but it is
irrelevant. What is relevant is these each are
mechanical expressions of the single CCTS model.
The CCTS 2.01 model for business documents comes
from the United Nations Centre for Trade
Facilitation UN/CEFACT. The lowest XSD fragment
in the UBL schema tree is a copyrighted UN/CEFACT
file of component types. There is no such
fragment for JSON-schema so I write one.
As there is no mixed content in CCTS, I found it
straightforward to create NDRs for producing a
JSON-schema expression of the content
constraints. And documents conforming to the
schemas can be transliterated losslessly between XML and JSON and back again.
I would entertain proselytizing our
accomplishments in this regard as a presentation
to any interested conference audience either
remotely or, if the conference can help with
travel, on-site. I'm anxious to get on the road
again, but my OASIS work is entirely unfunded.
. . . . . . . . Ken
p.s. I haven't copied here the links that I posted originally earlier:
http://lists.xml.org/archives/xml-dev/202111/msg00031.html
And would RDF not be a top candidate for the
semantic models on which to build API definitions, but who does it?
The apparent lack of interest (?) in that
straightforward (?) approach is above all
puzzling if one considers how data integration -
API integration - becomes an increasingly
pressing problem. So bridging between different
syntax is probably only a minor application, the
main one being bridging between different
message types. There must be a reason for this
contradiction, and I would like to understand it.
Hans-Jürgen
Am Freitag, 12. November 2021, 14:11:32 MEZ hat
Michael Kay <mike@saxonica.com> Folgendes geschrieben:
>
> Michael, what is a "semantic data model"?
A semantic data model tells you how the items in
your data relate to things in the real world. An
XML document might have a <product> element, but
it doesn't tell you what a product is - and it's
always more complicated than you think (for
example, if you put your cornflakes in a
Christmas-themed package one week, does that make it a different product?).
> Would you give an example of a semantic data
model for XML and an example of a semantic data model for JSON, please?
You're putting the cart before the horse. You
create a semantic data model for a problem
domain (for example, in UML), and then you
define XML or JSON representations of the data
in that domain. The conceptual data model comes
first, the concrete realisations come second.
Of course, people often skimp on data modelling
and can get into a mess as a result. I did some
modelling work with a TV company that couldn't
agree what a "channel" was - some people thought
it was a content service that people subscribed
to, others that it was a set of electrical
signals transmitted on a particular frequency.
> How are their semantic data models used to
transform XML to JSON and vice versa?
>
You design an XML representation of the data
model, and you design a JSON representation of
the data model, and then you work out how they
relate to each other, by referring back to the data model.
Michael Kay
Saxonica
--
Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/x/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @US$125 (5 hours free) |
Essays (UBL, XML, etc.) http://www.linkedin.com/today/author/gkholman |
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]