SSブログ

調べ物:XML Schema unique要素 [XMLマスター]

初出:2011-03-01 01:24:23
XMLマスターの調べ物。
XML Schemaで一意なデータを指定する方法。

「technotype」
http://www.technotype.net/tutorial/tutorial.php?fileId=%7BXML%20Schema%7D§ionId=%7Buniqueness-and-reference-constraints%7D

「@IT:XMLテクニック集 - XML Schemaで一意キーとなる要素・属性を定義する」
http://www.atmarkit.co.jp/fxml/tecs/031xsd/31.html

(2011.03.05追記)
仕様書の記述を見直した。
uniqueタグと、key, keyrefは同じ記載になるんだね。
ComplexTypeの指定の中に、uniqueタグ(key, keyref)を指定し、その子要素としてselector, fieldを指定。
selectorでComplexTypeの中のどのパス以下で制約を有効にするかを指定。
fieldで実際の制約を与えるelement, attributeを指定。

"•(unique) the Identity-constraint definition asserts uniqueness, with respect to the content identified by {selector}, of the tuples resulting from evaluation of the {fields} XPath expression(s).
•(key) the Identity-constraint definition asserts uniqueness as for unique. key further asserts that all selected content actually has such tuples.
•(keyref) the Identity-constraint definition asserts a correspondence, with respect to the content identified by {selector}, of the tuples resulting from evaluation of the {fields} XPath expression(s), with those of the {referenced key}.
"
「XML Schema Part 1: Structures Second Edition - 3.11.1 The Identity-constraint Definition Schema Component」
http://www.w3.org/TR/xmlschema-1/#Identity-constraint_Definition_details

", a or a element information item. The correspondences between the properties of those information items and properties of the component they correspond to are as follows:" 「XML Schema Part 1: Structures Second Edition - 3.11.2 XML Representation of Identity-constraint Definition Schema Components」 http://www.w3.org/TR/xmlschema-1/#declare-key
タグ:XML XML Schema
nice!(0)  コメント(0)  トラックバック(0) 
共通テーマ:パソコン・インターネット

nice! 0

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0