XML Base

What Is XML Base?

XML Base is a standard way to declare a “base” Uniform Resource Identifier (URI) in XML documents. This base URI is then used to resolve relative references. The functionality is the same as the <base> element in HTML, although XML Base is much broader. XML Base is an official W3C Recommendation that was issued on June 27, 2001, which can be found at

http://www.w3.org/TR/xmlbase/

When writing an HTML document, you can use the <base href="..."> element to specify a base URI against which targets to relative documents are calculated. This applies to the entire document, as <base> is valid only within the <head> section and thus is applicable to the whole page. For example, in HTML:

 <html> <head> <title>Kim's Page</title> ...

Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.