Network Working Group                                           J. Boyer
Request for Comments: 3653                            PureEdge Solutions
Category: Informational                                        M. Hughes
                                                         Betrusted, Inc.
                                                               J. Reagle
                                                                     W3C
                                                           December 2003
        
                     XML-Signature XPath Filter 2.0
        

Status of this Memo

このメモの位置付け

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

このメモはインターネットコミュニティのための情報を提供します。それはどんな種類のインターネット標準を指定しません。このメモの配布は無制限です。

Copyright Notice

著作権表示

Copyright (C) The Internet Society (2003). All Rights Reserved.

著作権(C)インターネット協会(2003)。全著作権所有。

Abstract

抽象

XML Signature recommends a standard means for specifying information content to be digitally signed and for representing the resulting digital signatures in XML. Some applications require the ability to specify a subset of a given XML document as the information content to be signed. The XML Signature specification meets this requirement with the XPath transform. However, this transform can be difficult to implement efficiently with existing technologies. This specification defines a new XML Signature transform to facilitate the development of efficient document subsetting implementations that interoperate under similar performance profiles.

XML署名は、デジタル署名される情報の内容を特定するため、およびXMLで得られたデジタル署名を表現するための標準的な手段をお勧めします。一部のアプリケーションは、署名される情報の内容として指定されたXML文書のサブセットを指定する機能が必要です。 XML署名仕様は、XPathと、この要件変換を満たしています。ただし、変換これは、既存の技術で効率的に実装するのが困難な場合があります。この仕様は、同様のパフォーマンスプロファイルの下で相互運用効率的な文書のサブセットの実装の開発を容易にするために、新しい変換XML署名を定義します。

This document is the W3C XML Signature XPath-Filter 2.0 Recommendation. This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

この文書は、W3C XML署名のXPathフィルター2.0勧告です。この文書は、W3C会員およびその他の利害関係者によってレビューされ、ディレクターによってW3C勧告として公布されました。安定した文書であり、参考資料として使用したり、他の文書から規範的参照として引用されてもよいです。勧告の作成におけるW3Cの役割は、仕様に注意を引き、その広範な普及を促進することです。これは、Webの機能性と相互運用性を強化します。

Table of Contents

目次

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . .  2
       1.1.  Acknowledgements (Informative) . . . . . . . . . . . .  4
       1.2.  W3C Status . . . . . . . . . . . . . . . . . . . . . .  4
   2.  Terminology. . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  Specification of Signature Filter Transform. . . . . . . . .  5
       3.1.  Algorithm Identifier . . . . . . . . . . . . . . . . .  5
       3.2.  Syntax of Signature Filter Transform . . . . . . . . .  5
       3.3.  Input and Evaluation Context of Signature Filter
             Transform. . . . . . . . . . . . . . . . . . . . . . .  7
       3.4.  Processing Model of Signature Filter Transform . . . .  7
   4.  Examples of Signature Filter Transform . . . . . . . . . . .  9
   5.  Normative References . . . . . . . . . . . . . . . . . . . . 13
   6.  Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 14
   7.  Full Copyright Statement . . . . . . . . . . . . . . . . . . 15
        
1. Introduction
1. はじめに

The XML Recommendation [XML] specifies the syntax of a class of objects called XML documents. The Namespaces in XML Recommendation [XML-NS] specifies additional syntax and semantics for XML documents. The XML Signature Recommendation [XML-DSig] defines standard means for specifying information content to be digitally signed, including the ability to select a portion of an XML document to be signed using an XPath transform.

XML勧告[XML]は、XML文書と呼ばれるオブジェクトのクラスの構文を指定します。 XML勧告[XML-NS]で名前空間は、XML文書のための追加的な構文とセマンティクスを指定します。 XML署名勧告[XML-DSIG]はデジタルのXPath変換を使用して署名されるXML文書の一部を選択する能力を含め、署名対象情報の内容を指定するための標準的な手段を規定します。

This specification describes a new signature filter transform that, like the XPath transform [XML-DSig, section 6.6.3], provides a method for computing a portion of a document to be signed. In the interest of simplifying the creation of efficient implementations, the architecture of this transform is not based on evaluating an [XPath] expression for every node of the XML parse tree (as defined by the [XPath] data model). Instead, a sequence of XPath expressions is used to select the roots of document subtrees -- location sets, in the language of [XPointer] -- which are combined using set intersection, subtraction and union, and then used to filter the input node-set. The principal differences from the XPath transform are:

この仕様は、新しいシグネチャフィルタは、その変換について説明し、XPathは[XML-DSIG、セクション6.6.3]を変換するように、署名されるべき文書の部分を計算するための方法を提供します。効率的なインプリメンテーションの作成を簡素化の利益のために、この変換のアーキテクチャは、([XPathの】データモデルによって定義されるような)XMLの構文解析ツリーのすべてのノードのために【のXPath]式の評価に基づいていません。 【のXPointer]の言語では、位置セット - - 代わりに、XPath式の順序は、文書のサブツリーのルートを選択するために使用されるセット交差点、減算および組合を使用して結合し、次に入力をフィルタリングするために使用されるリンパ節転移セットする。変換のXPathからの主な違いは次のとおりです。

* A sequence of XPath operations can be executed in a single transform, allowing complex filters to be more easily expressed and optimized. * The XPath expressions are evaluated against the input document resulting in a set of nodes, instead of being used as a boolean test against each node of the input node-set.

* XPathの動作のシーケンスは、複素フィルタをより容易に発現され、最適化されることを可能にする、変換単一で実行することができます。 * XPath式ではなく、入力ノードセットの各ノードに対してブーリアンテストとして用いることが、ノードのセットをもたらす入力ドキュメントに対して評価されます。

* To increase efficiency, the expansion of a given node to include all nodes having the given node as an ancestor is now implicit so it can be performed by faster means than the evaluation of an XPath expression for each document node. * The resulting node-sets can be combined using the three fundamental set operations (intersection, subtraction, and union), and then applied as a filter against the input node-set, allowing operations such as signing an entire document except for a specified subset, to be expressed more clearly and efficiently.

*効率を高めるために、先祖として指定されたノードを有するすべてのノードを含むように指定されたノードの拡張は、現在暗黙的であるので、各文書ノードのXPath式の評価よりも高速な手段によって行うことができます。 *得られたノードセットは、3つの基本的な集合演算(交差点、減算、及び組合)を用いて合成し、その後、指定されたサブセットを除く文書全体を署名するなどの操作を可能にする、入力ノードセットに対するフィルタとして適用することができます、より明確にかつ効率的に発現されます。

As with the original XPath transform, the primary purpose of this transform is to ensure that only specifically defined changes to the input XML document are permitted after the signature is affixed. This can be done by excluding precisely those nodes that are allowed to change once the signature is affixed, and including all other input nodes in the output. It is the responsibility of the signature filter transform author to ensure that nodes are not excluded which could affect the interpretation of the transform output in the application context.

オリジナルのXPathと同様に、この変換の主な目的は、署名が固定された後に入力されたXML文書に対してのみ特異的に定義された変更が許可されていることを確認することで、変換。これは、署名が貼付された後に変更することが許可されて正確にそれらのノードを除く、出力内の他のすべての入力ノードなどによって行うことができます。署名フィルタの責任ノードがアプリケーションコンテキスト内変換出力の解釈に影響を与える可能性が排除されないことを保証するために、著者の変換です。

Consider the motivating scenario where an application wishes to affix two enveloped signatures to the document; any other change to the document must cause the signatures to be invalid. When the application creates the first signature that signature is automatically omitted from its own digest calculations. However, it will also be necessary to exclude the subsequent (second) signature element from the digest calculations of the first signature. This specification can be used to efficiently satisfy this requirement using the set subtraction operation.

アプリケーションがドキュメントへの2人のエンベロープ署名を添付することを望む動機シナリオを考えます。文書に対するその他の変更は、署名は無効にさせる必要があります。アプリケーションが署名が自動的にそれ自身のダイジェスト計算から省略されている最初の署名を作成します。しかし、また、最初の署名のダイジェスト計算から後続の(第2)の署名要素を除外することが必要であろう。この仕様は、効率的に設定された減算演算を使用して、この要件を満たすために使用することができます。

This transform also supports the ability to specify a set of nodes that will be included in a signature, with all non-specified nodes being excluded. This formulation is useful for isolating a portion of a document, such as a chapter of a document, or a payload in a protocol message, and can be expressed using the set intersection operation.

これはまた、変換、すべての非指定されたノードが除外された状態で、署名に含まれるノードのセットを指定する機能をサポートしています。この製剤は、文書の章、またはプロトコルメッセージ内のペイロードとして、文書の一部を単離するのに有用であり、積集合演算を使用して発現させることができます。

Complete familiarity with the first XML Signature XPath Transform [XML-DSig, section 6.6.3] is required.

最初のXML署名のXPathと完全に慣れ[XML-DSIG、セクション6.6.3]を変換が必要です。

NOTE: Since XPath Filter 2.0 depends on details of XPath, be sure to take into account the XPath Errata at <http://www.w3.org/1999/11/REC-xpath-19991116-errata>.

注:XPathのフィルター2.0は、XPathの詳細に依存するので、<http://www.w3.org/1999/11/REC-xpath-19991116-errata>に口座にXPathのエラッタを取るようにしてください。

1.1. Acknowledgements (Informative)
1.1. 謝辞(参考情報)

The following people provided valuable feedback that improved the quality of this specification:

次の人は、この仕様書の品質を改善し、貴重なフィードバックを提供します:

* Christian Geuer-Pollmann, Universitat Siegen * Donald Eastlake, 3rd, Motorola * Gregor Karlinger, IAK TU Graz * Aleksey Sanin

*キリスト教のGeuer-Pollmann、ジーゲン*ドナルドイーストレイクの大学、第三、モトローラ*グレゴールKarlinger、ILC TUグラーツ*アレクセイ・山陰

1.2. W3C Status
1.2. W3Cステータス

The World Wide Web Consortium Recommendation corresponding to this RFC is at:

このRFCに対応したWorld Wide Web Consortium(W3C)の勧告はです:

http://www.w3.org/TR/xmldsig-filter2/

hっtp://wっw。w3。おrg/TR/xmldしgーふぃlてr2/

2. Terminology
2.用語

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [Keywords].

この文書のキーワード "MUST"、 "MUST NOT"、 "REQUIRED"、、、、 "べきではない" "べきである" "ないもの" "ものとし"、 "推奨"、 "MAY"、および "OPTIONAL" はありますBCP 14、RFC 2119 [キーワード]で説明されるように解釈されます。

The XPath 1.0 Recommendation [XPath] defines the term node-set as "(an unordered collection of nodes without duplicates)" and specifies a data model for representing an input XML document as a set of nodes of various types (element, attribute, namespace, text, comment, processing instruction, and root).

XPath 1.0の勧告[XPathの「(重複なしのノードの順序付けられていないコレクション)」という用語セットノードを定義し、様々なタイプ(要素、属性のノードの集合として、入力XML文書を表現するためのデータ・モデルを指定し、名前空間、テキスト、コメント、処理命令、およびルート)。

An input document is the document that contains all the nodes available to processing by this transform. A document subset is a portion of an XML document indicated by an XPath node-set, which may not include all of the nodes in the document. For example, the input node-set is a collection of XPath nodes from the input document that is passed as a parameter to this transform. A subtree rooted by a given node is a document subset containing the given node and every node having the given node as an ancestor. Subtree expansion is the process of expanding a node-set to include all subtrees rooted at any node in the node-set. For example, the subtree expansion of a node-set consisting of just a single element node would be a node-set containing that element, its attribute nodes, namespace nodes, and all its descendants including their attribute nodes and namespaces nodes.

入力された文書は、この変換による処理へのすべてのノードが利用可能に含まれているドキュメントです。文書のサブセットは、文書内のノードのすべてを含まなくてもよいのXPathノード集合、で示されるXML文書の一部です。例えば、入力ノードセットは、この変換にパラメータとして渡された入力ドキュメントからのXPathノードの集合です。所与のノードによってルートとするサブツリーは、所与のノードと祖先として指定されたノードを有するすべてのノードを含む文書のサブセットです。サブツリー拡張は、ノードセット内の任意のノードをルートとするサブツリーのすべてを含むようにノードセットを拡張するプロセスです。例えば、ただ1つの要素ノードからなるノード集合のサブツリー膨張は、その要素を含むノード集合、その属性ノード、名前空間ノード、及びそれらの属性ノードと名前空間ノードを含むすべての子孫であろう。

The XML Signature Recommendation [XML-DSig] defines a reference as a sequence of steps performed to obtain an octet stream to be digitally signed. A transform is an identified algorithm to be used as a step in the reference processing model. A transform takes an octet stream or XPath node-set as input, and it produces an octet stream or XPath node-set as output (the reference processing model automatically converts the final output to an octet stream if it is an XPath node-set).

XML署名勧告[XML-DSIG]はデジタル署名されるべきオクテットのストリームを得るために実行されるステップのシーケンスとして参照を定義します。変換は、参照処理モデルのステップとして使用する同定アルゴリズムです。 A変換入力としてオクテットストリームまたはXPathノードセットを取り、それは(それがXPathノードセットである場合、参照処理モデルを自動的オクテットストリームに最終的な出力に変換)出力としてオクテットストリームまたはXPathノードセットを生成します。

3. Specification of Signature Filter Transform
署名フィルタの3仕様変換します

The transform operates by computing a node-set that is used to filter the input node-set: The output node-set consists of only those nodes in both the input node-set and the filter node-set. In other words, the output node-set is the intersection of the input node-set and the computed filter node-set.

変換入力ノードセットをフィルタリングするために使用されるノードセットを計算することによって動作する出力ノードセットは、入力ノードセットおよびフィルタノードセットの両方においてのみそれらのノードから構成されています。換言すれば、出力ノードセットは、入力されたノードセットと計算フィルタノード集合との交点です。

The filter node-set is computed by evaluating a sequence of XPath expressions and combining their results. A node-set is initially computed containing the entire input document. In sequence, each XPath expression is then evaluated, subtree-expanded, and then used to transform the filter node-set according to a specified set operation; intersection, subtraction, or union. After all XPaths have been applied, the resulting node-set is used as the filter node-set.

フィルタノードセットは、XPath式の配列を評価し、それらの結果を組み合わせることによって計算されます。ノード集合は、最初に全体の入力文書を含む計算されます。シーケンスにおいて、各XPath式は、その後、評価されるサブツリー膨張、及び、フィルタノードセット指定された一連の操作に応じて変換するために使用されます。交差点、減算、または共用。全てのXPathが適用された後、得られたノードセットは、フィルタノードセットとして使用されています。

3.1. Algorithm Identifier
3.1. アルゴリズム識別子

The XML Signature Recommendation [XML-DSig] uses a [URI] to identify each algorithm to be performed when creating or validating a signature. The signature filter transform is identified as follows:

XML署名勧告[XML-DSIG]は署名を作成したり検証時に実行すべき各アルゴリズムを識別するために、[URI]を使用します。次のように署名フィルター変換が識別されます。

Algorithm Identifier http://www.w3.org/2002/06/xmldsig-filter2

アルゴリズム識別子http://www.w3.org/2002/06/xmldsig-filter2

3.2. Syntax of Signature Filter Transform
3.2. 署名フィルターの構文変換

The signature filter transform shall be represented by a sequence of one or more elements named XPath. The content of XPath is character data containing an XPath expression. The XPath has an attribute named Filter whose possible values are intersect, subtract, and union. The Filter attribute indicates the set operation that is performed with the resulting node-set when computing the filter node-set. The following is an example of markup for a signature filter that signs the entire input node-set except for elements with identifier foo and bar (and all nodes with one of those elements as an ancestor):

フィルタ変換署名は、XPathという名前の1つの以上の要素の配列によって表されるものとします。 XPathの内容は、XPath式を含む文字データです。 XPathは、その可能性のある値、交差引く、そして組合されているという名前の属性フィルターを持っています。フィルタ属性は、フィルタノード集合を計算するとき、得られたノードセットを用いて実施される集合演算を示します。以下は、識別子fooとbarを有する要素を除いた全入力ノードセット(および祖先のようなそれらの要素の1つとすべてのノード)を署名署名フィルタのマークアップの一例です。

<XPath Filter="subtract" xmlns="http://www.w3.org/2002/06/xmldsig-filter2"> id("foo bar")

<XPathのフィルタ= "減算" のxmlns = "http://www.w3.org/2002/06/xmldsig-filter2"> ID( "FOOバー")

</XPath>

</ XPathの>

Schema Definition:

スキーマ定義:

<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE schema

<?xml version = "1.0" エンコード= "UTF-8"?> <!DOCTYPEスキーマ

PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" [ <!ATTLIST schema xmlns:xf CDATA #FIXED 'http://www.w3.org/2002/06/xmldsig-filter2'> <!ENTITY xf 'http://www.w3.org/2002/06/xmldsig-filter2'> <!ENTITY % p ''> <!ENTITY % s ''> ]>

!PUBLIC " - // W3C // DTD XMLスキーマ200102 // EN" "http://www.w3.org/2001/XMLSchema.dtd" [<ATTLISTスキーマのxmlns:XF CDATA #FIXED「のhttp:// WWW。 w3.org/2002/06/xmldsig-filter2' > <!ENTITY XF 'http://www.w3.org/2002/06/xmldsig-filter2'> <!ENTITY%以下のP ''> <!ENTITY%sの''>]>

<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/06/xmldsig-filter2" targetNamespace="http://www.w3.org/2002/06/xmldsig-filter2" version="0.1" elementFormDefault="qualified">

<スキーマのxmlns = "http://www.w3.org/2001/XMLSchema" のxmlns:XF = "http://www.w3.org/2002/06/xmldsig-filter2" のtargetNamespace = "のhttp:// WWW .w3.org / 2002/06 / XMLDSIG-フィルタ2" バージョン= "0.1" のelementFormDefault = "資格">

<element name="XPath" type="xf:XPathType"/>

<要素名= "XPathの" タイプ= "XF:XPathType" />

<complexType name="XPathType"> <simpleContent> <extension base="string"> <attribute name="Filter"> <simpleType> <restriction base="string"> <enumeration value="intersect"/> <enumeration value="subtract"/> <enumeration value="union"/> </restriction> </simpleType> </attribute> </extension> </simpleContent> </complexType>

<complexTypeの名前= "XPathType"> <simpleContentを> <拡張ベース= "文字列"> <属性名= "フィルタ"> <単純> <制限ベース= "文字列"> <列挙値= "交差" /> <列挙値= "減算" /> <列挙値= "組合" /> </制限> </ simpleTypeの> </属性> </拡張> </ simpleContentを> </ complexTypeの>

</schema>

</スキーマ>

DTD:

DTD:

<!ELEMENT XPath (#PCDATA) > <!ATTLIST XPath Filter (intersect|subtract|union) #REQUIRED >

<!ELEMENTのXPath(#PCDATA)> <!ATTLISTのXPathのフィルター(交差|差し引く|組合)#REQUIRED>

3.3. Input and Evaluation Context of Signature Filter Transform
3.3. 署名フィルタの入力と評価コンテキスト変換

The input required by this transform is an XPath node-set over the input document. If the input document is an octet stream, then the application MUST convert the octet stream to an XPath node-set that contains all of the document nodes (including comment nodes). The evaluation context for the XPath expressions in the filter transform will be:

この変換に必要な入力は、XPathノードセット入力文書上にあります。入力文書は、オクテットストリームである場合、アプリケーションは、(コメントノードを含む)文書ノードの全てが含まれているXPathノードセットをオクテットのストリームを変換しなければなりません。フィルタ内のXPath式変換の評価コンテキストは次のようになります。

* A context node equal to the root node of the document whose node-set was provided as input to this transform. The root node is the parent of the document element and any comment and processing instruction nodes outside of the document element. * A context position, initialized to 1. * A context size, initialized to 1. * A library of functions equal to the function set defined in [XPath] plus a function named here(). * A set of variable bindings. No means for initializing these is defined. Thus, the set of variable bindings used when evaluating the XPath expression is empty, and use of a variable reference in the XPath expression results in an error. * The set of namespace declarations in scope for the XPath element.

ノードセットこの変換への入力として提供された文書のルートノードに等しい*コンテキストノード。ルートノードは、文書要素と文書要素の外のコメント、処理命令ノードの親です。 * 1に初期化コンテキストの位置、* 1に初期化コンテキストサイズ、* [たXPath]で定義された関数セットプラスここという名前の関数()に等しい関数のライブラリ。 *変数バインディングのセット。これらを初期化する手段が定義されていません。したがって、XPath式を評価するときに使用される変数バインディングのセットは空であり、XPath式における変数参照を使用することは、エラーが生じます。 * XPathの要素のスコープ内の名前空間宣言のセット。

The function here() is defined as follows:

次のようにここでの関数は、()に定義されます。

Function: node-set here()

機能:ノードセット(ここでは)

The here() function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression. In this transform, this will be the XPath element. This expression results in an error if the containing XPath expression does not appear in the same XML document against which the XPath expression is being evaluated.

ここで()関数は、属性または処理命令ノード、または直接XPath式を担うテキストノードの親要素を含むノードセットを返します。この変換では、これは、XPath要素になります。含むXPath式は、XPath式が評価され、これに対して、同じXMLドキュメントに表示されない場合、この式はエラーになります。

3.4. Processing Model of Signature Filter Transform
3.4. 署名フィルターの処理モデルは、トランスフォーム

Using the aforementioned evaluation context, the signature filter transform evaluates the XPath expressions appearing in the character content of the XPath elements and uses these to compute a filter node-set F, which is then used to filter the input node-set I resulting in an output node-set O:

前述の評価コンテキストを使用して、署名のフィルタ変換はXPathの要素の文字内容に登場するXPath式を評価し、私は、その結果、入力ノードセットをフィルタリングするために使用されるフィルタノード集合Fを計算するためにこれらを使用して出力ノードセットO:

* Initialize the filter node-set F to consist of all nodes in the input document. * Iterate through each XPath expression, X, in sequence, and update the filter node-set F as follows: o Evaluate the XPath expression X. The result is a node-set S. o Compute the set S' consisting of all nodes in the input document that are either present in S or that have an ancestor in S. This is equal to the union of all the document subtrees rooted by a node in S. o If the Filter attribute value is intersect, then compute the intersection of the selected subtrees, S', with the filter node-set F. The result will include only those nodes that are in both the filter node-set and the selected subtrees: F' = F INTERSECT S'. o If the Filter attribute value is subtract, then compute the subtraction of the selected subtrees, S', from the filter node-set F. The result will include only those nodes that are in the filter node-set, but not the selected subtrees: F' = F - S'. o Otherwise, if the Filter attribute value is union, then compute the union the selected subtrees, S', with the filter node-set F. The result will include all those nodes that are in either the filter node-set, the selected subtrees, or both: F' = F UNION S'. o Update the filter node-set F to be the new node-set F'. * Finally, after applying all the XPath expressions, compute the output node-set O to be the intersection of the computed filter node-set, F, with the input node-set, I. The result will include all nodes from the input node-set that are also in the filter node-set: O = I INTERSECT F. * An empty input node-set will always result in an empty output node-set.

*入力文書内のすべてのノードで構成するフィルタノード集合Fを初期化します。 *シーケンスで、各XPath式、Xを反復処理し、フィルタノード集合Fを更新次のようにすべてのノードからなるO XPath式Xを評価した結果が計算Oノード集合Sである集合S」いずれかのS内に存在するか、またはこれは、フィルタの属性値が交差する場合、その後の交点を計算oをS.内のノードによってルートと全ての文書のサブツリーの和に等しいS.における祖先を有する入力文書= F INTERSECT S」:「Fフィルタノード集合Fで結果がフィルタノードセット及び選択されたサブツリーの両方にあるノードだけが含まれ、」選択されたサブツリー、S。フィルター属性値が減算されている場合は、O、結果は、フィルタノードセットにあるノードだけではなく、選択されたサブツリーを含むフィルタノード集合Fから、選択されたサブツリー、S」の減算を計算します:F '= F - S'。 Oそうでない場合、フィルタ属性値が組合である場合、選択されたサブツリー和集合を計算し、S」、フィルタノードセットFで結果がいずれかのフィルタ・ノード・セット内のすべてのこれらのノード、選択されたサブツリーを含むであろう、または両方:F '= F UNION S'。 Oフィルタノード集合Fは、新しいノードセットF」であることを更新します。 *最後に、すべてのXPath式を適用した後、計算されたフィルタノード集合、Fの交差点であると、出力ノードセットOを計算し、入力ノードセットと、I.結果は、入力ノードからすべてのノードを含みますフィルタノード集合にも記載されてい-setは:O = Iは、空の入力ノードセットは常に空の出力ノード集合をもたらす* F.と交差します。

In this processing model, the conversion from a subtree interpretation of the XPath expressions to a node-set containing all nodes that must be used during the set operation, along with actual performance of the set operation, is described explicitly. Implementors SHOULD observe that it is possible to compute the effective result of this operation in a single pass through the input document without performing subtree expansion or any set operations:

この処理モデルでは、セット動作の実際の性能とともに、セット動作中に使用されなければならないすべてのノードを含むノードセットにXPath式のサブツリーの解釈からの変換は、明示的に記載されています。実装者は、サブツリー拡張または任意設定操作を行うことなく、入力された文書を単一のパスでこの操作の効果的な結果を計算することが可能であることを確認する必要があります。

* For each XPath expression X, in sequence, evaluate the expression and store the resulting node-set, S, along with the associated set operation. * Prepend a node-set consisting of just the document node, along with the operation union. * Create a new, empty filter node-set. * Process each node in the input node-set document, adding each node to the output node-set F if a flag Z is true. The flag is computed as follows: o Z is true if and only if the node is present in any subtree-expanded union node-set and all subsequent subtree-expanded intersect node-sets but no subsequent subtree-expanded subtract node-sets, or false otherwise. If there are no subsequent intersect or subtract node-sets, then that part of the test is automatically passed. o Presence in a subtree-expanded node-set can be efficiently determined without actually expanding the node-set, by simply maintaining a stack or count that identifies whether any nodes from that node-set are an ancestor of the node being processed.

*各XPath式Xの場合、配列は、発現を評価し、関連するセット動作に伴って、結果として得られるノード集合、Sを格納します。 *操作組合とともに、単に文書のノードからなるノードセットを付加します。 *新しい空のフィルタノードセットを作成します。 *プロセス入力ノードセットされた原稿の各ノード、フラグZが真である場合、出力ノードセットFの各ノードを追加します。 Zがあれば真であるOおよびノー​​ドは、任意のサブツリー展開組合ノードセットと後続のすべてのサブツリー拡張ノードセットが、後続のサブツリー展開減算ノードセット交差中に存在する場合にのみ、または:フラグは次のように計算されます。そうでない場合はfalse。後続交差または減算ノードセットが存在しない場合、テストの一部が自動的に渡されます。 Oサブツリー拡張ノードセット中の存在を効率良く、単にそのノード集合からの任意のノードが処理されているノードの祖先であるかどうかを識別するスタックまたはカウントを維持することによって、実際にノードセットを拡大することなく決定することができます。

Implementers MAY further observe that, if this transform is followed by a canonicalization operation (e.g., [XML-C14N]), the described filter computation can be efficiently commingled with the document-order canonicalization processing.

この変換は、正規化操作(例えば、[XML-C14N])が続く場合、実装はさらに、それを観察することができる、記載のフィルタ演算を効率的に文書次正規化処理と混合することができます。

4. Examples of Signature Filter Transform
署名フィルタの4例は、変換します

The example below illustrates one way to create an enveloped signature with the signature filter transform. The function here() identifies the XPath element, and the subsequent location path obtains the nearest ancestor Signature element. Due to the subtract value of the Filter attribute, the output of the signature filter transform is a node-set containing every node from the input node-set except the nodes in the subtree rooted by the Signature element containing the example signature filter transform below.

以下の例では、変換シグニチャフィルタとエンベロープ署名を作成する1つの方法を示しています。ここで関数は、()のXPath要素を識別し、後続のロケーションパスは、最も近い祖先署名要素を取得します。フィルタ属性の減算値に、シグネチャフィルタの出力変換は、例えば、署名フィルタは、以下の変換を含むSignature要素によってルートとするサブツリーのノードを除いて、入力ノードセットからすべてのノードを含むノードセットです。

<XPath Filter="subtract" xmlns="http://www.w3.org/2002/06/xmldsig-filter2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> here()/ancestor::dsig:Signature[1] </XPath>

<XPathのフィルタ= "減算" のxmlns = "http://www.w3.org/2002/06/xmldsig-filter2" のxmlns:DSIG = "http://www.w3.org/2000/09/xmldsig#" >ここで()/祖先:: DSIG:署名[1] </ XPathの>

A suitable signature reference URI to use with this subtract filter would be URI="" (the entire signature document, without comments), URI="#xpointer(/)" (the entire signature document, with comments) or any same-document reference that includes the signature itself.

この減算フィルタで使用するのに適した署名参照URIは、URI =「」(コメント無し全体署名文書)、URI =「#1のXPointer(/)」(全体署名文書、コメント付き)、または任意同じ文書であろう署名自体を含む参照。

An example of an intersect filter is a signature that co-signs another signature. In this example, a Signature element identified by PrimaryBorrowSig must be signed. The XPath expression obtains the element node, and the transform expands the output node-set to contain all nodes from the input node-set that are also in the subtree rooted by the element node.

交差フィルタの例は、別の署名徴候を共同署名です。この例では、PrimaryBorrowSigによって識別Signature要素は、署名されなければなりません。 XPath式は、要素ノードを取得し、変換出力ノードセット要素ノードによってルートとするサブツリーでもある入力ノード集合からすべてのノードを含むように拡張します。

<XPath Filter="intersect" xmlns="http://www.w3.org/2002/06/xmldsig-filter2"> id("PrimaryBorrowerSig") </XPath>

<のXPathフィルタ= "交差" のxmlns = "http://www.w3.org/2002/06/xmldsig-filter2"> ID( "PrimaryBorrowerSig")</ XPathの>

This type of intersect filter is useful for efficiently signing subsets of a document, whether this is the same document as the signature or an external document. For example, if the signature reference URI is URI="document.xml", then this document will be automatically parsed and just the identified element and its descendants will be signed.

交差フィルタのこのタイプは、これが署名又は外部の文書と同じ文書であるかどうかを、文書の効率的な署名のサブセットのために有用です。署名参照URIがURI =「document.xml」である場合、例えば、この文書は自動的に解析され、単に識別された要素とその子孫が署名されます。

Union filters, by themselves are of no particular use: The initial filter node-set consists of the entire input document; any union with this will have no effect, so the output of the transform will be identical to the input. The union operation is intended to follow a subtract operation, to allow a subtree to be removed, with the exception of a lower subtree which is still included in the output.

連合フィルタは、自分自身でありません特に有用である:初期フィルタノードセットが全体の入力文書で構成されています。これですべての労働組合は効果がありませんので、変換の出力は、入力と同じになります。組合動作は、減算操作に従うことを依然として出力に含まれている下のサブツリーを除いて、サブツリーを除去することを可能にすることを意図しています。

Consider the following document which contains a same-document enveloped signature reference with an XPath filter containing three

3つ含有するXPathフィルタと同じ文書エンベロープ署名の参照を含む、以下の文書を検討

XPath operations:

XPathの操作:

<Document> <ToBeSigned> <!-- comment --> <Data /> <NotToBeSigned> <ReallyToBeSigned> <!-- comment --> <Data /> </ReallyToBeSigned> </NotToBeSigned> </ToBeSigned> <ToBeSigned> <Data /> <NotToBeSigned> <Data /> </NotToBeSigned> </ToBeSigned> <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2"> <dsig:SignedInfo> ... <dsig:Reference URI=""> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"> <dsig-xpath:XPath Filter="intersect"> //ToBeSigned </dsig-xpath:XPath> <dsig-xpath:XPath

<ドキュメント> <ToBeSigned> <! - コメント - > <データ/> <NotToBeSigned> <ReallyToBeSigned> <! - コメント - > <データ/> </ ReallyToBeSigned> </ NotToBeSigned> </ ToBeSigned> <ToBeSigned > <データ/> <NotToBeSigned> <データ/> </ NotToBeSigned> </ ToBeSigned> <DSIG:署名のxmlns:DSIG = "http://www.w3.org/2000/09/xmldsig#" のxmlns:dsig- XPathの= "http://www.w3.org/2002/06/xmldsig-filter2"> <DSIG:たSignedInfo> ... <DSIG:参考URI = ""> <DSIG:変換します> <DSIG:アルゴリズムをトランスフォーム= "http://www.w3.org/2002/06/xmldsig-filter2"> <DSIG-のXPath:XPathのフィルター= "交差"> // ToBeSigned </ DSIG-のXPath:XPathの> <DSIG-のXPath:XPathの

Filter="subtract"> //NotToBeSigned </dsig-xpath:XPath> <dsig-xpath:XPath Filter="union"> //ReallyToBeSigned </dsig-xpath:XPath> </dsig:Transform> </dsig:Transforms> ... </dsig:Reference> </dsig:SignedInfo> ... </dsig:Signature> </Document>

フィルター= "引く"> // NotToBeSigned </ DSIG-のXPath:XPathの> <DSIG-のXPath:XPathのフィルター= "組合"> // ReallyToBeSigned </ DSIG-のXPath:XPathの> </ DSIG:> </ DSIG変換: > ... </ DSIG変換:リファレンス> </ DSIG:たSignedInfo> ... </ DSIG:署名> </ドキュメント>

The intersect operation computes the intersection of the XPath-selected subtrees with the filter node-set. In this case, the filter node-set initially contains the entire input document, and the XPath expression evaluates to the two ToBeSigned elements; these are expanded to include all their descendents and intersected with the filter node-set, resulting in the following:

交差オペレーションは、フィルタノード集合とのXPath選択サブツリーの交点を計算します。この場合、フィルタノードセットは、最初に全体の入力文書を含み、XPath式は、二つToBeSigned要素に評価します。これらは、以下で、その結果、すべての子孫を含むように拡張し、フィルタノード集合と交差しています。

<ToBeSigned> <!-- comment --> <Data /> <NotToBeSigned> <ReallyToBeSigned> <!-- comment --> <Data /> </ReallyToBeSigned> </NotToBeSigned> </ToBeSigned><ToBeSigned> <Data /> <NotToBeSigned> <Data /> </NotToBeSigned> </ToBeSigned>

<ToBeSigned> <! - コメント - > <データ/> <NotToBeSigned> <ReallyToBeSigned> <! - コメント - > <データ/> </ ReallyToBeSigned> </ NotToBeSigned> </ ToBeSigned> <ToBeSigned> <データ/> <NotToBeSigned> <データ/> </ NotToBeSigned> </ ToBeSigned>

The subtract filter computes the subtraction of the XPath-selected subtrees from the filter node-set. In this case, the XPath expression evaluates to the two NotToBeSigned elements; these are expanded to include all their descendents and subtracted from the filter node-set:

減算フィルタは、フィルタノード集合からのXPath選択サブツリーの減算を計算します。この場合、XPath式は、二つNotToBeSigned要素に評価します。これらは、すべての子孫を含むように拡張し、フィルタノード集合から減算されます。

<ToBeSigned> <!-- comment --> <Data />

<ToBeSigned> <! - コメント - > <データ/>

</ToBeSigned><ToBeSigned> <Data />

</ ToBeSigned> <ToBeSigned> <データ/>

</ToBeSigned>

</ ToBeSigned>

Next, the union filter computes the union of the XPath-selected subtrees with the filter node-set. In this case, the XPath expression evaluates to the ReallyToBeSigned element; this is expanded to include all its descendents and added to the filter node-set:

次に、ユニオンフィルタは、フィルタノード集合とのXPath選択サブツリーの和集合を計算します。この場合、XPath式はReallyToBeSigned要素に評価します。これは、そのすべての子孫を含むように拡張し、フィルタノードセットに追加されます。

<ToBeSigned> <!-- comment --> <Data /> <ReallyToBeSigned> <!-- comment --> <Data /> </ReallyToBeSigned> </ToBeSigned><ToBeSigned> <Data />

<ToBeSigned> <! - コメント - > <データ/> <ReallyToBeSigned> <! - コメント - > <データ/> </ ReallyToBeSigned> </ ToBeSigned> <ToBeSigned> <データ/>

</ToBeSigned>

</ ToBeSigned>

Finally, this resulting filter node-set is used to transform the input node-set. In this example, the input node-set is the entire document, with comments removed. The transformed node-set will thus be all those nodes from the input document, less comments, that are also in the filter node-set:

最後に、この得られたフィルターノードセットは、入力されたノードセットを変換するために使用されます。この例では、入力ノードセットは、コメントを除去して、文書全体です。形質転換されたノードセットは、このように入力された文書からのすべてのそれらのノード、フィルタノード集合でもある以下のコメント、あろう。

<ToBeSigned>

<ToBeSigned>

       <Data />
       <ReallyToBeSigned>
        

<Data /> </ReallyToBeSigned> </ToBeSigned><ToBeSigned> <Data />

<データ/> </ ReallyToBeSigned> </ ToBeSigned> <ToBeSigned> <データ/>

</ToBeSigned>

</ ToBeSigned>

Note that the result contains no nodes that were not in the input node-set. Although the filter node-set included comments, these were not present in the input node-set so they are not present in the output node-set.

結果は、入力ノードセットではなかった全くノードを含まないことに留意されたいです。含まれるフィルタノードセットコメントが、これらは、それらが、出力ノードセットに存在しない入力ノードセットには存在しませんでした。

This signature filter does not provide any increased capability over the original XPath transform. For example, this reference could be replicated using the XPath transform as follows.

このシグネチャフィルタは、元のXPath変換を超える任意の増加の機能を提供していません。例えば以下のように、この基準は、XPath変換を用いて複製することができます。

<dsig:Reference URI=""> <dsig:Transforms> <dsig:Transform

<DSIG:参考URI = "">:DSIG <<DSIGは、トランスフォーム>:変換します

Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <dsig:XPath> (ancestor-or-self::ToBeSigned and not (ancestor-or-self::NotToBeSigned)) or ancestor-or-self::ReallyToBeSigned </dsig:XPath> </dsig:Transform> </dsig:Transforms> ... </dsig:Reference>

アルゴリズム= "http://www.w3.org/TR/1999/REC-xpath-19991116"> <DSIG:XPathの>(祖先-または自己:: ToBeSignedない(祖先-または自己:: NotToBeSigned) )または祖先-または自己:: ReallyToBeSigned </ DSIG:XPathの> </ DSIG:変形> </ DSIG:トランスフォーム> ... </ DSIG:リファレンス>

The advantage of the signature filter transform over the XPath transform is that the latter requires evaluation of a potentially-complex expression against every node in the input set, which has proved costly in practice for many useful operations. This specification's filter requires evaluation of simple XPath expressions and then the execution of some basic set operations or their equivalent, which can be implemented significantly more efficiently.

署名フィルタの利点は、後者が多くの有用な動作のために実際に高価なことが証明されている入力セット内のすべてのノードに対して潜在的に複雑な式の評価を必要とすることで変換XPathの上に変換します。この仕様のフィルターは、単純なXPath式を評価し、その後いくつかの基本的な集合演算の実行や、より効率的に大幅に実装することができ、その同等のものを、必要とします。

5. Normative References
5.引用規格

[Keywords] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[キーワード]ブラドナーの、S.、 "要件レベルを示すためにRFCsにおける使用のためのキーワード"、BCP 14、RFC 2119、1997年3月。

[URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[URI]バーナーズ=リー、T.、フィールディング、R.、およびL. Masinter、 "統一資源識別子(URI):一般的な構文"、RFC 2396、1998年8月。

[XML] "Extensible Markup Language (XML) 1.0 (Second Edition)", T. Bray, E. Maler, J. Paoli, and C. M. Sperberg-McQueen. W3C Recommendation, October 2000. Available at <http://www.w3.org/TR/2000/REC-xml-20001006>.

[XML] "拡張マークアップ言語(XML)1.0(第二版)"、T.ブレイ、E. MALER、J.パオリ、及びC. M. Sperberg-マックイーン。 <http://www.w3.org/TR/2000/REC-xml-20001006>の利用可能なW3C勧告、2000年10月。

[XML-C14N] Boyer, J., "Canonical XML", RFC 3076, March 2001. Also a W3C Recommendation available at <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.

[XML-C14N]ボイヤー、J.、 "標準的なXML"、RFC 3076、2001年3月関連で利用可能なW3C勧告<http://www.w3.org/TR/2001/REC-xml-c14n-20010315> 。

[XML-DSig] Eastlake, J., Reagle, J. and D. Solo, "XML-Signature Syntax and Processing", RFC 3275, March 2002. Also a W3C Recommendation available at <http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/>.

[XML-DSIG]イーストレーク、J.、Reagle、J.およびD.ソロ、 "XML-署名構文と処理"、RFC 3275、2002年3月また<において利用可能なW3C勧告http://www.w3.org / TR / 2002 / REC-XMLDSIG-コア-20020212 />。

[XML-NS] "Namespaces in XML", T. Bray, D. Hollander, and A. Layman. W3C Recommendation, January 1999. Available at <http://www.w3.org/TR/1999/REC-xml-names-19990114/>.

[XML-NS] "XMLで名前空間"、T.ブレイ、D.オランダ、およびA.素人。 W3C勧告、1月<http://www.w3.org/TR/1999/REC-xml-names-19990114/>の利用可能な1999年。

[XPath] "XML Path Language (XPath) Version 1.0", J. Clark and S. DeRose. W3C Recommendation, November 1999. Available at <http://www.w3.org/TR/1999/REC-xpath-19991116>. (Note also XPath Errata at <http://www.w3.org/1999/11/REC-xpath-19991116-errata>.)

[XPathの "XMLパス言語(XPath)バージョン1.0"、J.クラークおよびS. DeRose。 <http://www.w3.org/TR/1999/REC-xpath-19991116>の利用可能なW3C勧告、1999年11月。 (XPathの正誤表は、<http://www.w3.org/1999/11/REC-xpath-19991116-errata>にも留意されたいです。)

[XPointer] "XML Pointer Language (XPointer)", S. DeRose, R. Daniel, and E. Maler. W3C Candidate Recommendation, January 2001. Available at <http://www.w3.org/TR/2001/CR-xptr-20010911/>.

[XPointerの "XMLポインタ言語(XPointerの)"、S. DeRose、R.ダニエル、およびE. MALER。 <http://www.w3.org/TR/2001/CR-xptr-20010911/>の利用可能なW3C勧告候補、2001年1月。

6. Authors' Addresses
6.著者のアドレス

John Boyer PureEdge Solutions Inc. 4396 West Saanich Rd. Victoria, BC, Canada V8Z 3E9

ジョン・ボワイエPureEdgeソリューションズ株式会社4396西Saanich Rdを。ビクトリア、BC、カナダV8Z 3E9

Phone: +1-888-517-2675 EMail: jboyer@PureEdge.com

電話:+ 1-888-517-2675 Eメール:jboyer@PureEdge.com

Merlin Hughes Betrusted, Inc. 11000 Broken Land Parkway Suite 900 Columbia, MD 21044

マーリン・ヒューズビートラステッド、Inc.の11000ブロークン・ランドパークウェイスイート900コロンビア、MD 21044

Phone: +1-443-367-7000 EMail: Merlin.Hughes@betrusted.com

電話:+ 1-443-367-7000 Eメール:Merlin.Hughes@betrusted.com

Joseph M. Reagle Jr., W3C Massachusetts Institute of Technology Laboratory for Computer Science NE43-350, 545 Technology Square Cambridge, MA 02139

ジョセフM. Reagleジュニア、コンピュータサイエンスNE43-350のための技術研究所のW3Cマサチューセッツ工科大学、545テクノロジースクエアケンブリッジ、MA 02139

Phone: +1.617.258.7621 EMail: reagle@mit.edu

電話:+1.617.258.7621電子メール:reagle@mit.edu

7. Full Copyright Statement
7.完全な著作権声明

Copyright (C) The Internet Society (2003). All Rights Reserved.

著作権(C)インターネット協会(2003)。全著作権所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

この文書とその翻訳は、コピーして他の人に提供し、それ以外についてはコメントまたは派生物は、いかなる種類の制限もなく、全体的にまたは部分的に、準備コピーし、公表して配布することができることを説明したり、その実装を支援することができます、上記の著作権表示とこの段落は、すべてのそのようなコピーや派生物に含まれていることを条件とします。しかし、この文書自体は著作権のための手順はで定義されている場合には、インターネット標準を開発するために必要なものを除き、インターネットソサエティもしくは他のインターネット関連団体に著作権情報や参照を取り除くなど、どのような方法で変更されないかもしれませんインターネット標準化プロセスが続く、または英語以外の言語に翻訳するために、必要に応じなければなりません。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.

上記の制限は永続的なものであり、インターネットソサエティもしくはその継承者や譲渡者によって取り消されることはありません。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

この文書とここに含まれている情報は、基礎とインターネットソサエティおよびインターネットエンジニアリングタスクフォースはすべての保証を否認し、明示または黙示、その情報の利用がない任意の保証を含むがこれらに限定されない「として、」上に設けられています特定の目的への権利または商品性または適合性の黙示の保証を侵害します。

Acknowledgement

謝辞

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC Editor機能のための基金は現在、インターネット協会によって提供されます。