XML Data Model?

I

Irfan Bondre

What is Data Model?

What is XML Data Model?
Any spec for XML Data Model?

What is XML info Set?


Irfan
 
A

Andy Dingley

What is Data Model?

A "data model" is an abstract notion, which a document might represent.
This data model describes the entities (things) that can be represented
by it, their properties (values or constraints that can be attached to
them) and their inter-relationships.

A data model can also have a "serialisation", a notation for how to
write down its content as a stream of characters, such as can be stored
in a file.
What is XML Data Model?

There isn't one. See below.
Any spec for XML Data Model?

See above.
What is XML info Set?

http://www.w3.org/TR/2004/REC-xml-infoset-20040204/

The XML recommendation was written without a data model, as just a
serialisation. It was later realised that a formal data model would be
useful and so info-set was written to describe a concensus about the
pre-existing situaton.

SGML doesn't have a data model. It only has a serialisation. If an SGML
application wants to interpret this as a data model, then it must invent
its own. Obviously this limits inter-operability between applications.

XML's implicit data model is well-defined, but not deeply so. It has
many limitations.

RDF takes the other direction to SGML and had a data model first and
foremost, together with a number of alternative serialisations. One is
RDF+XML, the next most popular is as Triples. Because there is a
well-defined data model it's relatively easy to add new serialisations,
should you wish.

Because RDF took the data model question first, it also has a far more
capable data model than plain XML. It may represent a graph, rather than
just a tree (a branching tree is a subset of a generalised graph).
Secondly it allows entities to be stored in either the document, or
external to it, through a well-defined addressing mechanism. XML can
only use entities within the current document.

If you want details as to what XML's data model is, rather than what a
data model is for, then read Infoset in detail. The RDF data model may
also illuminate some of its limitations.
 
S

Stefan Ram

Andy Dingley said:
capable data model than plain XML. It may represent a graph, rather than
just a tree (a branching tree is a subset of a generalised graph).

In XML, graphs might be expressed using attribute
values of type ID and IDREF.
 
I

Irfan Bondre

Does that mean, XML when initialy written only empahized in terms of
every tags must have a open and close tags, attributes values should be
quoted, no duplicate attributes within the same tag etc..

i.e the above represented the data model or "serialization" model....

And Later came the XML Info set which implied in terms of elements,
document node, attributes and their relation ship.
 
A

Andy Dingley

In XML, graphs might be expressed using attribute
values of type ID and IDREF.

Have you ever seen this successfully done ?

Yes, XML has this feature. In practice though it just doesn't work well
enough to be useful.

Perhaps the biggest limit though is XML's dependence on "the graph"
being contained entirely within a single document. ID and IDREF fall
apart very badly when you get beyond this stage.
 
A

Andy Dingley

And Later came the XML Info set

Yes. XML appeared around 1997, Infoset was 2000, AFAIR (I worked with
one of the authors). This was after RDF had become of great interest to
our group and it was the difference between the two platforms that
inspired much of the Infoset work (or at least the inspiration to do
it).
 
S

Stefan Ram

Andy Dingley said:
Have you ever seen this successfully done ?

ID and IDREF are used in the XHTML-1.1 DTD

http://validator.w3.org/sgml-lib/REC-xhtml11-20010531/xhtml11-flat.dtd

several times. For example, to describe the relation between
the for-attribute of a label-element, which must match the ID
of a control.

The HTML 4.01 specification say:

The for attribute associates a label with another control
explicitly: the value of the for attribute must be the
same as the value of the id attribute of the associated
control element. More than one LABEL may be associated
with the same control by creating multiple references via
the for attribute.

The label elements, control elements and this association form
a graph. I assume, this is successfully used in the world wide
web. (Because I am not aware of a search engine that is
indexing these parts of the source code, I can not give
statistics of the amount of use.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top