Name class

Office 2013 and later

Data Source Name for Column. When the object is serialized out as xml, its qualified name is w:name.

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

public class Name : StringType

[ISO/IEC 29500-1 1st Edition]

name (Category Associated With Entry)

This element specifies the category into which the current glossary document part shall be classified. This classification can consist of any string value as determined by its contents, and shall only be used to classify and sort this entry (via an application or a user interface).

[Example: Consider the following WordprocessingML fragment for the properties of a single glossary document entry:

<w:docPartPr>
  <w:category>
    <w:gallery w:val="coverPg" />
    <w:name w:val="Internal Memo Covers" />
  </w:category>
  …</w:docPartPr>

The name element with a value of Internal Memo Covers specifies that the category grouping applied to the current entry, for the purposes of classification or user interface sorting, puts this entry into the Internal Memo Covers classification. This category can be used as desired. end example]

Parent Elements

category (§17.12.3)

Attributes

Description

val (String Value)

Specifies that its contents contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  …
</w:sdtPr>

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

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

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

[ISO/IEC 29500-1 1st Edition]

name (Data Source Name for Column)

This element specifies the column name within a given external data source for the column whose index is specified via the column element (§17.14.6). This data source name provides a column name which shall be used to map a specific MERGEFIELD field in the document, as specified by the parent field mapping data. The val attribute specifies the name of this column in the data source when the connection is initially established, which is then used permanently to link columns in the database to MERGEFIELD fields in the document.

If this element is omitted, no data source name is provided for the current column.

[Example: Consider a source document that is connected to an external data source with three columns. Within this external data source, these are three columns are ordered and titled as follows: first, middle, and last, respectively. The following WordprocessingML specifies that when this document was connected to the data source, these columns were ordered in this manner:

<w:fieldMapData>
  …  <w:name w:val="first" />
  <w:column w:val="0" />
</w:fieldMapData>
<w:fieldMapData>
  …  <w:name w:val="middle" />
  <w:column w:val="1" />
</w:fieldMapData>
<w:fieldMapData>
  …  <w:name w:val="last" />
  <w:column w:val="2" />
</w:fieldMapData>

The WordprocessingML above demonstrates that the column name first must be associated with the first column in the external database by specifying a column element with its val attribute equal to addition, the column name middle must be associated with the second column in the external database by specifying a column element with its val attribute equal to 1. Finally, the column name last must be associated with the third column in the external database by specifying a column element with its val attribute equal to 2. end example]

Parent Elements

fieldMapData (§17.14.15)

Attributes

Description

val (String Value)

Specifies that its contents contain a string.

The contents of this string are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:pPr>
  <w:pStyle w:val="heading1" /> 
</w:pPr>

The value of the val attribute is the ID of the associated paragraph style's styleId.

However, consider the following fragment:

<w:sdtPr>
  <w:alias w:val="SDT Title Example" />
  …
</w:sdtPr>

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

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

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

© ISO/IEC29500: 2008.

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