Поделиться через


RecipientDataReference Class

Reference to Inclusion/Exclusion Data for Data Source.When the object is serialized out as xml, its qualified name is w:recipientData.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.RelationshipType
        DocumentFormat.OpenXml.Wordprocessing.RecipientDataReference

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Декларация
Public Class RecipientDataReference _
    Inherits RelationshipType
'Применение
Dim instance As RecipientDataReference
public class RecipientDataReference : RelationshipType

Remarks

[ISO/IEC 29500-1 редакция 1]

17.14.28 recipientData (Reference to Inclusion/Exclusion Data for Data Source)

This element shall specify a reference to the part which contains data about whether the set of records in the associated data source have been explicitly included or excluded from the specified mail merge. Only those records which must not be used to generate merged WordprocessingML documents shall be stored within the referenced part, as all records shall be merged by default as part of the mail merge operation. [Guidance: Applications can choose to store only those records which are excluded for efficiency, or a list of all records in order to determine which set of records were added/removed between mail merge operations. end guidance]

[Rationale: When defining a mail merge, it is possible that a user wishes to connect to a specified data source, but specify only a subset of the records returned by the query specified by the query element (§17.14.26) which must be merged as part of the mail merge operation. This element allows applications to utilize a separate part to store this information, either the shared part defined by ISO/IEC 29500, or an application-defined part as needed. end rationale]

If the relationship type of the relationship specified by this element is not https://schemas.openxmlformats.org/officeDocument/2006/mailMergeRecipientData, is not present, or does not have a TargetMode attribute value of Internal, then the document shall be considered non-conformant. If an application cannot process external content of the content type specified by the targeted part, then it can be ignored.

ISO/IEC 29500 defines one shared mechanism for storing this data: using the Mail Merge Recipient Data part. This mechanism shall be used if the associated data source has a column which can be used as the unique key. However, when using data sources which do not have a unique key, applications can store their own part (of an application-defined content type) using this relationship.

[Example: Consider a WordprocessingML document which is a mail merge source document, containing inclusion/exclusion data for the data source. The document settings part would contain the mail merge data:

<w:settings>
…
<w:mailMerge>
…
     <w:odso>
…
<w:recipientData r:id="recipient1" />
</w:odso>
</w:mailMerge>
</w:settings>

The recipientData element specifies that the external content targeted by the relationship with an ID of recipient1 contains the recipient inclusion/exclusion data for the mail merge operation. Examining the contents of the corresponding relationship part item, we can see the targets for that relationship:

<Relationships … >
…
<Relationship Id="recipient1" TargetMode="Internal" Type="https://schemas.openxmlformats.org/officeDocument/2006/relationships/mailMergeRecipientData" Target="recipientData.xml" />
…
</Relationships>

The corresponding relationship part item shows that the file containing this data is located next to the main document and is named recipientData.xml. end example]

Parent Elements

odso (§17.14.25)

Attributes

Description

id (Relationship to Part)

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID to a specified part.

The specified relationship shall match the relationship type required by the parent element:

  • https://schemas.openxmlformats.org/officeDocument/2006/customXml for the contentPart element

  • https://schemas.openxmlformats.org/officeDocument/2006/relationships/footer for the footerReference element

  • https://schemas.openxmlformats.org/officeDocument/2006/relationships/header for the headerReference element

  • https://schemas.openxmlformats.org/officeDocument/2006/relationships/font for the embedBold, embedBoldItalic, embedItalic, or embedRegular elements

  • https://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings for the printerSettings element

  • https://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink for the longDesc or hyperlink element

[Example: Consider an XML element which has the following id attribute:

<… r:id="rId10" />

The markup specifies the associated relationship part with relationship ID rId1 contains the corresponding relationship information for the parent XML element. end example]

The possible values for this attribute are defined by the ST_RelationshipId simple type (§22.8.2.1).

[Note: The W3C XML Schema definition of this element's content model (CT_Rel) is located in §A.1. end note]

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

RecipientDataReference Members

DocumentFormat.OpenXml.Wordprocessing Namespace