Compartir a través de


DecimalSymbol Class

Radix Point for Field Code Evaluation.When the object is serialized out as xml, its qualified name is w:decimalSymbol.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.StringType
        DocumentFormat.OpenXml.Wordprocessing.DecimalSymbol

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

Syntax

'Declaration
Public Class DecimalSymbol _
    Inherits StringType
'Usage
Dim instance As DecimalSymbol
public class DecimalSymbol : StringType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.15.1.23 decimalSymbol (Radix Point for Field Code Evaluation)

This element specifies the character that shall be interpreted as the radix point when evaluating the contents of all fields in the current document.

[Rationale: When evaluating field instructions based on the contents of the current document, it is necessary to know the character which must be treated as the radix point in order to prevent changes to the calculation of the same field instructions based on the current user's locale. This element stores the radix point which must be used to evaluate fields in the contents of this document, irrespective of the locale of the application loading the file. end rationale]

If this element is omitted, the application shall use the default radix point of its current locale setting to evaluate field instructions. If this element's attribute value is more than a single character, then the document is non-conformant.

[Example: Consider a WordprocessingML document which should use the comma character as the radix point for all field instructions. This requirement is specified using the following WordprocessingML in the document settings:

<w:decimalSymbol w:val="," />

The decimalSymbol element's val attribute has a value of , specifying that the comma character must be interpreted as the radix point.

For instance, the string 12.345,00 would be interpreted as a numeric value of twelve thousand three hundred and forty five. If the decimalSymbol was a period, the same string would be twelve and three hundred and forty five thousandths. end example]

Parent Elements

settings (§17.15.1.78)

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.

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

DecimalSymbol Members

DocumentFormat.OpenXml.Wordprocessing Namespace