HeaderSource Class

Header Definition File Path.When the object is serialized out as xml, its qualified name is w:headerSource.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class HeaderSource _
    Inherits RelationshipType
'Usage
Dim instance As HeaderSource
public class HeaderSource : RelationshipType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.14.16 headerSource (Header Definition File Path)

This element specifies the location of a file that contains the column header information which shall be used when connecting to an external data source that does not have column header data specified. Specifically, this element specifies a file that corresponds with the aforementioned external data source. [Note: Column headers are needed to enable a hosting application to associate external data source's columns to fields via the fieldMapData element (§17.14.15).

If this element is omitted, then the column header definition data is not specified in an external file and shall be retrieved from the primary data source associated with the mail merge.

[Example: Consider a WordprocessingML merged document containing the following WordprocessingML:

<w:settings>
…
<w:headerSource r:id="rId2" />
…
</w:settings>

This mail merge's headerSource element specifies via its r:id attribute value of rId2 that the external data source to be used for the column header information for the given WordprocessingML document is the data source targeted by the relationship whose Id attribute is equal to rId2. If we examine the corresponding relationship part item for the setting part, as follows:

<Relationships>
<Relationship Id="rId2" Type="https://schemas.openxmlformats.org/officeDocument/2006/relationships/mailMergeSource" Target="file:///c:/headerData.txt" TargetMode="External" />
</Relationships>

Since the relationship whose Id attribute value is rId2 specifies the column header data file path for the data source effectively specifies a file path of c:\headerData.txt. end example]

Parent Elements

mailMerge (§17.14.20)

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.

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

HeaderSource Members

DocumentFormat.OpenXml.Wordprocessing Namespace