IT翻訳 Nobuyuki の仕事部屋

ボランティアでソフトウエアーローカライズのために翻訳をしている。

Gecko Info for Windows Accessibility Vendors更新対応3

2005-05-31 21:10:23 | InTranslated
作業を継続します。

旧バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.02
新バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.13


原文(旧):  青色表示
原文(新):  緑色表示
訳文(新):  黒色表示
*注記/コメント: 赤色表示

MSAA tree vs. DOM tree - what's the relation?

Diagram showing MSAA tree is a subset of the DOM tree
The MSAA tree and the DOM tree are parallel structures, although the MSAA tree is a subset of the DOM tree. QueryService() can be used to switch between the interfaces (IAccessible, ISimpleDOMDocument, ISimpleDOMNode and ISimpleDOMText). If there is no MSAA node for a DOM node, or vice-versa, QueryService() will return null.


MSAA tree vs. DOM tree - what's the relation?

Diagram showing MSAA tree is a subset of the DOM tree
The MSAA tree and the DOM tree are parallel structures, although the MSAA tree is a subset of the DOM tree. QueryService() can be used to switch between the interfaces (IAccessible, ISimpleDOMDocument, ISimpleDOMNode and ISimpleDOMText). If there is no MSAA node for a DOM node, or vice-versa, QueryService() will return null.

Anything that is focusable or conveys important information about the structure of the document is exposed in the MSAA tree of IAccessibles.




MSAA ツリー対 DOM ツリー:その関係は?

MSAA ツリーが DOM ツリーのサブセットであることを示す図
MSAA ツリーと DOM ツリーでは、MSAA ツリーは DOM ツリーのサブセットではあるものの、平行的構造を備えています。QueryService() はインターフェイス (IAccessible、ISimpleDOMDocument、ISimpleDOMNode、ISimpleDOMText) を切り替えるのに使われます。DOM ノードに対応する MSAA ノードが存在しない(また反対に MSAA ノードに対応する DOM ノードが存在しない)ならば、QueryService() は null を返します。

フォーカス可能なものは何であれ、またドキュメントの構造についての重要な情報を伝えるものはすべて、IAccessibles の MSAA ツリーで表示されます//→追加された文//


Windows Applications Based on the Gecko Layout Engine

Gecko is a rendering engine that Mozilla, Netscape and other new browsers use. Gecko can render a variety of content, not just HTML and supports key web standards such as Cascading Style Sheets, Javascript and the W3C DOM. Gecko also handles the users keystrokes and mouse clicks. Gecko is the core architecture that we are adding accessibility to, in order to support accessibility in all applications that are based on it.


Windows Applications Based on the Gecko Layout Engine

Gecko is a rendering engine that Mozilla, Netscape and other new browsers use. Gecko can render a variety of content, not just HTML and supports key web standards such as Cascading Style Sheets, Javascript and the W3C DOM. Gecko also handles the users keystrokes and mouse clicks. Gecko is the core architecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it.


Gecko レイアウトエンジンに基づく Windows アプリケーション

Gecko は Mozilla、Netscape、他の新しいブラウザが使うレンダリングエンジンです。Gecko は HTML だけでなく様々なコンテンツを表示可能で、Cascading Style Sheets、Javascript、W3C DOM などのウェブの重要な標準をサポートします。Gecko はまたユーザーのキー入力やマウスクリックについても扱います。Gecko に基づく全てのアプリケーションにおいてアクセシビリティをサポートするために、私たちは中核の構造体である Gecko にアクセシビリティを追加しているところです。//→ここは変わらない//



Embedded Clients (support MSAA)

Embedded clients use Gecko only in the content window, at the moment for HTML and generic XML only. Since they use standard Windows controls (or support MSAA for their own user interface), they can be made accessible.

* MFCEMBED testing client: This is a very simple package, great for testing basic HTML accessibility with your products and the Gecko rendering engine. Contact Aaron Leventhal - aaronleventhal@ m o o n s e t . net for a copy.
* Many other clients are being developed, and are on the horizon.


Embedded Clients (support MSAA)

Embedded clients use Gecko only in the content window, at the moment for HTML and generic XML only. They typically use standard Windows controls for their user interface -- the area outside of the client content window, plus the context menu.

* MFCEMBED testing client: This is a very simple package, great for testing basic HTML accessibility with your products and the Gecko rendering engine. Contact Aaron Leventhal - aaronleventhal@ m o o n s e t . net for a copy.
* Kmeleon: a more advanced web browser


埋め込まれたクライアント(MSAA をサポートしています)

埋め込まれたクライアントは、Gecko をコンテンツウィンドウでのみ、また今のところ HTML と共用 XML に対してのみ使用します。それらクライアントは、通常ユーザインターフェイス--クライアントのコンテンツウィンドウの外の領域、プラスコンテンツメニュ --に対して、標準のウィンドウコントロールを使用します。

* MFCEMBED テストクライアント: これは非常に簡単なパッケージであり、あなたの製品や Gecko 表示エンジンによって、基本的な HTML アクセシビリティをテストするのに最適です。コピーのご請求は Aaron Leventhal - aaronleventhal@ m o o n s e t . net へご連絡下さい。
* Kmeleon: さらに進化しているウェブブラウザ//→情報がより具体的になっている//


XUL-Based Clients (now also support MSAA!)

XUL-based clients make full use of the Gecko architecture, not only for HTML content, as well as for menus, dialogs and the entire user interface via an XML language called XUL (eXtensible User-interface Language). None of the user interface contains standard Windows controls -- not even the menus! This is done to ensure a common look and feel across all supported platforms. MSAA support for XUL is available in Mozilla 1.0+.

* Mozilla the browser
* Netscape 6.x



XUL-Based Clients (support MSAA)

XUL-based clients make full use of the Gecko architecture, not only for HTML content, as well as for menus, dialogs and the entire user interface via an XML language called XUL (eXtensible User-interface Language). None of the user interface contains standard Windows controls -- not even the menus! This is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).

* Firefox (please use version 1.1 alpha builds or later)
* Thunderbird (please use version 1.1 alpha builds or later)
* Mozilla Seamonkey (please use 1.8 alpha builds or later)




XUL ベースのクライアント(こちらも MSAA をサポートします)

HTML コンテンツだけでなく、メニュー、ダイアログボックス、XUL(eXtensible User-interface Language) と呼ばれる XML 言語を使った全ユーザインターフェイスに、XUL ベースのクライアントは Gecko のアーキテクチャーを全面的に使用します。ユーザインターフェイスには、メニューも含めて、Windows の標準コントロールを含むものはありません。サポートされるすべてのプラットフォームに関わる共通のルックアンドフィールを確保するのと、様々なスキン(外観)を有効にするためです。//→この辺も微妙に変更されている//

* Firefox (バージョン 1.1 アルファ・ビルドかそれ以降のものを使ってください)
* Thunderbird (バージョン 1.1 アルファ・ビルドかそれ以降のものを使ってください)
* Mozilla Seamonkey (バージョン 1.8 アルファ・ビルドかそれ以降のものを使ってください)


本日までの完了分は、あらたに新草稿へ追加反映します。
旧草稿新草稿

以上


Gecko Info for Windows Accessibility Vendors更新対応2

2005-05-30 20:33:49 | InTranslated
さて、本日から更新文書対応のため、草稿を作り直す作業に入ります。

旧バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.02
新バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.13

進め方は、原文(旧、新)と訳文(新)を表示して行きます。

変更部分は、新たに追加されたところと、従来の文章が微妙に変更された部分とがないまぜになっているので、新、旧を明確に区別するのは、けっこう難しいようです。

原文(旧):  青色表示
原文(新):  緑色表示
訳文(新):  黒色表示
*注記/コメント: 赤色表示


Gecko Info for Windows Accessibility Vendors

This FAQ explains how makers of Windows screen readers, voice dictation packages and magnification software can support Gecko-based software. The base of our support for these products is MSAA (Microsoft Active Accessibility), external content DOM support, and the keyboard API/user interface. Currently, support for accessibility API's exists only on the Windows platform.


Gecko Info for Windows Accessibility Vendors

This FAQ explains how makers of Windows screen readers, voice dictation packages and magnification software can support Gecko-based software. The base of our support for these products is MSAA (Microsoft Active Accessibility), external readonly DOM support, and the keyboard API/user interface.

For Firefox and all other Gecko-based products: this documentation only applies to up-to-date builds of Firefox -- currently not an official releases. Grab the current build of Firefox which supports these features.


Windows アクセシビリティベンダー向け Gecko 情報

この FAQ は Windows のスクリーンリーダ、音声検出パッケージ、拡大鏡ソフトウェアの製作者が、どうすれば Gecko ベースのソフトウェアをサポート出来るかについて説明しています。これらの製品に対する私たちのサポートのベースとなるのは、MSAA (Microsoft Active Accessibility)、外部の readonly DOM サポート、およびキーボード API/ ユーザインターフェイスです。

Firefox とその他の Gecko ベースの製品すべてにとって、この文書は現在まだ公式リリースになっていない Firefox の最新のビルドにのみ適用されます。これらの機能をサポートする Firefox の現行のビルドを見てください。



Contents

* Definitions
* Windows Applications Based on the Gecko Layout Engine
* MSAA Support: IAccessible Methods
* MSAA Support: Event Tracking and Unique ID's
* MSAA Features We Do Not Support
* Intentional Differences with Internet Explorer
* Enhancing Performance on the Client End via IEnumVARIANT
* Additional DOM support
* Keyboard UI Information
* Beyond HTML: Other Types of Web Content
* Questions or Comments?


Contents

* Definitions
* Windows Applications Based on the Gecko Layout Engine
* How to Find the Content Window and Load the Document
* MSAA Support: IAccessible Methods
* MSAA Support: Event Tracking and Unique ID's
* MSAA Features We Do Not Support
* Intentional Differences with Internet Explorer
* Table of MSAA Roles Supported
* Enhancing Performance on the Client End via IEnumVARIANT
* Avoiding Memory Leaks
* Additional DOM support
* Keyboard UI Information
* Beyond HTML: Other Types of Web Content -- DHTML, MathML, SVG, XForms and XUL
* Questions or Comments?



目次

* 定義
* Gecko レイアウトエンジンに基づく Windows アプリケーション
* コンテンツウィンドウの見つけ方とドキュメントの読み込み方法//新規追加の節//
* MSAA サポート: IAccessible のメソッド
* MSAA サポート: イベント追跡と一意の ID
* サポートしない MSAA の機能
* Internet Explorer との意図的な違い
* サポートされる MSAA Roles の一覧表//新規追加の節//
* IEnumVARIANT によるクライアントエンドの性能向上
* メモリリークを回避する//新規追加の節//
* 追加的 DOM サポート
* キーボード UI 情報
* HTML を超えて: 他の種類のウェブコンテンツ -- DHTML、MathML、SVG、XForms、XUL
* 質問あるいはコメント?


//目次から明らかなのは、新たに 3 節が追加されていますが、従来の節でも追加変更がかなり在るようです。//

Definitions

* Gecko : Mozilla's rendering engine. Gecko is the internal engine that Mozilla uses to render any kind of web content. It supports HTML, Cascading Style Sheets (CSS) and the Document Object Model (DOM).
* MSAA : Microsoft Active Accessibility, an API devised by Microsoft so that accessibility aids can track what's going on inside the user interface of any software package that supports it. If you seriously need to understand MSAA, you'll need to read the docs on MSDN and play with the sample apps and code that come with MSAA SDK 1.3. (I recommend SDK 1.3 because the MSAA SDK 2.0 doesn't come with the source code to the testing tools. The other differences are minor).
* DOM : Document Object Model. This is the W3C's specification for how web content is exposed to Javascripts and other languages. It covers content, style and events. Inside the process, Gecko-based products have full support for DOM level 1, and more support for the standard is on the way. However, exposing the entire DOM to external software packages is quite involved. We have chosen a subset of the DOM needed for accessibility aid vendors. Events such as focus changes must be tracked through MSAA events, rather than DOM events.



Definitions

Here are some basic definitions that you'll need for this document to make sense:

* Gecko : The rendering engine for Firefox, Thunderbird, Nvu, Mozilla Seamonkey and other applications. Gecko is the internal engine that Mozilla uses to render any kind of web content. It supports HTML, XHTML, Cascading Style Sheets (CSS) and the Document Object Model (DOM).
* MSAA : Microsoft Active Accessibility, an API devised by Microsoft so that accessibility aids can track what's going on inside the user interface of any software package that supports it. If you seriously need to understand MSAA, you'll need to read the docs on MSDN and play with the sample apps and code that come with MSAA SDK 1.3. (I recommend SDK 1.3 because the MSAA SDK 2.0 doesn't come with the source code to the testing tools. The other differences are not important).
* DOM : Document Object Model. This is the W3C's specification for how web content is exposed to Javascript and other languages. It covers content, style and events. Inside the Gecko process, code has full to DOM APIs. However, exposing the entire DOM to external software packages is quite involved, partially because changes to the DOM in Firefox must occur on the main thread. We have chosen a subset of readonly methods in the DOM needed for assistive technology vendors. Events such as focus changes must be tracked through MSAA events, rather than DOM events.
* XUL: The XML-based language used by Firefox and Mozilla to develop the UI. Similar to HTML in that it can be combined with CSS and Javascript to make powerful applications. Contains more desktop-style widgets than HTML and follows a box layout model, rather than being text-flow based.
* Roles, states and events: please read the MSAA documentation on MSDN if you are unfamiliar with these. in general we abbreviate by removing redundant words. For example, we may say EVENT_ALERT instead of the full EVENT_SYSTEM_ALERT.



定義

この文書を理解する上で必要になる基本的定義を示します:

* Gecko : Firefox、Thunderbird、Nvu、Mozilla Seamonkey、その他アプリケーション用のレンダリングエンジン。Gecko は Mozilla があらゆる種類のウェブコンテンツを表示するために使う内部エンジンです。HTML、Cascading Style Sheets (CSS)、Document Object Model (DOM) をサポートします。
* MSAA : Microsoft Active Accessibility は Microsoft によって作られた API で、アクセシビリティの補助機能が、ユーザーインターフェイスをサポートするソフトウエアーにおいて、ユーザーインターフェイスの内部で発生している事を追跡できます。もし MSAA を真剣に理解しようとするならば、MSDN で資料を読み、MSAA SDK 1.3 によって提供されるアプリケーションとコードを試してみる必要があります。(MSAA SDK 2.0 はテストツールのソースコードを備えていないので、 SDK 1.3 を推奨します。他の違いは重要ではありません。)
* DOM : Document Object Model。これは、ウェブコンテンツがどのようにして Javascript や他の言語へ公開されるかについての W3C の仕様です。DOM はコンテンツ、スタイル、イベントをカバーします。Gecko の内部処理は、DOM API のコードに溢れていますが(草稿訳注:ここの訳自信なし)、全 DOM を外部ソフトウェアパッケージに公開することはあまりに大掛かりとなります。ひとつには、Firefox において DOM へ変更を加えることは、メインスレッドで行われることになるからです。私たちは、アクセシビリティ補助機器ベンダーに必要とされる、 DOM のサブセットを選り抜きました。フォーカスの変更などのイベントは DOM イベントではなく、MSAA イベントによって追跡される必要があります。
* XUL: ユーザインターフェイスを開発するのに Firefox や Mozilla によって使われる XML をベースとする言語。強力なアプリケーションを作成するのに CSS や Javascript と組み合わせて仕様可能である点が、HTML と似ている。HTML よりデスクトップ型のウィジェットをより多く含み、テキストフロー(text-flow)ではなく、ボックスレイアウトの方式を採用します。
* 役割、状態、イベント: これらをあまりご存知でなければ、MSDN で MSAA の文書を読んでください。通常余分な言葉を省くことで、短縮します。例えば、EVENT_SYSTEM_ALERT とすべて言わずに、EVENT_ALERT とすることができます。


//定義では最後の 2 項目が追加されました:XUL と 役割、状態、イベント//

本日はここまでとしますが、変更分は新草稿に反映します。
旧草稿新草稿

以上

Gecko Info for Windows Accessibility Vendors更新対応1

2005-05-29 23:48:59 | InTranslated
一週間ほど、翻訳作業を中断しておりました。その間、当然このブログも中断してしまいました。とりあえず、翻訳作業そのものを、公開してしまえ、みたいな革新的取り組み?で始めましたので、(^_^ゞ作業のないときは、自然と中断してしまいます。その間、埋め草的な記事を書くほど話題も豊富でなく、中断のやむなきに至りましたが、ブログのために翻訳作業をしているのではないのでまあ仕方がないですけれども。(-_-;

閑話休題

IT の世界は日進月歩、といいますか、分進日歩かもしれない。 Mozilla Org. で紹介されている幾多の文書も、バージョンアップを重ねます。技術文書が大半なので、分進日歩の世界では文書そのものが、陳腐化して行くのは当たりまえかもしれません。多くの有志の校正協力を得て、翻訳を完成原稿としても、それで終わりではなく、オリジナルの文書そのものがバージョンアップし、時には改訂内容が大きすぎて、全然別の文書に近いような事態になることもあるようです。

今回アーロンさんのアクセシビリティ関連の文書のひとつで、事実、大幅な修正が発生しました。2、3日前、アーロンさんからメールがあって、Gecko Info for Windows Accessibility Vendors を今回バージョンアップした旨の連絡をいただきました。実はこの変更は、前回私の方からアーロンさんに、メールを送って、アーロンさんの主要文書の翻訳の完了をお知らせした際、その返信で予告を頂いておりました。

変更内容を見て、かなりの部分が書き換え、追加されていることが分かりました。実はこの文書は現在まだ草稿公開中の段階にあり、ちょうど校正を受けている最中でしたが、完成稿にする前に新バージョンがリリースされ、大幅に内容が変更されたことになります。

そこで、草稿を作り直すことにします。(・_・、
原文を表示しますと、

旧バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.02
新バージョン: Gecko Info for Windows Accessibility Vendors Rev.1.13

作り直しの対象となるのは現在公開中の草稿です。

目標一週間ほどで、完了させたいと思いますが上手く行くでしょうか。

それでは、明日以降ぼちぼちと作業を開始します。
以上

DOM Examples を訳す-その5

2005-05-22 13:44:38 | InTranslated
本日で DOM サンプルの翻訳は完了します。

完了した翻訳文は草稿という形で、 Mozilla Japan のフォーラムに公開し問題がなければ、完成稿として公開されます。

原題: DOM Examples
訳題: DOM 例

それではおもむろに、翻訳作業を始めます。(-_-;

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Example 7: Displaying Event Object Constants

This example shows how to use the DOM to create a table in which all of the constants in the event object and their values are displayed. It shows off several useful aspects of the DOM, including the Event.prototype property, which allows you to get to the properties of a particular object, a good pattern for iterating over the properties in that prototype, and the values of the constants themselves displayed in the table. Note that the middle range of these constants are the character codes that represent the actual keys pressed during the event (and fetchable with the charCode property).

Load the following code as a web page to see the event object constants.


例 7: イベントオブジェクト定数を表示する

この例によって、イベントオブジェクトの定数すべてとその値が表示される一覧表を作成するための DOM の使用方法を示します。役に立つ DOM の特徴をいくつかご紹介しますが、その中には Event.prototype プロパティーが含まれ、これによって、特定のオブジェクトのプロパティ、この試作品の中で、プロパティをループで繰り返す適当なパターン(草稿訳注:サンプルプログラムで for ループで繰り返す部分を言うのでしょうが、訳はいまいち自信なし(・_・; )、一覧表に表示される定数自体の値を知ることが可能になります。注意点として、中間範囲にある定数は、イベントの間にインプットのあった実際のキーを表します(そして charCode プロパティを使って取り出し可能)。

イベントオブジェクトの定数を見るのに、以下のコードをウェブページとして読み込んでください。


→サンプルプログラムは下記のリンクでご参照ください。

原題: Example 7: Displaying Event Object Constants
訳題: 例 7: イベントオブジェクト定数を表示する





DOM Examples を訳す-その4

2005-05-21 20:05:41 | InTranslated
DOM サンプルの続きです。

ひとつ、リンクが上手く行っていません。全部訳し終わってリンクを整理すると、和文と英文それぞれがうまくリンクされるでしょう。現在はまだ、和文から英文に飛んだり、リンクがきちんと整理されておりません。あしからずご了解ください。

原題: DOM Examples
訳題: DOM 例

翻訳作業です。

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Example 6: getComputedStyle

This example demonstrates how the DOM document.defaultView.getComputedStyle() method can be used to get the styles on an element that aren't set in-line or with JavaScript (e.g., element.style.backgroundColor="lightblue"). These latter types of styles can be retrieved with the more direct style = element.style property, a list of which properties is listed in the DOM Style Reference of this book (see DOM CSS Properties List). See also the style property in the DOM Elements Reference.

getComputedStyle() returns a ComputedCSSStyleDeclaration object, whose individual style properties can be referenced with this object's getPropertyValue() method, as the following example document shows.


例 6: getComputedStyle

この例は、エレメントの、インラインに設定されていないスタイルや JavaScript で設定されていないスタイルを取得する document.defaultView.getComputedStyle() メソッドの使用方法を示します(例、element.style.backgroundColor="lightblue")。 JavaScript で設定されていないケースは、もっと直接的な style = element.style を使って表示可能です。そのプロパティはこの文書のDOM Style Reference に一覧として表示されています(DOM CSS Properties List をご参照ください)。また DOM Elements Reference の style property もご参照ください。

getComputedStyle() は ComputedCSSStyleDeclaration オブジェクトを返し、下記のサンプルにありますように、このオブジェクトの getPropertyValue() メソッドによって個々のスタイルプロパティが参照出来ます。
<html>


→サンプルプログラムは下記のリンクでご参照ください。

原題: Example 6: getComputedStyleStyles
訳題: 例 6: getComputedStyle


DOM Examples を訳す-その3

2005-05-20 23:56:32 | InTranslated
本日も引き続いて DOM サンプルを!

原題: Example 5: Event Propagation
訳題: 例 5: イベント伝播

Example 5: Event Propagation

This example demonstrates how events fire and are handled in the DOM in a very simple way. When the BODY of this HTML document loads, an event listener is registered with the top row of the TABLE. The event listener handles the event by executing the function l_func, which changes the value in the bottom cell of the table.

However, l_func also calls an event object method, stopPropagation, which keeps the event from bubbling any further up into the DOM. Note that the table itself has an onclick event handler that ought to display a message when the table is clicked. But the l_func method has stopped propagation, and so after the data in the table is updated, the event phase is effectively ended.


例 5: イベント伝播

この例は DOM でのイベントの起動方法、扱われ方をごく単純化して紹介します。下記の HTML文書 の BODY が読み込みをする時、イベントリスナーが TABLE の第一行を使って登録されます。イベントリスナーは関数 l_func を実行することでイベントを処理します。この関数は、表の一番下のセルの値を変更します。

しかし、 l_func はまたイベントオブジェクト・メソッド stopPropagation を呼出します。このメソッドはイベントが発生してこれ以上 DOM に入り込むのを防止します。テーブル自体は、クリックされた時、メッセージを表示する必要のある onclick イベントハンドラーを備えています。しかし l_func メソッドは伝播を停止してますので、データが更新された後では、イベントは効率的に終了します。



→コーディングは冒頭のリンクをご参照ください。

m(__)m

DOM Examples を訳す-その2

2005-05-19 23:28:31 | InTranslated
本日はサンプルの解説文翻訳の2回目です。訳すところが少ないので、楽です。しかし、その文コードを理解しなくちゃ。(-_-;

原題: Example 4: Using Stylesheets
訳題: 例 4: スタイルシートを利用する

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Example 4: Using Stylesheets

The styleSheets property on the document object returns a list of the stylesheets that have been loaded on that document. You can access these stylesheets and their rules individually using the stylesheet, style, and CSSRule objects, as demonstrated in this example, which prints out all of the style rule selectors to the console.


例 4: スタイルシートを利用する

ドキュメントオブジェクト上の スタイルシートプロパティは、そのドキュメントに読み込まれたスタイルシートの一覧を返します。このページの例に示されているように、スタイルシート、スタイル、CSSRule オブジェクトを利用して、これらのスタイルシートとそのルールに個別にアクセスが可能です。そしてこの例では、すべてのスタイルルールのセレクタがコンソールへ表示されます。


ss = document.styleSheets;
for(ii=0;ii<ss.length;ii++) { }

For a document with a single stylesheet in which the following three rules are defined:

BODY { background-color: darkblue; }
P { font-face: Arial; font-size: 10pt; margin-left: .125in; }
#lumpy { display: none; }

This script outputs the following:

BODY
P
#LUMPY


ss = document.styleSheets;
for(ii=0;ii<ss.length;ii++) { }

以下の三つのルールが定義される単一のスタイルシートが附属されているドキュメント用に対して:

BODY { background-color: darkblue; }
P { font-face: Arial; font-size: 10pt; margin-left: .125in; }
#lumpy { display: none; }

このスクリプトは以下の項目を表示します:

BODY
P
#LUMPY

(?_?)

DOM Examples を訳す-その1

2005-05-18 21:46:14 | InTranslated
さて本日から、新しい文書の翻訳にとりかかりたいと思います。
Mozilla の DOM 関連文書のなかで DOM のサンプルプログラムを参照できるものがあります。具体的コーディングが紹介されていますので、私のように DOM を学習する初心者にとっては参考になる文書です。以下のリンクで原文と和訳文を参照できますが、サンプルの解説文がまだ翻訳されていません。正確に言いますと、例 1、2 は和文化されていますが、例3~7 は翻訳が完了していません。そこで、今回はこのサンプルの解説文を翻訳してみたいと思います。

本当は、紹介されているコードを試して見たいという興味が半分です。(^_^ゞエディタとブラウザがあれば簡単に表示できますので、皆さんも興味があれば是非試してください。

原題: DOM Examples
訳題: DOM 例

それでは、早速まだ和文になっていない解説文から訳してみます。

Example 3: Manipulating Styles

In this simple example, some basic style properties of an HTML paragraph element are accessed using the style object on the element and that object's CSS style properties, which can be retrieved and set from the DOM. In this case, you are manipulating the individual styles directly. In the next example (see Example 4), you can use stylesheets and their rules to change styles for whole documents.


例 3: スタイルを操作する

この簡単なサンプルでは、HTML の段落エレメントの基本的ないくつかのスタイルプロパティは、DOM から検索設定されるエレメントのスタイルオブジェクトとそのオブジェクトの CSS スタイルプロパティを使って、アクセスされます。この場合は、個々のスタイルが直接操作されています。次の例((例 4を参照)では、スタイルシートとそのルールを使用して、全ドキュメントに対してスタイルを変更する事が出来ます。


サンプルプログラムは下記のリンクでご参照ください。

原題: Example 3: Manipulating Styles
訳題: 例 3: スタイルを操作する


まずはここまで。(^-^)/~~~~




XPCOM Component Reuseを草稿にする-07

2005-05-17 21:43:18 | InTranslated
さて、この草稿作成も本日が最後になります。内容的に私にとっては、かなり難しいものでしたが根性で訳しぬいた?(^_^ゞ感じですね。結構きついです。にもかかわらず、翻訳を続けるのはひとえに翻訳って面白いとういう理由です。また、翻訳しならが IT について勉強させてもらっています。(^_^) Mozilla Org. には翻訳が待たれる文書が沢山ありますので、まだまだ、色々な文書を翻訳して行きたいですね。ただし、出来れば自分なりの得意分野を絞ってその周辺から翻訳を続けるような方法がいいと思います。このあたりが、 Mozilla Org.のために翻訳するよいところですね。

さて、本日は有終の美を飾れますか。(-_-;

/*翻訳作業につきましては、本日の作業対象部分のみを以下に表示しておりますが、全体の原文と翻訳文(翻訳作業が完了している部分まで)は、直下のリンクをご参照ください。*/

原題: XPCOM Component Reuse
訳題: XPCOM コンポーネントの再使用

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Dynamic Loading

The glue library (xpcomglue.lib) provides stubs to the public frozen functions that XPCOM provides. The library will dynamically load the public symbols from the XPCOM library, producing two important results. First, the component or application will not have to link with XPCOM for any symbol. In fact having to link to any Gecko library after this dynamic loading happens is an immediate indication that something is wrong. Second, if the glue code can load XPCOM, the same glue code can also unload XPCOM. So an embedding application will able to shut down Gecko when it is not needed and to restart it at will.


動的ローディング

glue ライブラリ (xpcomglue.lib) は、XPCOM が供給する凍結された public な関数にスタッブを提供します。ライブラリは XPCOM ライブラリから public な記号を動的にロードし、2 つの重要な結果をもたらします。一つ目としては、記号を得ようと、部品やアプリケーションが XPCOM とリンクする必要がないことです。事実、動的ローディングの発生後に、Gecko ライブラリにリンクしなければいけないとすると、それは、間違いがあることを直ちに示すことになります。二つ目は、glue コードが XPCOM をロードできるなら、同じ glue コードは XPCOM をアンロードもできます。すると、埋め込みアプリケーションは、Gecko を不要な時に閉じ、欲しい時再起動できることになります。


To use this library, you need to initalize the library with the path to the xpcom library proper. If you don't have this path, you can use the default location by passing nsnull:
extern "C"
nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile);

extern "C"
nsresult NS_COM XPCOMGlueShutdown();


このライブラリを使うのには、xpcom ライブラリ本体へのパスでライブラリを初期化する必要があります。このパスがなければ、nsnull を渡すことでデフォルトのロケーションを使用できます:
extern "C"
nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile);

extern "C"
nsresult NS_COM XPCOMGlueShutdown();


The first function sets up these stub functions. If you do not call this function, any call to a public xpcom function will fail. If you do not want this functionaltiy, you can rebuild this library with the flag "XPCOM_GLUE_NO_DYNAMIC_LOADING".

最初の関数はこれらのスタッブ関数を設定します。この関数を呼び出さなければ、public な xpcom 関数の呼び出しは失敗します。この機能を必要としないならば、フラグ "XPCOM_GLUE_NO_DYNAMIC_LOADING" によってこのライブラリを再構築できます。

\(^o^)/

さてそれでは、草稿が完成しましたので、草稿の公開をします。
草稿: XPCOM コンポーネントの再使用



XPCOM Component Reuseを草稿にする-06

2005-05-16 21:42:37 | InTranslated
昨日の続きです。

/*翻訳作業につきましては、本日の作業対象部分のみを以下に表示しておりますが、全体の原文と翻訳文(翻

訳作業が完了している部分まで)は、直下のリンクをご参照ください。*/

原題: XPCOM Component Reuse
訳題: XPCOM コンポーネントの再使用

原文:  青色表示
訳文:  黒色表示
*注記/コメント: 赤色表示

Below is a snapshot of the xpcom includes from an embedding example. Clearly, this embedding example must ship its own copy of XPCOM to maintain compatibility.

埋め込み例から xpcom の include のスナップショットを以下に示します。この埋め込み例は、互換性を維持するのに自分自身の xpcom のコピーを送る必要があります。

Microsoft (R) COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


Dump of file winEmbed.exe

File Type: EXECUTABLE IMAGE

Section contains the following imports:


Microsoft (R) COFF バイナリファイル Dumper バージョン 6.00.8447
版権 (C) マイクロソフト株式会社 1992-1998. 無断転載禁ず


ファイルダンプ winEmbed.exe

ファイルタイプ: EXECUTABLE IMAGE

項目は以下のインポートを含む:


//→以下のコードは省略:冒頭のリンクでご参照ください//

However, linking in the standalone glue library and string library we get something much more reusable:

しかし、スタンドアロンの glue ライブラリやストリング・ライブラリでリンクすれば、もっとはるかに再利用が可能なものを取得できます:

//→以下のコードは省略:冒頭のリンクでご参照ください//

All of these functions are frozen and extern "C". This means that they are unaffected by any changes to the XPCOM library. It is also possible to eliminate these symbols altogether by dynamic loading.

これらの関数のすべては凍結されており、extern "C" です。と言う事は、XPCOM ライブラリへの変更によって影響を受けません。また、動的ローディングによってこれらの記号を一括して削除することができます:

さてさて、もういよいよ明日で草稿が完成しそうです。(^_^)(^_^)(^_^)