Setting a Channel Base URI

You can use the BASE attribute of the <CHANNEL> element to set a base URI for the channel, much as you can with the <BASE> element in HTML. The value that you assign to BASE must end with /. Here's an example; in this case, I'm setting a base URI for the channel, which then makes all other URIs relative to that base:

 <?xml version="1.0"?> <CHANNEL BASE="http://www.starpowder.com/"> <TITLE>Planets</TITLE> <LOGO HREF="icon.gif" STYLE="ICON"/> <LOGO HREF="image.gif" STYLE="IMAGE"/> <LOGO HREF="image-wide.gif" STYLE="IMAGE-WIDE"/> <SCHEDULE TIMEZONE="-0800"> <INTERVALTIME DAY="5"/> <EARLIESTTIME HOUR="3" TIMEZONE="-0800"/> <LATESTTIME HOUR="5" TIMEZONE="-0800"/> </SCHEDULE> <ITEM HREF="mercury.html"> <TITLE>All about ...

Get Inside XML 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.