Table of contentsAppendices |
5.4 Locator Attribute (Locator Attribute (href)The attribute that supplies the data that allows an XLink application to find a remote resource (or resource fragment) is href. It Must, May, etc. be used on simple-type elements, and Must, May, etc. be used on locator-type elements. The value of the href attribute Must, May, etc. be a URI reference as defined in [rfc2396], or must result in a URI reference after the escaping procedure described below is applied. The procedure is applied when passing the URI reference to a URI resolver. Some characters are disallowed in URI references, even if they are allowed in XML; the disallowed characters include all non-ASCII characters, plus the excluded characters listed in Section 2.4 of [rfc2396], except for the number sign (#) and percent sign (%) and the square bracket characters re-allowed in [rfc2732]. Disallowed characters Must, May, etc. be escaped as follows:
Because it is impractical for any application to check that a value is a URI reference, this specification follows the lead of [rfc2396] in this matter and imposes no such conformance testing requirement on XLink applications. If the URI reference is relative, its absolute version Must, May, etc. be computed by the method of [xbase] before use. For locators into XML resources, the format of the fragment identifier (if any) used within the URI reference is specified by the XPointer specification [xptr]. Sample href Attribute DeclarationsFollowing is a non-normative attribute-list declaration for href on an element intended to be simple-type. <!ATTLIST simplelink xlink:href CDATA #REQUIRED ...> |