IT翻訳 Nobuyuki の仕事部屋

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

Gecko Info for Windows Accessibility Vendors校正その11

2005-04-29 09:26:18 | InReview
それでは、本日も Gecko 仮面!、・・・・ではなくて、 Mozilla 対 Gecko 仮面 にようこそおいでやす。

Mozilla vs Gecko 仮面


原題: Gecko Info for Windows Accessibility Vendors

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

原文:  青色表示
訳文:  黒色表示
校正文: 赤色表示
校正対象範囲: 黒色太字表示
*n(=int)校正コメント:赤色表示



ISimpleDOMNode

To get to the ISimpleDOMNode interface for an object, you start with an IAccessible*, and then you QueryService to the ISimpleDOMNode*:
IServiceProvider *pServProv = NULL;
pAccessible->QueryInterface(IID_IServiceProvider, (void**)&pServProv);
ISimpleDOMNode *pSimpleDOMNode;
if (pServProv) {
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
HRESULT result = pServProv->QueryService(refguid, IID_ISimpleDOMNode, (void**)&pSimpleDOMNode);
if (SUCCEEDED(hresult) && pSimpleDOMNode != NULL) {
/* This is a Mozilla node! Use special ISimpleDOMNode methods described in ISimpleDOMNode.idl. */
}
}


ISimpleDOMNode

オブジェクト用に ISimpleDOMNode を得るために//→オブジェクトに ISimpleDOMNode インターフェイスを得るには//、IAccessible* から開始して、ISimpleDOMNode* へ QueryService をします:
IServiceProvider *pServProv = NULL;
pAccessible->QueryInterface(IID_IServiceProvider, (void**)&pServProv);
ISimpleDOMNode *pSimpleDOMNode;
if (pServProv) {
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
HRESULT result = pServProv->QueryService(refguid, IID_ISimpleDOMNode, (void**)&pSimpleDOMNode);
if (SUCCEEDED(hresult) && pSimpleDOMNode != NULL) {
/* This is a Mozilla node! Use special ISimpleDOMNode methods described in ISimpleDOMNode.idl.//訳抜け→これは Mozilla ノードです。ISimpleDOMNode.idl. に記述されている特別な ISimpleDOMNode メソッドを使用してください// */
}
}


The get_nodeInfo method is used to get basic information about a node such as the tag name and namespace ID, node type (see ISimpleDOMNode.idl for definitions), node value (text held in the node), a unique ID for use in tracking where events occur, and the number of children. The namespace ID is meaningless until you get the namespace URI for it, through the ISimpleDOMDocument interface (see below).
HRESULT get_nodeInfo(
/* [out] */ BSTR *nodeName, // For elements, this is the tag name
/* [out] */ short *nameSpaceID,
/* [out] */ BSTR *nodeValue,
/* [out] */ unsigned int *numChildren,
/* [out] */ unsigned int *uniqueID, // see description of unique ID's in above section on events
/* [out] */ unsigned short *nodeType);


タグの名前、名前スペース ID、ノードタイプ(定義は ISimpleDOMNode.idl を参照)、ノード値(ノードに保持されるテキスト)、イベントの起こる場所や子の数を追跡するのに使われる一意の ID などのノードについて基本的情報を取得するために、get_nodeInfo が使用されます//→get_nodeInfo メソッドを使って、基本的情報を取得します。使用されるタグの名前、名前スペース ID、ノードタイプ(定義は ISimpleDOMNode.idl を参照)、ノード値(ノードに保持されるテキスト)、イベントの起こる場所を追跡するのに使う一意の ID 、子の数などの情報です//。ISimpleDOMDocument インターフェイス(下記を参照)通じて、ID 用に名前スペース URI を取得しないうちは、名前スペース ID は意味を持ちません//→によって、ID 用に名前スペース URI を取得して初めて、名前スペース ID は意味を持ちます//
HRESULT get_nodeInfo(
/* [out] */ BSTR *nodeName, // これはエレメント用にの//→の//タグの名前である。
/* [out] */ short *nameSpaceID,
/* [out] */ BSTR *nodeValue,
/* [out] */ unsigned int *numChildren,
/* [out] */ unsigned int *uniqueID, // イベントについての上記項目にある一意の ID の説明を参照のこと。
/* [out] */ unsigned short *nodeType);


The get_attributes method returns the set of attribute, value pairs for a given node, as well as the namespace ID for each attribute. The return value numAttribs specifies the number of attributes for this node, and the last 3 parameters return 3 arrays corresponding to attribute name, namespace ID, and attribute value.
HRESULT get_attributes(
/* [in] */ unsigned short maxAttribs,
/* [out] */ BSTR *attribNames,
/* [out] */ short *nameSpaceID,
/* [out] */ BSTR *attribValues,
/* [out] */ unsigned short *numAttribs);


get_attributes メソッドは各属性用の名前スペース ID に加えて、任意のノード用に属性と値のペアの組合せを返します。返された値の numAttribs はこのノード用に属性の数を決め、最後の 3 個のパラメーターは、属性、名前スペース ID 、属性値に対応する三つの配列を返します。
HRESULT get_attributes(
/* [in] */ unsigned short maxAttribs,
/* [out] */ BSTR *attribNames,
/* [out] */ short *nameSpaceID,
/* [out] */ BSTR *attribValues,
/* [out] */ unsigned short *numAttribs);


A variation on this method is get_attributesForNames, which lets turns the attribNames array into an [in] parameter, letting you specify only those attributes you're interested in. This helps minimize the cost of marshalling for those times in which you're interested in only a few attributes per node.
HRESULT get_attributesForNames(
/* [in] */ unsigned short numAttribs,
/* [in] */ BSTR __RPC_FAR *attribNames,
/* [in] */ short __RPC_FAR *nameSpaceID,
/* [out] */ BSTR __RPC_FAR *attribValues);


このメソッドの仲間のひとつは get_attributesForNames であり、興味のある属性だけを決定させることで、このメソッドは attribNames 配列をパラメーターへと変えさせます//→関心のある属性だけを決定させることで、このメソッドは attribNames の配列を [in] パラメーターへと変えさせます//。この事は、ノードあたり興味のあった属性の//→関心のあるごくわずかな属性の//回数分のみで済むので、マーシャリングのコストを最小限に抑えます。
HRESULT get_attributesForNames(
/* [in] */ unsigned short numAttribs,
/* [in] */ BSTR __RPC_FAR *attribNames,
/* [in] */ short __RPC_FAR *nameSpaceID,
/* [out] */ BSTR __RPC_FAR *attribValues);


長い節なので、続きはまた明日にします。フーツ・・・・・