SdtDateMappingType Class

Custom XML Data Date Storage Format.When the object is serialized out as xml, its qualified name is w:storeMappedDataAs.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.SdtDateMappingType

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

Syntax

'Declaration
Public Class SdtDateMappingType _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As SdtDateMappingType
public class SdtDateMappingType : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.5.2.40 storeMappedDataAs (Custom XML Data Date Storage Format)

This element specifies the translation which shall be performed on the displayed date in a date picker structured document tag when the current contents are saved into the associated custom XML data via the dataBinding element (§17.5.2.6).

If this element is omitted, then the value of the associated custom XML element shall be placed into the custom XML data part with no translation.

[Example: Consider the following date picker structured document tag:

<w:sdt>
<w:sdtPr>
<w:date w:fullDate="01-01-2006T06:30:00Z">
<w:storeMappedDateAs w:val="text"/>
…
</w:date>
</w:sdtPr>
<w:sdtContent>
<w:r>
<w:t>January 1</w:t>
</w:r>
</w:sdtContent>
</w:sdt>

The value of the storeMappedDateAs element's attribute value is text, therefore the current run contents must be sent to the mapped XML element without any translation (in this case, the value must be January 1). end example]

Parent Elements

date (§17.5.2.7)

Attributes

Description

val (Date Storage Type)

Specifies the date translation which shall be applied to the parent date picker structured document tag.

If this attribute is omitted, this its value shall be assumed to be text.

[Example: Consider the following date picker structured document tag:

<w:sdt>
<w:sdtPr>
<w:date … >
<w:storeMappedDateAs w:val="date"/>
…
</w:date>
</w:sdtPr>
<w:sdtContent>
<w:r>
<w:t>January 1</w:t>
</w:r>
</w:sdtContent>
</w:sdt>

The value of the val attribute is text, therefore the current run contents must be sent to the mapped XML element after being translated into xsd:date format (in this case, the value must be 01-01-2006). end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_SdtDateMappingType) 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

SdtDateMappingType Members

DocumentFormat.OpenXml.Wordprocessing Namespace