<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="lillet" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
    
    
    
<title>On the applicability of catalog resolution</title><biblioid class="uri">http://norman.walsh.name/2005/06/10/resolution</biblioid>
<volumenum>8</volumenum>
<issuenum>91</issuenum>
<pubdate>2005-06-10T05:11:04-04:00</pubdate>
<date>$Date: 2005-09-11 10:27:02 -0400 (Sun, 11 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2005</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>As a strong proponent of XML Catalogs, I'm sometimes asked, “should
catalog resolution be used for …?” The answer is “yes”.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#TheWeb"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#XML"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#XMLCatalogs"/>
</info>

<epigraph>
<attribution>
      <personname>
	<firstname>La</firstname>
<surname>Bruyère</surname>
      </personname>
    </attribution>
<para>The things we have most longed for do not happen; or if they do,
it is never at the time nor under the circumstances when they could
have made us happiest.</para>
</epigraph>

<para xml:id="p1">I'm a strong proponent of
<link xlink:href="http://www.oasis-open.org/committees/download.php/12075/xml-catalogs.html">
      <citetitle>XML Catalogs</citetitle>
    </link>.
Not everyone believes in them,
<link xlink:href="/2003/06/26/cache">but I do</link>.
</para>

<para>As a consequence, I'm sometimes asked, “should catalog
resolution be used for” followed by some context in which a URI can
appear that an application might attempt to retrieve: the system and
public identifiers of documents and entities, the URI components of
<link xlink:href="http://www.w3.org/TR/xmlschema-1/#xsi_schemaLocation">schema
location hints</link> in XML Schema,
the <tag class="attribute">href</tag> pseudo-attribute of the
<link xlink:href="http://www.w3.org/TR/xml-stylesheet">XML stylesheet</link>
processing instruction, the <tag class="attribute">href</tag> attributes
of <link xlink:href="http://www.w3.org/TR/xslt#section-Combining-Stylesheets">include and import</link> elements in XSLT, the URI in an
<link xlink:href="http://www.w3.org/TR/xsl/slice6.html#fo_external-graphic">XSL</link>
or <link xlink:href="http://www.w3.org/TR/CSS2/syndata.html#uri">CSS</link>
property value, the <tag class="attribute">href</tag> attribute of
<link xlink:href="http://www.w3.org/TR/html4/struct/links.html#h-12.2">HTML</link>, etc.</para>

<para>The answer is “yes”. Catalog resolution applies to any URI that a
<link xlink:href="http://en.wikipedia.org/wiki/Web_cache">web cache</link>
applies to: <emphasis>all</emphasis> of them.</para>

<para>If you're writing an application, an entity resolver should be
used for <emphasis>all</emphasis> external entities and a URI resolver
should be used for <emphasis>all</emphasis> other URIs. <emphasis>All
of them.</emphasis> Yes, that one. And that one. And that other
one, too.
</para>

<para>The <citetitle>XML</citetitle> specification
<link xlink:href="http://www.w3.org/TR/REC-xml/#sec-external-ent">gives
explicit license</link> to parsers to perform catalog resolution:
</para>

<blockquote>
<para>Attempts to retrieve the resource identified by a URI MAY be
redirected at the parser level (for example, in an entity resolver) or
below (at the protocol level, for example, via an HTTP Location:
header).</para>
</blockquote>

<para>To the extent that <emphasis>lack</emphasis> of such explicit license
in other specifications leads users and developers to imagine that such
resolution is not allowed, I think it was a mistake to call this out
in the XML specification.</para>

<para>Your application doesn't need explicit license to use a resolver
any more than it has to give me explicit license to run
<link xlink:href="http://www.gedanken.demon.co.uk/wwwoffle/">WWWOffle</link>.
<link xlink:href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3">GET</link>ing a URI? Resolve it first!</para>

</essay>

