Chapter 2. Technologies i n XML 29
򐂰Choice 1: Beef Vindalooo" resolves to the URI
"http://airlines.org/mealchoices/choice1.xml"
򐂰Choice 2: Chicken Laksa" resolves to the URI
"http://airlines.org/mealchoices/choice2.xml"
򐂰"Choice 3: United Airlines Burger" resolves to the URI
"http://airlines.org/mealchoices/choice2.xml"
As in XML, only Unicode characters are allowed in xml:base. But for the URI,
non-ASCII characters, except for the hash, percentage and square brackets, are
disallowed. All disallowed characters can be used provided they are converted to
UTF-8 or hexadecimal notation of the byte value, or if the character is replaced
by the character sequence.
The URI is resolved in the following priority:
1. The URI entry specified in the document
2. The URI of the encap sulating entity
3. The base URI is the URI used to retrieve the entity, or is defined by the
application.
The base URI may consists three parts in this order:
a. The base URI dictated by the xml:base attribute
b. The base URI of the elements parent
c. The base URI of the document entity containing the element
It is best to provide an xml:base attribute as close to where the relative paths are
specified. If not, the xml:base attribute of the parent document comes into affect.
If the parent document is not available, then there might by difficult to determine
the absolute URI. For best results, the xml:base value should be provided either
directly or via default attributes declared in the internal subset of the DTD. Visit
W3C Web page to read more:
http://www.w3.org/TR/xmlbase/
XML Pointer
The XML Pointer specification is the final part of the XLink specification. Where
XLink governs how you can insert links into your XML document and where the
link can point to anything, XPointer allows the user to point to specific part o f the
document or a range, or area of the document. The user can then link the
address from one point of the document to anot her point in the same document.
IN HTML, using the A and IMG allows you to point from one document to
another, and only to a pre-determined spot. In an XM L document, given its tree
structure, you should be able to navigate down to a child element or to a part of a
tree or from one part of a tree to another part of the tree.