[time for a new thread...]
Paul Grosso <pgrosso(_at_)arbortext(_dot_)com> writes:
At 14:35 1999 04 05 +0900, Martin J. Duerst wrote:
Define one parameter, maybe named "namespaces", that lists, comma-separated,
all the namespaces used in the document. The DOCTYPE, if present, counts as
one. The DOCTYPE, or the namespace of the root element, is listed first.
If other description mechanisms (schemas,...) are defined, the URIs used
for them can also be used.
This is extremely ironic given that the original namespace proposal
developed by the XML WG was to have namespace declarations only in
the prolog (at the top) of an XML document. This would have made
lots of things easier, but higher authorities decided that it was
necessary to completely revamp the namespace proposal at the last
minute to give locally scoped namespace declarations.
I've long argued that the truly broken part of the current namespace
proposal is that the namespace 'declaration' occurs in the instance,
and that any sort of multiple-document type schema processing must
occur in the prolog, potentially even before the schema/DTD is
encountered. For example, if I were to write an application that
colonized several DTDs before attempting validation of an instance
containing colonized names, I'd need to see the declarations *before*
the DTDs. Apparently some do not see the prolog-instance separation
as valuable.
One of the things I've also been trying to assert in the HTML WG is
the separation between the document type definition and the document
[instance's] namespace.
In documents containing a DOCTYPE the former is provided, and the
namespace 'declaration' (damn, I can never quite remove those quotes)
provides the namespace identifier. For XHTML, there is essentially
one namespace, as regardless of which of the three DTDs (Strict,
Transitional, or Frameset) the semantics for understanding and
processing a specific element type are identical.
One of the HTML WG work items is 'document profiles', some sort of
extensible metadata container for information about the document
type or instance. This might contain MIME information, further links
to schema documentation, author contact info, interoperability data,
etc. My thinking is that it would be hierarchical and potentially
full of external links, so that applications can dig as deep as
necessary for further information. Or simply use either the profile
identifier or some node-level sub-identifier as a cookie.
We'd for awhile discussed using the existing 'profile' attribute
on <head>, but for some reason which I can't recall now have moved
away from that (either some people thought that we might not require
<head> in all XHTML 'family' doctypes, or that it was overloading
the attribute). I do think it better as a separate element type,
as this allows containment (and therefore inlining of a profile
within a document).
My current favorite syntax for linking a profile would borrow ideas
from existing HTML stylesheet syntax, allowing for either an inline
profile, or a link to an external profile. I think most people would
find this intuitively obvious (given experience with stylesheets).
Simple processors could use the profile URI as a cookie, or retrieve
it to obtain further data.
<?xml version="1.0 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/1999/xhtml/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/TR/1999/html-in-xml">
<head>
<title>The Cruise of the Jasper B.</title>
<link rel="stylesheet" type="text/css"
` href="http://www.altheim.com/styles/marquis.css" />
<link rel="profile" type="text/rdf"
href="http://www.w3c.com/profiles/xhtml1-s.pfl" />
</head>
...
or expanded:
<?xml version="1.0 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/1999/xhtml/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/TR/1999/html-in-xml">
<head>
<title>The Cruise of the Jasper B.</title>
<style type="text/css">
body { background : white }
h1, h2, h3, h4 { color : #800080 ;
font-family : "SomeFontYouDontHave", sans-serif }
...
</style>
<profile type="text/rdf"
href="http://www.altheim.com/styles/marquis.css">
...TBD...
</profile>
</head>
...
The second example still includes the href, to point out the need to
create a way to maintain a named identifier for profiles, if such an
identifier is ever to be used as a cookie. Perhaps the 'title' attribute
or some other means would be better -- just some ideas anyway.
Above we see declarations for:
(a) the XML declaration (potentially the encoding, etc.)
(b) the DTD's name (publicId/FPI/URN)
(c) the DTD's location (systemId/URI)
(d) the document namespace identifier (as URI)
(e) the document stylesheet type and location (URI)
(f) the document profile location (URI)
and while obviously not all are needed all the time, I can certainly
see the ability to maintain this separation being quite valuable.
Murray
...........................................................................
Murray Altheim, SGML Grease Monkey <mailto:altheim@eng.sun.com>
Member of Technical Staff, Tools Development & Support
Sun Microsystems, 901 San Antonio Rd., UMPK17-102, Palo Alto, CA 94303-4900
An SGML declaration does not an i18n make.