[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] The purpose of a namespace URI is ...
- From: Liam R E Quin <liam@w3.org>
- To: John Cowan <cowan@mercury.ccil.org>
- Date: Mon, 03 Dec 2012 01:08:32 -0500
On Sun, 2012-12-02 at 22:44 -0500, John Cowan wrote:
> Liam R E Quin scripsit:
>
> > But I'm not convinced: public identifiers need indirection, and if you
> > have indirection you can ue indirection for the system identifiers too.
>
> [...] what I understood was that public ids
> were absolute names and system ids were meaningful to the current process.
> So given a URI as a public id, you could dereference it if no system id
> was present, or you could make use of the system id to find a specific
> copy of it.
There was a huge long argument about this in the XML development.
I afterwards discovered that part of it was that some of the
participants thought that URLs worked like filenames - that you always
got what you asked for. One such person said (several years later) that
if he had understood that a URL could be rewritten by an HTTP proxy (or,
later, by an XML catalog resolver) he would not have been so adamant
about requiring public identifiers.
So, not everyone involved had the same understandings, nor the same
goals, nor the same knowledge, so we had some nice chaos.
At any rate we settled on FORMAL NO for XML. You can put what you like
in public identifiers...
> So an XHTML DOCTYPE might look like any of these:
[1]
> <!DOCTYPE html SYSTEM "../dtds/mini-html.dtd">
[2]
> <!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> "../dtds/standard-html.dtd">
[3]
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "../dtds/standard-html.dtd">
Or even <!DOCTYPE html> as it turns out.
However, if you give both SYSTEM and PUBLIC, the PUBLIC identifier can
be tignored, whereas the system identifier cannot be ignored:
[[
An XML processor attempting to retrieve the entity's content may use any
combination of the public and system identifiers as well as additional
information outside the scope of this specification to try to generate
an alternative URI reference. If the processor is unable to do so, it
must use the URI reference specified in the system literal.
]]
Since in XML you can't give a public identifier without also giving a
system one, this actually means a conforming parser can ignore public
identifiers altogether. I'm not sure whether such a parser would be
popular, but probably it wouldn't make much difference in practice.
The XML spec also (indirectly) gives parsers license to use xml:base for
resolving system identifiers, for what it's worth.
> > The contribution of public ids was their structure, and the idea of
> > giving something a name, not the fact that they didn't actually work :-)
>
> *Formal* public ids have a structure, but public ids didn't have to
> be formal.
good point, thanks.
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]