URI共通構文(D)

広告

広告

原文

最終更新
2006-04-14T01:01:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/2396/rfc2396_d.html#source

URI共通構文(和訳)

最終更新
2006-09-27T23:12:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/2396/rfc2396_d.html#translation

D. Embedding the Base URI in HTML documents

   It is useful to consider an example of how the base URI of a document
   can be embedded within the document's content.  In this appendix, we
   describe how documents written in the Hypertext Markup Language
   (HTML) [RFC1866] can include an embedded base URI.  This appendix
   does not form a part of the URI specification and should not be
   considered as anything more than a descriptive example.

どうすれば文書の基底URIをその内容に埋め込むことができるかの例を考えることは有用である。当付記では、HTML[RFC1866]で記述された文書に基底URIを埋め込む方法を記述する。ただし、当付記はURI仕様書の一部を構成するものではなく、記述例以上のものと考えるべきではない。

   HTML defines a special element "BASE" which, when present in the
   "HEAD" portion of a document, signals that the parser should use the
   BASE element's "HREF" attribute as the base URI for resolving any
   relative URI.  The "HREF" attribute must be an absolute URI.  Note
   that, in HTML, element and attribute names are case-insensitive.  For
   example:

      <!doctype html public "-//IETF//DTD HTML//EN">
      <HTML><HEAD>
      <TITLE>An example HTML document</TITLE>
      <BASE href="http://www.ics.uci.edu/Test/a/b/c">
      </HEAD><BODY>
      ... <A href="../x">a hypertext anchor</A> ...
      </BODY></HTML>

HTMLでは、特別なBASE要素が文書のHEAD内にある場合、BASE要素のHREF属性を相対URI解決の際に使う基底URIを示すものと定義している。HREF属性は絶対URIでなければならない。またHTMLにおいては、要素名と属性名が大文字であるか小文字であるかの区別はされないことに注意する。

   A parser reading the example document should interpret the given
   relative URI "../x" as representing the absolute URI

      <http://www.ics.uci.edu/Test/a/x>

   regardless of the context in which the example document was obtained.

例として挙げた文書を読むパーサは、その文書の取得状況に関らず、与えられた相対URI"../x"は、<http://www.ics.uci.edu/Test/a/x>という絶対URIで扱われることが望ましい。

広告

Copyright (C) 2006 七鍵 key@do.ai 初版:2006年04月14日 最終更新:2006年09月27日