レコード属性スキーマ
レコードには、PEER_RECORD 構造体のメンバーである pszAttributes の XML 文字列として表される一連の名前または値のペア アプリケーション固有の属性を持つことができます。 この属性は、PeerGroupSearchRecords呼び出しによって開始されたレコード検索をフィルター処理するために使用されます。このフィルターは、パラメーターとして Record Search Query Format で指定された XML 検索フィルターを受け取ります。
レコード属性には、次の 3 種類のいずれかを指定できます。
- int は整数値です。
- 日付 は、https://www.w3.org/TR/NOTE-datetimeで説明されている標準形式の 1 つとして表される datetime 値です。
- 文字列 は Unicode 文字列値です。
次の一覧は、ピア インフラストラクチャによって予約されている特定の属性名を示しています。
- peerlastmodifiedby を する
- peercreatorid を する
- peerlastmodificationtime を する
- peerrecordid を する
- peerrecordtype を する
- peercreationtime を する
- peerlastmodificationtime を する
レコード属性の定義の例
次のスキーマ例は、レコード属性を定義する方法を示しています。
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="https://www.w3.org/2001/XMLSchema">
<xs:simpleType name="alphanum">
<xs:restriction base="xs:string">
<xs:pattern value="\c+" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="attributeType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="alphanum" />
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="alphanum">
<xs:enumeration value="string"/>
<xs:enumeration value="date"/>
<xs:enumeration value="int"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="attributes">
<xs:complexType>
<xs:sequence>
<xs:element name="attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
手記
属性名は、英数字のシーケンスである必要があります。 ハイフン ("-") やアンダースコア ("_") などの特殊文字は、属性名では使用できません。
次の XML 属性シーケンスの例には、PEER_RECORDの pszAttributes メンバーに表示されるカスタム AuthenticationType と AuthExpires 属性が含まれています。
<attributes>
<attribute name="AuthenticationType" type="string">Kerberos</attribute><attribute name="AuthExpires" type="date">2002-01-31</attribute>
<attributes>