XML design

XML design principles

Copyright J.M. Vanel 2000 - under Open Content licence

Data structures design

Application design

See XML inside.
See Extensible browsers.

ANNEXES

 ID or identity ?

This is a standart design issue for XML. Which criteria can we follow to decide when to put an ID attribute in an element?

1st example: commercial orders

They have no identity of their own, because the same client can place
the same order twice the same day. So it is good design to put an ID
attribute in <order> elements. It is equivalent to attribute a number to orders, but in an XML point of vue, it has the advantage to make the element recheable from inside or outside the document.
 

2nd example: Plant species descriptions

A <species> element has 2 sub-elements:
<name> <genus>
that together refer to a unique species; this is a key. So an ID attribute would be redundant. We can specify in XML Schema that several sub-elements together form a key (in the database sense) for the containing element, with the new <key> element.

The species example raises a new issue:

How can we "href" from an exterior URL into an instance of <species>?
 ==> answer: using Xpointer W3C standart (http://www.w3.org/TR/WD-xptr),
we can specify in a <html:a> element:
 href="flora_of_UK.xml#xptr(species[genus='Viola'][name='riviniana'])"
 ==> this raises still a new issue: which browser implements Xpointer (probably none), or which browser will soon implement it?

Extensible browsers

My vision is the following: a multi-everything browser will mainly be an empty shell able to call the appropriate processors whenever it sees certain XML namespaces and/or Processing Instructions.
It will enable multi-domain documents.
It will manage drag'n drop and clipboard with an XML data model.
It might include an editor with the same multi-domain capabilities.
Its responsability will of course also be to manage the display space between processors (tiling, resize, ...).
One important responsability can also be to manage the mapping between the data XML and the displayed XML (HTML or plain XML with CSS).

Generic display skills are also desirable:
- collapsable tree/graph views for the document tree, the inheritance graph, the ID/IDREF graph
- extended search/query

So I expect a general and modular tool for manipulating data, of the 3 main kinds: document-oriented (HTML & word processor), structure-oriented (database type) and knowledge-oriented (semantic network, RDF, etc)

The next killer-app ...
A role for Mozilla ? ct a general and modular tool for manipulating data, of the 3 main kinds: document-oriented (HTML & word processor), structure-oriented (database type) and knowledge-oriented (semantic network, RDF, etc)

The next killer-app ...
A role for Mozilla ?