words (RE: extensibility in XSchema?)
James K. Tauber
jtauber at jtauber.com
Tue Jun 23 07:58:44 BST 1998
> I'm a pragmatist and need to address the following problems:
> - how do I add human 'meaning' to an object (e.g. an element
> or attribute)?
> - how do I add machine 'meaning' to an object?
It is the former that I have always meant by "semantics". Under this I
- a prose description of the meaning (for human consumption)
- a link to an ontology
- links to equivalent objects with similar meaning (eg my "P" is the same
are your "para")
I take it that by the latter you mean action and behaviour. Or do you
include linking to ontologies as machine meaning?
> At present there are *no* defined mechanisms for either of
> these in XML. I find this amazing and regrettable (I - and others such
> Rick) have been shouting for it).
Such as myself.
> <foo bar="baz"/>
> That's it. All we can say is there is a foo element with a
> bar attribute whose value is baz.
That's right. That is all the semantics of XML (the language itself) will
> Now try:
> <!DOCTYPE foo SYSTEM "foo.dtd">
> <foo bar="baz"/>
> The DOCTYPE adds the meaning, doesn't it? Nope, it says the following:
> - the root element is a foo element. But we know that
> already. It does NOT define the document as of type 'foo'.
> - there is a DTD whose sole purposes are:
> - to expand minimisation (irrelevant for this document)
> - to validate the document.
> Yes, you can fill the DTD with comments, but they have no
> formal meaning and there is no way even of knowing which comment belongs
> which element apart from guessing. It is even worse with attributes,
> each exists in a single <!ATTLIST>
Exactly. DTDs are primarily to do with describing the syntax of a language
(not the XML language, but a separate language imprecisely called a document
But DTDs do provide notations, which go towards the sort of thing you are
talking about. Of course, you can use notations just for syntactic
constraint within content, but they can be used for semantics.
[...MIME comparison omitted...]
> This is all I am asking for, but there seems to be no way to
> do a similar thing for an XML element or attribute.
Of the top of my head (thinking aloud as always), these are the sorts of
things one might want to say about the class of things (say elements)
1. what FOOs can contain
2. where FOOs can be
3. what FOOs look like when presented
4. what FOOs do when the user does something
5. what an application is to do when it gets a FOO.
6. what other labels people use for FOOs.
7. what people mean by FOO.
I'm sure there are others.
Some of these are clearly syntax. Some are semantics. Some are something
else we are trying to come up with a name for. (note that they are related:
the meaning of an element will generally determine its content model but
that doesn't make semantics and syntax the same thing).
I would tend to use 'syntax' for 1 and 2, 'presentation' or 'style' for 3,
'behaviour' for 4, 'action' for 5, and 'semantics' for 6 and 7. To avoid
'semantics', I might use 'thesaurus' in the context of 6 and 'meaning' for
I would then go on to say that one can 'bind' a particular label to one or
more of these, eg bind FOO to a particular syntax, bind FOO to a particular
style, bind FOO to a particular action, etc.
James Tauber / jtauber at jtauber.com http://www.jtauber.com/
Perth, Western Australia http://www.xmlinfo.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev