#pattern
* Semantics and structure of HTML
documents
#ja
$1 HTML 文書の意味と構造
#pattern
* Documents
#ja
$1 文書
#en
Every XML and HTML document in an HTML UA is represented by a
Document object. [DOM3CORE]
#ja
HTML 利用者エージェントにおけるすべての XML や HTML の文書は
Document オブジェクトにより表現されます。 [DOM3CORE]
#pattern
* Documents in the DOM
#ja
$1 DOM 中の文書
#en
Document objects are assumed to be XML documents unless they are flagged as being HTML documents when they are created. Whether a document is
an HTML document or an XML document affects the
behavior of certain APIs, as well as a few CSS rendering rules. [CSS21]
#ja
Document オブジェクトは、作成された時に
HTML 文書であると旗付けされていなければ、 XML 文書であると見なします。
文書が HTML 文書であるか XML 文書であるかは、
いくつかの API の動作や CSS のレンダリング規則の一部に影響します。 [CSS21]
#en
A Document object created by the createDocument() API on the DOMImplementation
object is initially an XML
document, but can be made into an HTML document by calling document.open() on it.
#ja
DOMImplementation 上の createDocument() API により作成された Document
オブジェクトははじめ XML
文書ですが、 document.open()
を呼び出すことにより HTML 文書にすることができます。
#en
All Document objects (in user agents implementing this
specification) must also implement the HTMLDocument interface, available using
binding-specific methods. (This is the case whether or not the document in
question is an HTML document
or indeed whether it contains any HTML
elements at all.) Document objects must also implement
the document-level interface of any other namespaces found in the document
that the UA supports. For example, if an HTML implementation also supports
SVG, then the Document object must implement HTMLDocument and SVGDocument.
#ja
(この仕様書を実装する利用書エージェントにおける) すべての
Document
オブジェクトは、 HTMLDocument 界面をも実装し、
束縛規定の方式により利用可能としなければ[[MUST:なりません]]。
(これは当該文書が HTML 文書であるか否かや、
そもそも HTML
要素を含んでいるか否かによらずのことです。)
Document オブジェクトは、文書中に現れ、利用者エージェントが対応している、
他の名前空間の文書水準の界面をも実装しなければ[[MUST:なりません]]。
例えば、 HTML 実装が SVG にも対応している場合、 Document
オブジェクトは HTMLDocument と
SVGDocument を実装しなければなりません。
#en
Because the HTMLDocument interface is now obtained
using binding-specific casting methods instead of simply being the primary
interface of the document object, it is no longer defined as inheriting
from Document.
#ja
HTMLDocument
界面は現在では単純に文書オブジェクトの主たる界面であるとするのではなく、
束縛規定の型変換方式を使って得るものとしているので、
最早 Document から継承するとは定義していません。
#en
Since the HTMLDocument
interface holds methods and attributes related to a number of disparate
features, the members of this interface are described in various different
sections.
#ja
HTMLDocument
界面は色々な機能に関係するメソッドや属性を持っていますので、
この界面の構成員はそれぞれの節で説明します。
#en
User agents must raise a security exception
whenever any of the members of an HTMLDocument object are accessed by
scripts whose effective script origin is not the
same as the
Document's effective script origin.
#ja
利用者エージェントは、 HTMLDocument
オブジェクトの構成員のいずれかが、
実効スクリプト起源が Document
の実効スクリプト起源と同じではないスクリプトからアクセスされる場合に、
常に、
保安性例外を発生させなければ[[MUST:なりません]]。
#pattern
* Resource
metadata management
#ja
$1 資源メタデータ管理
#en
The URL attribute
must return the document's address.
#ja
URL
属性は文書の番地を返さなければ[[MUST:なりません]]。
#en
The referrer attribute must
return either the address of the active document of the source
browsing context at the time the navigation was started (that is, the
page which navigated the browsing context to the current document), or the
empty string if there is no such originating page, or if the UA has been
configured not to report referrers in this case, or if the navigation was
initiated for a hyperlink with a noreferrer keyword.
#ja
referrer
属性は、操縦が開始された時点での原始閲覧文脈の活性文書
(閲覧文脈を現在の文書に操縦した頁)
の番地か、
または、そのような元々の頁がない場合、利用者エージェントがこの場合に参照子を報告しないように設定されている場合、
操縦が noreferrer
キーワードのあるハイパーリンクについて初期化された場合には空文字列、
このいずれかを返さなければ[[MUST:なりません]]。
#en
In the case of HTTP, the referrer DOM attribute will match the Referer (sic) header that was sent when fetching the current page.
#ja
HTTP の場合、 referrer DOM 属性は現在の頁を取ってくる時に送られた Referer (ママ) 頭部と一致します。
#en
Typically user agents are configured to not report referrers
in the case where the referrer uses an encrypted protocol and the current
page does not (e.g. when navigating from an https:
page to an http: page).
#ja
通常、利用者エージェントは、参照子が暗号化プロトコルを使っており、
現在の頁がそうではない場合 (例えば https:
頁から http: 頁へと操縦した時)
には参照子を報告しないように設定されています。
#en
The cookie
attribute represents the cookies of the resource.
#ja
cookie
属性は、資源のクッキーを表します。
#en
On getting, if the sandboxed
origin browsing context flag is set on the browsing context of the document, the user agent
must raise a security exception. Otherwise, it
must return the same string as the value of the Cookie HTTP header it would include if fetching the resource indicated by the document's
address over HTTP, as per RFC 2109 section 4.3.4
or later specifications. [RFC2109] [RFC2965]
#ja
取得時、砂箱起源閲覧文脈旗が文書の閲覧文脈に設定されている場合には、
利用者エージェントは保安性例外を発生させなければ[[MUST:なりません]]。
そうでない場合、文書の番地で示される資源を HTTP
によって取ってくる場合に RFC 2109
4.3.4 節やより新しい仕様書に従って含まれるであろう Cookie HTTP 頭部の値と同じ文字列を返さなければ[[MUST:なりません]]。 [RFC2109] [RFC2965]
#en
On setting, if the sandboxed origin browsing
context flag is set on the browsing context
of the document, the user agent must raise a security exception. Otherwise, the user agent must
act as it would when processing cookies if it had just attempted to fetch the document's address
over HTTP, and had received a response with a Set-Cookie
header whose value was the specified value, as per RFC 2109 sections
4.3.1, 4.3.2, and 4.3.3 or later specifications. [RFC2109] [RFC2965]
#ja
設定時、砂箱起源閲覧文脈旗が文書の閲覧文脈に設定されている場合には、
利用者エージェントは保安性例外を発生させなければ[[MUST:なりません]]。
そうでない場合、利用者エージェントは、
文書の番地で示される資源を HTTP
によって取ってこようとし、
値が指定された値である Set-Cookie
頭部がある応答を受信した場合にクッキーを処理する時と同じように、
RFC 2109 4.3.1 節、4.3.2 節、4.3.3. 節やより新しい仕様書に従い作用しなければ[[MUST:なりません]]。 [RFC2109] [RFC2965]
#en
Since the cookie attribute is accessible across frames,
the path restrictions on cookies are only a tool to help manage which
cookies are sent to which parts of the site, and are not in any way a
security feature.
#ja
cookie 属性はフレームをまたいでアクセス可能ですので、
クッキーの経路制限はクッキーがサイト上のどの部分に送られるかを管理することを助けるための道具に過ぎず、
保安性のための機能では決してありません。
#en
The lastModified attribute,
on getting, must return the date and time of the Document's
source file's last modification, in the user's local timezone, in the
following format:
#ja
lastModified
属性は、取得時、 Document の原始ファイルの最終修正の日時を、
利用者の地方時において、次の書式で返さなければ[[MUST:なりません]]。
#en
The month component of the date.
#ja
日付の月の部品。
#en
A U+002F SOLIDUS character ('/').
#ja
U+002F SOLIDUS 文字 ('/')。
#en
The day component of the date.
#ja
日付の日の部品。
#en
The year component of the date.
#ja
日付の年の部品。
#en
A U+0020 SPACE character.
#ja
U+0020 SPACE 文字。
#en
The hours component of the time.
#ja
時刻の時の部品。
#en
A U+003A COLON character (':').
#ja
U+003A COLON 文字 (':')。
#en
The minutes component of the time.
#ja
時刻の分の部品。
#en
The seconds component of the time.
#ja
時刻の秒の部品。
#en
All the numeric components above, other than the year, must be given as
two digits in the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE
representing the number in base ten, zero-padded if necessary.
#ja
前述の数値の部品のうち年以外のすべては、範囲 U+0030 DIGIT ZERO ~
U+0039 DIGIT NINE の2つの数字によって十進数を表す、
必要なら零埋めしたものとして与えなければ[[MUST:なりません]]。
#en
The Document's source file's last modification date and
time must be derived from relevant features of the networking protocols
used, e.g. from the value of the HTTP Last-Modified
header of the document, or from metadata in the file system for local
files. If the last modification date and time are not known, the attribute
must return the string 01/01/1970 00:00:00.
#ja
Document の原始ファイルの最終修正日時は、
使用されているネットワークのプロトコルの関係する機能、例えば文書の HTTP Last-Modified 頭部から、または局所ファイルのファイル・システムのメタデータから得たものでなければ[[MUST:なりません]]。
最終修正日時がわからない場合は、この属性は文字列 01/01/1970 00:00:00
を返さなければ[[MUST:なりません]]。
#en
The Document's source file's last modification date and
time must be derived from relevant features of the networking protocols
used, e.g. from the value of the HTTP Last-Modified
header of the document, or from metadata in the file system for local
files. If the last modification date and time are not known, the attribute
must return the string 01/01/1970 00:00:00.
#ja
Document の原始ファイルの最終修正日時は、
使用されているネットワークのプロトコルの関係する機能、例えば文書の HTTP Last-Modified 頭部から、または局所ファイルのファイル・システムのメタデータから得たものでなければ[[MUST:なりません]]。
最終修正日時がわからない場合は、この属性は文字列 01/01/1970 00:00:00
を返さなければ[[MUST:なりません]]。
#en
A Document is always set to one of three modes: no quirks mode, the default; quirks
mode, used typically for legacy documents; and limited quirks mode, also known as "almost standards"
mode. The mode is only ever changed from the default by the HTML parser, based on the presence, absence, or value
of the DOCTYPE string.
#ja
Document は常に3つのモードのいずれかに設定されています。無奇癖モードは既定値です。奇癖モードは、
普通、遺物文書に使われます。制限奇癖モードは、「ほぼ標準」モードとも呼ばれます。
このモードは
HTML 構文解析器によってのみ、
DOCTYPE 文字列が存在するか存在しないかやその値に基づいて既定値から変更されます。
#en
The compatMode DOM attribute
must return the literal string "CSS1Compat" unless
the document has been set to quirks mode by the HTML parser, in which case it must instead return the
literal string "BackCompat".
#ja
compatMode DOM
属性は、生の文字列「CSS1Compat」を返さなければ[[MUST:なりません]]。
ただし、文書が HTML 構文解析器により奇癖モードに設定されている場合には、
代わりに名前の文字列「BackCompat」を返さなければ[[MUST:なりません]]。
#en
Documents have an associated character encoding. When a Document
object is created, the document's character
encoding must be initialized to UTF-16. Various algorithms during page
loading affect this value, as does the charset setter. [IANACHARSET]
#ja
文書は文字符号化と関連付けられています。
Document オブジェクトが作成された時、文書の文字符号化は
UTF-16 に初期化されなければ[[MUST:なりません]]。
頁の読み込みの間の色々な算法や charset 設定子がこの値を変化させます。 [IANACHARSET]
#en
The charset DOM attribute must,
on getting, return the preferred MIME name of the document's character encoding. On setting, if the
new value is an IANA-registered alias for a character encoding, the document's character encoding must be set to that
character encoding. (Otherwise, nothing happens.)
#ja
charset DOM
属性は、取得時、文書の文字符号化の優先 MIME
名を返さなければ[[MUST:なりません]]。設定時、
新しい値がある文字符号化の IANA に登録された別名である場合、文書の文字符号化をその文字符号化に設定しなければ[[MUST:なりません]]。
(それ以外の場合、何も起きません。)
#en
The characterSet DOM
attribute must, on getting, return the preferred MIME name of the document's character encoding.
#ja
characterSet DOM
属性は、取得時、文書の文字符号化の優先 MIME 名を返さなければ[[MUST:なりません]]。
#en
The defaultCharset DOM
attribute must, on getting, return the preferred MIME name of a character
encoding, possibly the user's default encoding, or an encoding associated
with the user's current geographical location, or any arbitrary encoding
name.
#ja
defaultCharset
DOM 属性は、取得時、文字符号化の優先 MIME 名を返さなければ[[MUST:なりません]]。
この文字符号化は利用者の既定の符号化でもいいですし、
利用者の現在の地理的位置に関連付けられた符号化でもいいですし、
その他任意の符号化名でもあり得ます。
#pattern
* DOM tree
accessors
#ja
$1 DOM 木アクセス器