ISO/IEC 24824-1:2007 情報技術— ASN.1の一般的なアプリケーション:高速情報セット—パート1: | ページ 3

※一部、英文及び仏文を自動翻訳した日本語訳を使用しています。

導入

この推奨事項 |国際標準は、バイナリ エンコーディング (ASN.1 表記法および ASN.1 エンコーディング制御表記法を使用して指定) を使用した W3C XML 情報セットのインスタンスの表現を指定します。この推奨事項のこの版で指定されているエンコーディング |国際標準はバージョン番号 1 で識別されます (12.9 を参照)

この勧告で規定されている技術 |国際標準は Fast Infoset と呼ばれます。これは、W3C XML 情報セットのインスタンスを表す手段として、W3C XML 構文の代替手段を提供します。この表現は通常、W3C XML 表現よりも小さいエンコード サイズと高速な処理を提供します。

この勧告で指定されている W3C XML 情報セットのインスタンスの表現 |国際標準は高速情報セットドキュメントと呼ばれます。各高速情報セット文書は、W3C XML 情報セットのインスタンスを表す ASN.1 データ型 ( 文書 型 - 7.2 を参照) の抽象値のエンコードです。

この推奨事項 |国際標準では、高速情報セット文書のサイズを最小化し、そのような文書の作成と処理の速度を最大化するいくつかの技術の使用を指定しています。

これらの手法は語彙テーブルの使用に基づいており、これにより、(たとえば) XML 1.0 シリアル化の要素または属性の名前を形成する文字列の代わりに、通常は小さな整数値 (語彙テーブル インデックス) を使用できます。 W3C XML 情報セットのインスタンス。

多数の語彙テーブル (第 8 節を参照) があり、その中で最も基本的なテーブル (8 つの文字列テーブル) は、一般に小さな整数を文字列にマッピングします。ただし、さらなるレベルの間接化を提供する語彙テーブル (要素名テーブルと属性名テーブル) もあり、語彙テーブル インデックスは 3 つの語彙テーブル インデックスのセットにマッピングされ、プレフィックス、名前空間名、そして地元の名前。

もう 1 つの重要なテクニックは、制限されたアルファベット語彙テーブルの使用です。これには、ISO/IEC 10646 文字のサブセットをリストするエントリが含まれます。このテーブルにエントリがある文字列をエンコードする必要がある場合は、この語彙テーブルが使用されていることを識別し、語彙テーブルのインデックスを指定して、各文字を最小ビット数でエンコードすることでエンコードできます。 ISO/IEC 10646 文字の特定のサブセットに必要です。常にこの表の最初のいくつかのエントリを形成する組み込みの制限されたアルファベットが多数あり、日付や時刻、数値などの一般的に発生する文字列をカバーしています。

さらに重要な最適化では、エンコード アルゴリズムの語彙テーブルを使用します。この表は、一般的に発生する文字列に使用できる特殊なエンコーディングを示しており、これも多数の組み込みアルゴリズムを使用しています。たとえば、-32768 ~ 32767 の範囲の整数の 10 進表現に似た文字列がある場合、この語彙テーブルが使用されていることを識別し、語彙テーブルのインデックスを指定してエンコードすることによって、その文字列をエンコードできます。 2 オクテットの符号付き整数としての整数。浮動小数点数とそのような数値の配列も同様にサポートされます。

コンパクトさを犠牲にすることなく高速処理を保証するために、高速情報セット文書の多くのコンポーネント (文字列や XML 情報セットの情報項目を表すコンポーネントなど) はオクテット整列されていますが、他のコンポーネント (長さや語彙テーブルのインデックスなど) はオクテット整列されています。必ずしもオクテットに整列している必要はありませんが、常にオクテットの最後のビットで終了します。これらの最適化されたエンコーディングの正式な仕様を提供するには、ASN.1 エンコーディング制御表記 (ITU-T Rec. X.692 | ISO/IEC 8825-3 で定義) が使用されますが (A.2 を参照)、ECN ツールの使用は困難です。実装は必要なく、エンコーディングの完全な説明が提供されます (付録 C を参照)

特定の高速情報セット文書の語彙テーブルは、文書の先頭の情報によって初期化でき、通常は動的に追加されるため、エンコーダーに柔軟性が提供されます。初期語彙テーブルは、他の特定された高速情報セット文書の最終語彙テーブルのセットを参照することによって (または他の手段によって) 提供できます。この語彙リファレンスは、さらにテーブルを追加して補足し、この文書の初期語彙テーブルを提供できます。通常、ドキュメントの作成または処理中にテーブルにさらに動的な追加が行われます。

最後に、高速インフォセット ドキュメントの生成者に、その形式とセマンティクスの完全な仕様を識別する URI とともに、高速インフォセット ドキュメントのオプションの追加処理に関連するデータ (追加処理データと呼ばれる) を含めるメカニズムが提供されます。追加の処理データ。オプションの追加処理データは、URI が不明な場合、または指定された処理がサポートされていないか不要な場合、高速情報セット文書の後続のプロセッサによって無視されます。

注 —このような追加処理データの例としては、高速インフォセット文書の一部への即時アクセスを可能にするインデックスを提供するデータが挙げられます。これにより、高速インフォセット文書の一部のみに関心がある場合、文書全体を処理する必要がなくなります。特定の XML タグに対応します。

付録 A は、この勧告の不可欠な部分を形成します。国際標準であり、ASN.1 モジュール (ITU-T Rec. X.680 | ISO/IEC 8824-1 を参照) と 2 つの ECN モジュール (EDM および ELM — ITU-T Rec. 8825-3 を参照) が含まれています。抽象コンテンツと、W3C XML 情報セットのインスタンスの値を伝える Document タイプの値のビットレベル エンコーディング。

付属書 B は、この勧告の不可欠な部分を形成します。国際標準であり、高速情報セット ドキュメントを識別する MIME メディア タイプの仕様が含まれています。

付属書 C は、この勧告の不可欠な部分を形成しません。国際標準であり、第 12 条および A.2 で正式に指定されているエンコーディングの完全な説明を提供します。

附属書 D は、この勧告の不可欠な部分を形成するものではありません。国際標準であり、いくつかの XML ドキュメントから生成された高速情報セット ドキュメントの例を提供します。付録 D には、これらの例の XML 表現と Fast Infoset 表現のサイズも示されています。

Introduction

This Recommendation | International Standard specifies a representation of an instance of the W3C XML Information Set using binary encodings (specified using the ASN.1 notation and the ASN.1 Encoding Control Notation). The encoding specified in this edition of this Recommendation | International Standard is identified by the version number 1 (see 12.9).

The technology specified in this Recommendation | International Standard is named Fast Infoset. It provides an alternative to W3C XML syntax as a means of representing instances of the W3C XML Information Set. This representation generally provides smaller encoding sizes and faster processing than a W3C XML representation.

The representation of an instance of the W3C XML Information Set specified in this Recommendation | International Standard is called a fast infoset document. Each fast infoset document is an encoding of an abstract value of an ASN.1 data type (the Document type — see 7.2) representing an instance of the W3C XML Information Set.

This Recommendation | International Standard specifies the use of several techniques that minimize the size of a fast infoset document and that maximize the speed of creating and processing such documents.

These techniques are based on the use of vocabulary tables, which allow typically-small integer values (vocabulary table indexes) to be used instead of character strings that form (for example) the names of elements or attributes in an XML 1.0 serialization of an instance of the W3C XML Information Set.

There are a number of vocabulary tables (see clause 8), of which the most basic (the eight character string tables) map typically-small integers to strings of characters. There are, however, also vocabulary tables (the element name table and the attribute name table) that provide a further level of indirection, with a vocabulary table index mapping to a set of three vocabulary table indexes, identifying a prefix, a namespace name, and a local name.

Another important technique is the use of a restricted alphabet vocabulary table. This contains entries that list a subset of ISO/IEC 10646 characters. If a character string needs to be encoded for which there is an entry in this table, then it can be encoded by identifying that this vocabulary table is being used, giving the vocabulary table index, and then encoding each character in the minimum number of bits needed for that particular subset of ISO/IEC 10646 characters. There are a number of built-in restricted alphabets that always form the first few entries of this table, covering such commonly occurring strings as dates and times, and numeric values.

A further important optimization uses the encoding algorithm vocabulary table. This table identifies specialized encodings that can be employed for commonly occurring strings, again with a number of built-in algorithms. For example, if there is a string which looks like the decimal representation of an integer in the range −32768 to 32767, then that string can be encoded by identifying that this vocabulary table is being used, giving the vocabulary table index, and then encoding the integer as a two-octet signed integer. Floating-point numbers and arrays of such numbers are supported in the same way.

In order to ensure fast processing without sacrificing compactness, many components of a fast infoset document (such as character strings and components representing information items of the XML infoset) are octet-aligned, while other components (such as lengths and vocabulary table indexes) are not necessarily octet-aligned but always end on the last bit of an octet. To provide a formal specification of these optimized encodings, the ASN.1 Encoding Control Notation (defined in ITU-T Rec. X.692 | ISO/IEC 8825-3) is used (see A.2), but use of ECN tools for implementation is not necessary and a complete description of the encoding is provided (see Annex C).

The vocabulary tables for a particular fast infoset document can be initialized by information at the head of the document, and are normally added to dynamically, providing flexibility for an encoder. The initial vocabulary tables can be provided by a reference to the set of final vocabulary tables of some other identified fast infoset document (or by other means). This vocabulary reference can then be supplemented by further table additions to provide the initial vocabulary tables for this document. Further dynamic additions are normally made to the tables during the creation or the processing of the document.

Finally, a mechanism is provided for the generator of a fast infoset document to include data (called additional processing data) related to optional additional processing of the fast infoset document, together with a URI that identifies a complete specification of the form and semantics of that additional processing data. The optional additional processing data is ignored by any subsequent processor of the fast infoset document if the URI is not known, or the processing that it specifies is not supported or not required.

NOTE — An example of such additional processing data would be data that provides indexes that enable immediate access to parts of the fast infoset document, so that the whole document need not be processed if the only interest is in those parts of the fast infoset document that correspond to a specific XML tag.

Annex A forms an integral part of this Recommendation | International Standard, and contains an ASN.1 module (see ITU-T Rec. X.680 | ISO/IEC 8824-1) and two ECN modules (EDM and ELM — see ITU-T Rec. X.692 | ISO/IEC 8825-3) which together specify the abstract content and the bit-level encoding of a value of the Document type, which conveys the value of an instance of the W3C XML Information Set.

Annex B forms an integral part of this Recommendation | International Standard, and contains the specification of a MIME media type identifying a fast infoset document.

Annex C does not form an integral part of this Recommendation | International Standard, and provides a complete description of the encodings formally specified in clause 12 and A.2.

Annex D does not form an integral part of this Recommendation | International Standard, and provides examples of fast infoset documents generated from some XML documents. Annex D also gives the size of the XML representation and the Fast Infoset representation of these examples.