Andy Dingley wrote:
Juergen Kahrs wrote:
>Peter is not expressing doubts about conceptual usefulness of namespaces.
"Namespaces are irrelevant for large classes of documents, especially
in the publishing field, where schemas have little if anything to offer
apart from enforcing the format of dates. "
"Irrelevant for" and "little [...] to offer" (future tense) seem, IMHO,
to be expressing strong doubts about the conceptual usefulness, and the
future potential of, namespaces. I don't read these statements as
merely applying to a current situation.
I should perhaps clarify this (thanks to both of you for picking up on
what I wrote). I was looking at it from the position of editing a text
document for publication (either authoring or editing). During this
process, namespaces are not particularly relevant, and while a schema
offers some more validation, there is often little to validate except
ID/IDREF links, and perhaps a few data formats (dates are a known
problem). In deeply technical documents (math is one obvious example),
schema-level validation may offer more. In preparing a novel for press,
less.
After publication, where you are preparing other derivative material,
I don't dispute that namespaces offer more, and metadata is a good
example. But at this stage the text is fixed (by definition, in most
cases, since the document has now been published), at least for the
time being, and if the document structure management has been done
with (for example) RNG, then a schema can replace the DTD for these
tasks -- Andy's second example is a case in point (the first can be
done just as easily with effectivities).
(And yes, it would be nice if the author had access to namespaces and
would use them to add value to the work being written, but we're not
yet even able to provide authors with a usable XML editor to write
with, so such aspirations are pie in the sky for the moment.)
In any event, in my business we have to deal with things as they are,
and hope that we can persuade the client to move gently towards things
as we might wish them to be. I have three current clients with their
text in SGML and no intention of moving it to XML yet (one day) because
(as Joe pointed out) it means moving from something they know to some
new state, and that's a business decision, with costs and benefits.
I had one client who moved prematurely from SGML to XML against the
recommendation of one senior editor (and mine) and is now paying
a stiff price, not just in cash but in human terms.
The discussion on DTDs in Montreal was interesting. The argument for
entities is unfortunately not completely resolved by the tools Joe
mentions, although they help. Images are a case in point. The problem
with XSLT 1.0 is that in the headlong rush to support data-based
applications it ignored some major features which publishers rely on
(such as the handling of white-space in Mixed Content, and the
processing of ENTITIES attribute values). Some of the other arguments
were regarded as non-prohibitative, but still constitute significant
cost-bearing blockages to using XML to its fullest for document
publishing.
Some of the blame must also rest with publishers: if they are so
anxious to have things done a certain way, they need to get together,
join the W3C, nominate people to the relevant committees, and
ultimately cut some code. Sitting there and whining about it post
hoc is unconvincing, when those who cared were trying to argue
the case unsupported and unfunded.
The dislike of namespaces is not because they weren't there in SGML
(actually, CONCUR, LINK and entities between them provide a large
amount of their functionality) but because they were implemented as
static labels, and the implementations don't provide for proper
inheritance or persistence. But we argued long over this at the time,
and the view was ultimately that the namespace URI did not need to
be dereferenced, nor that their should be anything useful at it to
resolve, which may turn out to be a mistake.
Joe's comparison between C and C++ coding style raised a smile: at
one stage mid-way through the discussions about XML Data, as it was
at the time, I saw a post from someone wishing "that XML would have
a GOTO statement" :-)
///Peter