Altova Mailing List Archives
>comp.text.xml Archive Home
>Recent entries
>Thread Prev - Is a fragment ID a URI reference?
>Thread Next - Re: Is a fragment ID a URI reference?
Re: Is a fragment ID a URI reference?
To: NULL
Date: 5/18/2006 5:39:00 PM
In article <e9ydnTfto-8YB_HZRVnysg@g...>,
Gustaf <gustafl@a...> wrote:
>My question is: is a fragment ID by itself a URI reference? Is the above
>example valid, or can xlink:href="#myelement" only refer to the same
>document?
A URI reference of the form #myelement is always a same-document
reference, regardless of the base URI.
Either by RFC 2396, in which it is handled explicitly without
reference to the base URI:
4.2. Same-document References
A URI reference that does not contain a URI is a reference to the
current document. In other words, an empty URI reference within a
document is interpreted as a reference to the start of that document,
and a reference containing only a fragment identifier is a reference
to the identified fragment of that document.
or by RFC 3986, in which it is handled by using the base URI and comparing
it with the (same!) base URI:
4.4. Same-Document Reference
When a URI reference refers to a URI that is, aside from its fragment
component (if any), identical to the base URI (Section 5.1), that
reference is called a "same-document" reference. The most frequent
examples of same-document references are relative references that are
empty or include only the number sign ("#") separator followed by a
fragment identifier.
You can't use xml:base to make a bare fragment refer to some other document.
-- Richard
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

