- From: Paul Grosso <pgrosso@arbortext.com>
- Date: Thu, 21 Mar 2002 17:14:19 -0600
- To: "Roger L. Costello" <costello@mitre.org>, www-xml-linking-comments@w3.org, costello@mitre.org
At 13:01 2002 03 14 -0500, Roger L. Costello wrote: >I have 3 questions on XML Base: > >1. My first question is to make sure that I understand the big picture: >It is my understanding that a specification will define whether or not >it supports XML Base, Yes. > and if it does, it will define where (on what >elements) the xml:base URL can be applied. Generally no. It is usually expected that xml:base would be allowed on any element just as other attributes using the reserved "xml" prefix. I'm not sure if XML Schema allows for limiting where xml:* attributes can appear, so I may be mistaken here. > For example, the XLink >specification says (my own words) "yes, we support XML Base; any href in >an XLink that has a relative URL will have the xml:base URL prepended". Almost, but I'd phrase it slightly differently. A given spec (e.g., XLink) may say that XML Base support is required for conformance to it. This means that XML Base attributes will affect the base URI property. The base URI property (per RFC 2396) affects the absolutization of relative URI references. Now it's back to the spec at hand (e.g., XLink) to indicate how one determines what strings in a document are relative URI references. But once a spec requires XML Base support and says which strings are URI references, the rest of it is really ruled by RFC 2396. >That is, a specification identifies where an xml:base URL may be applied. I wouldn't say that. I would say what I said above. I'm not sure if that comes to the same thing or not, because I'm not sure I know what you mean by your statement above. > Contrast with a specification (A) that does not support XML >Base, then any A-aware tool is not expected to understand xml:base, and >will not do any URL-prepending. Is this the way it works? Not quite. An A-aware tool would ignore the xml:base attributes, but there are still other ways to determine the base URI (see RFC 2396), and relative URIs are still absolutized using the base URI. >2. Assuming my statements in (1) are correct, then I would like to know >what specifications currently support XML Base, and what elements have >they identified as being XML Base-able. Here's my initial stab at a list: Also don't forget that the value of any xml:base attribute that happens to be relative is also influenced by the current base URI (which might have been set by an xml:base attribute earlier in the hierarchy). >Specification XML Base-able elements >----------------------------------------------------- >HTML/XHTML the href in an anchor element > the src in an image element Looking at http://www.w3.org/TR/xhtml1/ I don't see where it suggests it supports XML Base. Maybe I'm missing something newer. Where do you see an indication that XHTML supports XML Base? >XInclude the href in an include element > >XLink the href in an XLink element The above two appear to be correct. >XML Schemas the schemaLocation attribute > the noNamespaceSchemaLocation attribute > the targetNamespace attribute > (I am currently getting clarification on whether > these schema attributes are XML Base-able, so > don't take this as gospel. If anyone knows > with certainty please let me know.) I don't know about XML Schema, but any string that is said to be a (possibly relative) URI reference will be influenced by the base URI which in turn is set by the xml:base attribute (when the spec in question mandates XML Base support). >Are there other specifications which support XML Base? I haven't checked. > What about RDDL? It should, but I don't know. >RDF? Doubt it, as it came out before XML Base did, but I might be wrong. >3. With namespaces you can declare a namespace and use it, all in one >fell swoop. For example: > > <c:Camera xmlns:c="http://www.camera.org"> Yes. >Notice how I declared the namespace (and the prefix, c) on the Camera >element, and simultaneously qualified Camera. That is commonly done. >Can we similarly declare an xml:base URL and use the xml:base URL? For >example: > > <BookCatalogue xml:base="http://www.example.org/" > xsi:schemaLocation="http:books.org > BookCatalogue.xsd" > ...> Yes. See the third bullet point in http://www.w3.org/TR/xmlbase/#matching . >Note how I declared the xml:base URL (http://www.example.org/) and >simultaneously used the xml:base URL in schemaLocation. Thus, the >complete schemaLocation is: http://www.example.org/BookCatalogue.xsd. >Is this legal - declare the xml:base URL and use it simultaneously? Yes (assuming that the second string in the pair has been defined to be a URI reference by the Schema spec). paul
Received on Thursday, 21 March 2002 18:19:17 UTC