(1) ..., which should be a child of the binding element.
・「これは、 binding 要素の子供にします。」
・「…子要素にします。」
Within the implementation, you define individual field, property, and method elements, one for each one that you want.
・「 implementation 内には、それぞれ必要な個々の要素、 field、 property、 method を定義します。」
・「 implementation 内では、必要に応じて field、 property、 method の各要素を個別に定義します。」
(2) In this example, no content has been placed inside either the XUL box or its definition in XBL, which is perfectly valid.
・「この例では、XUL ボックスにも XBL 内のその定義にも、まったく内容はありませんが、これは完全に妥当です。」
・「この例では、XUL ボックスも、その XBL 内での定義も、内容は空ですが、…」
「まったく内容はありません」が「無意味だ」といった意味に誤解しそうだったので。
(3) You can use the onget and onset attributes to have code execute when the property is retrieved or modified.
・「プロパティを元に戻したり変更したりするときにコードを実行する、 onget と onset 属性が使えます。」
・「プロパティを取得したり…」
(4) Add each to the property element and set its value to a script which either gets or sets the value of the property.
・「それぞれを property 要素に追加し、その値を、プロパティの値の取得や設定を行なうスクリプトに設定します。」
・「それぞれを property 要素に追加し、その値として、プロパティの値の取得や設定を行なうスクリプトをあてがいます。」
(5) Attempting to assign alphabetic text to such a property should fail.
・「こうしたプロパティにアルファベットからなるテキストを割り当てようとすると、エラーにすべきです。」
・「…割り当てようとしたときは…」
(6) When set, an alert will be displayed which displays the value to assign to the property.
・「 set するときには、値がプロパティに割り当てられたことを示すアラートが表示されます。」
・「設定するときには、…」
(7) The special variable val holds the value that the property should be assigned to.
・「特殊変数 val は、プロパティに割り当てるべき値を保持します。」
・「特別な変数 val は、プロパティに割り当てるべき値が渡されるものです。」
または
「プロパティに割り当てるべき値は、 val という特別に用意された変数に渡されます。」
変数名 val は引数を表すものですね。突然出てきたので、最初何か特殊な val というプロパティみたいなものに自動的に値が格納されるのかと思ってしまいました。なので、 hold の訳を変えました。「特殊変数」も専門用語的で大げさな感じがしました。(特に新しい概念が導入されているわけではないと思う)。
(8) Whenever a script attempts to get the value of the property, it is grabbed instead from the attribute on the element with the same name.
Whenever a script attempts to set the value of a property, it is set as an attribute on the element.
・「スクリプトによってプロパティの値を取得しようとするときはいつでも、プロパティではなく要素の同じ名前の属性が取得されます。スクリプトによって値を設定しようとするときはいつでも、値は要素の属性に設定されます。」
・「この例では、スクリプトからプロパティの値を取得しようとする度に、要素の同じ名前の属性が取得され、設定しようとする度に、値は要素の属性に設定されます。」