Megginson and XMLNews
David Megginson
david at megginson.com
Tue Apr 13 03:59:00 BST 1999
Walter Underwood writes:
> I expect to ship our next release pre-configured for NITF,
That's wonderful.
> but I sure would like to see some common practice beyond <title>.
> Mostly, our customers would appreciate it, and the people doing
> searches would get better results.
Actually, I think that you need something a little more robust --
otherwise, we'll end up with a hodge-podge of rules for what element
names people can and cannot use. I would not want to forbid someone
from using something like this:
<?xml version="1.0"?>
<person>
<title>Dr.</title>
<firstname>Charles</firstname>
<lastname>Goldfarb</lastname>
<desc>Originator of SGML.</desc>
</person>
Universal names (as in "Namespaces in XML") get you part way there,
because different document types can share semantics of well-known
element types:
<?xml version="1.0"?>
<book xmlns:html="http://www.w3.org/Profiles/xhtml1-transitional">
<front>
<html:title>This is the book title</html:title>
</front>
<body>
[...]
</body>
</book>
What's really useful, though, is to develop some kind of inheritance
scheme, so that you can say "this is just like an html:title, except
that it's also a little more specialised". Architectural forms
provide a very lightweight mechanism for this; XML Schemas will
probably provide another.
Personally, I'd love to see NITF take advantage of namespaces, even to
a very small extent. To start, a simple default namespace would be
nice:
<?xml version="1.0"?>
<nitf xmlns="http://www.iptc.org/iptc/namespaces/nitf/">
<head>
<title>Simple Story</title>
</head>
<body>
<body.head>
<hedline>
<hl1>Simple Story</hl1>
</hedline>
<byline>
<bytag>By David Megginson</bytag>
</byline>
</body.head>
<body.content>
<p>This is a simple story that mentions <cite>Shakespeare in
Love</cite>.</p>
</body.content>
</body>
</nitf>
This would allow other document types to reuse NITF components in a
well-defined way, and search engines to recognise them wherever
they're used. Right now, we're not doing this in XMLNews-Story
because we want to remain strictly subset-compatible with NITF, but
we'll certainly encourage the NITF people to consider updating the
spec.
In fact, since NITF borrows heavily from HTML (and also a bit from
HyTime, though that part is not included in the XMLNews-Story subset),
it would be nice to put the HTML stuff in a separate namespaces so
that search engines and other processing software can do something
useful with it even if they do not know NITF itself:
<?xml version="1.0"?>
<nitf xmlns="http://www.iptc.org/iptc/namespaces/nitf/"
xmlns:html="http://www.w3.org/Profiles/xhtml1-transitional">
<html:head>
<html:title>Simple Story</html:title>
</html:head>
<html:body>
<body.head>
<hedline>
<hl1>Simple Story</hl1>
</hedline>
<byline>
<bytag>By David Megginson</bytag>
</byline>
</body.head>
<body.content>
<html:p>This is a simple story that mentions <html:cite>Shakespeare in
Love</html:cite>.</html:p>
</body.content>
</html:body>
</nitf>
This might help a bit with the search engine problem.
All the best,
David
--
David Megginson david at megginson.com
http://www.megginson.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/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list