OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (OFFICE-3860) Extend specification of number of decimal digits in number formatting


     [ https://issues.oasis-open.org/browse/OFFICE-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Stahl updated OFFICE-3860:
----------------------------------

    Proposal: 
I. Schema changes:

diff -u OpenDocument-v1.2-os-schema.rng 3860-schema.rng 
--- OpenDocument-v1.2-os-schema.rng	2015-05-11 15:10:17.769956374 +0200
+++ 3860-schema.rng	2015-05-11 15:16:40.307446101 +0200
@@ -12636,6 +12636,7 @@
 		<element name="number:number">
 			<ref name="number-number-attlist"/>
 			<ref name="common-decimal-places-attlist"/>
+			<ref name="common-min-decimal-places-attlist"/>
 			<ref name="common-number-attlist"/>
 			<zeroOrMore>
 				<ref name="number-embedded-text"/>
@@ -12671,16 +12672,24 @@
 		<element name="number:scientific-number">
 			<ref name="number-scientific-number-attlist"/>
 			<ref name="common-decimal-places-attlist"/>
+			<ref name="common-min-decimal-places-attlist"/>
 			<ref name="common-number-attlist"/>
 			<empty/>
 		</element>
 	</define>
 	<define name="number-scientific-number-attlist">
-		<optional>
-			<attribute name="number:min-exponent-digits">
-				<ref name="integer"/>
-			</attribute>
-		</optional>
+		<interleave>
+			<optional>
+				<attribute name="number:min-exponent-digits">
+					<ref name="integer"/>
+				</attribute>
+			</optional>
+			<optional>
+				<attribute name="number:forced-exponent-sign">
+					<ref name="boolean"/>
+				</attribute>
+			</optional>
+		</interleave>
 	</define>
 	<define name="number-fraction">
 		<element name="number:fraction">
@@ -13194,6 +13203,13 @@
 				<ref name="integer"/>
 			</attribute>
 		</optional>
+	</define>
+	<define name="common-min-decimal-places-attlist">
+		<optional>
+			<attribute name="number:min-decimal-places">
+				<ref name="integer"/>
+			</attribute>
+		</optional>
 	</define>
 	<define name="common-number-attlist">
 		<interleave>

II.
Section 16.27.3 <number:number>

Add to the generated "The <number:number> element has the following attributes:"

    number:min-decimal-places 19.xxy

III.
Section 16.27.5 <number:scientific-number>

Add to the generated "The <number:scientific-number> element has the following attributes":

    number:min-decimal-places 19.xxy and number:forced-exponent-sign 19.xxz

IV. Add new section:
Section 19.xxy number:min-decimal-places

Section 19.xxy.1 General
The number:min-decimal-places attribute specifies the minimum number of digits in the decimal part.

The value of the number:min-decimal-places attribute shall not be greater than the value of the number:decimal-places attribute.

If the value of number:min-decimal-places is less than the value of number:decimal-places, trailing zero digits in decimal places following the position indicated by the value of number:min-decimal-places shall not be displayed.

Section 19.xxy.2 <number:number>
If the number:min-decimal-places attribute is not specified, it is set to:
* 0 if the value of the number:decimal-replacement attribute is the empty string
* the value of the number:decimal-places attribute in other cases.

If both number:decimal-replacement and number:min-decimal-places attributes are present, and the number displayed is an integer, then the value of number:decimal-replacement shall be displayed.

The number:min-decimal-places attribute is usable with the following element: <number:number> 16.27.3.
The number:min-decimal-places attribute has the data type integer 18.2.

Section 19.xxy.3 <number:scientific-number>
If the number:min-decimal-places attribute is not specified, it is set to the value of the number:decimal-places attribute.

The number:min-decimal-places attribute is usable with the following element: <number:scientific-number> 16.27.5.
The number:min-decimal-places attribute has the data type integer 18.2.

V. Add new section:
Section 19.xxz number:forced-exponent-sign

The number:forced-exponent-sign attribute specifies whether the sign of the exponent for a scientific number is always displayed.
The defined values for the number:forced-exponent-sign attribute are:
* false: the exponent sign is displayed only for a negative value of the exponent, otherwise it is not displayed.
* true: the exponent sign is always displayed regardless of the value of exponent.

The default value for this attribute is true.

The number:forced-exponent-sign attribute is usable with the following element: <number:scientific-number> 16.27.5.
The number:forced-exponent-sign attribute has the data type boolean 18.3.3.

  was:
I. Schema changes:

diff -u OpenDocument-v1.2-os-schema.rng 3860-schema.rng 
--- OpenDocument-v1.2-os-schema.rng	2015-05-11 15:10:17.769956374 +0200
+++ 3860-schema.rng	2015-05-11 15:16:40.307446101 +0200
@@ -12636,6 +12636,7 @@
 		<element name="number:number">
 			<ref name="number-number-attlist"/>
 			<ref name="common-decimal-places-attlist"/>
+			<ref name="common-min-decimal-places-attlist"/>
 			<ref name="common-number-attlist"/>
 			<zeroOrMore>
 				<ref name="number-embedded-text"/>
@@ -12671,16 +12672,24 @@
 		<element name="number:scientific-number">
 			<ref name="number-scientific-number-attlist"/>
 			<ref name="common-decimal-places-attlist"/>
+			<ref name="common-min-decimal-places-attlist"/>
 			<ref name="common-number-attlist"/>
 			<empty/>
 		</element>
 	</define>
 	<define name="number-scientific-number-attlist">
-		<optional>
-			<attribute name="number:min-exponent-digits">
-				<ref name="integer"/>
-			</attribute>
-		</optional>
+		<interleave>
+			<optional>
+				<attribute name="number:min-exponent-digits">
+					<ref name="integer"/>
+				</attribute>
+			</optional>
+			<optional>
+				<attribute name="number:forced-exponent-sign">
+					<ref name="boolean"/>
+				</attribute>
+			</optional>
+		</interleave>
 	</define>
 	<define name="number-fraction">
 		<element name="number:fraction">
@@ -13194,6 +13203,13 @@
 				<ref name="integer"/>
 			</attribute>
 		</optional>
+	</define>
+	<define name="common-min-decimal-places-attlist">
+		<optional>
+			<attribute name="number:min-decimal-places">
+				<ref name="integer"/>
+			</attribute>
+		</optional>
 	</define>
 	<define name="common-number-attlist">
 		<interleave>

II.
Section 16.27.3 <number:number>

Add to the generated "The <number:number> element has the following attributes:"

    number:min-decimal-places 19.xxy

III.
Section 16.27.5 <number:scientific-number>

Add to the generated "The <number:scientific-number> element has the following attributes":

    number:min-decimal-places 19.xxy and number:forced-exponent-sign 19.xxz

IV. Add new section:
Section 19.xxy number:min-decimal-places

Section 19.xxy.1 General
The number:min-decimal-places attribute specifies the minimum number of digits in the decimal part.

Section 19.xxy.2 <number:number>
If the number:min-decimal-places attribute is not specified, it is set to:
* 0 if the value of the number:decimal-replacement attribute is the empty string
* the value of the number:decimal-places attribute in other cases.

The value of the number:min-decimal-places attribute shall not be greater than the value of the number:decimal-places attribute.

The number:min-decimal-places attribute is usable with the following element: <number:number> 16.27.3.
The number:min-decimal-places attribute has the data type integer 18.2.

Section 19.xxy.3 <number:scientific-number>
If the number:min-decimal-places attribute is not specified, it is set to the value of the number:decimal-places attribute.

The number:min-decimal-places attribute is usable with the following element: <number:scientific-number> 16.27.5.
The number:min-decimal-places attribute has the data type integer 18.2.

V. Add new section:
Section 19.xxz number:forced-exponent-sign

The number:forced-exponent-sign attribute specifies whether the sign of the exponent for a scientific number is always displayed.
The defined values for the number:forced-exponent-sign attribute are:
* false: the exponent sign is displayed only for a negative value of the exponent, otherwise it is not displayed.
* true: the exponent sign is always displayed regardless of the value of exponent.

The default value for this attribute is true.

The number:forced-exponent-sign attribute is usable with the following element: <number:scientific-number> 16.27.5.
The number:forced-exponent-sign attribute has the data type boolean 18.3.3.


> Extend specification of number of decimal digits in number formatting
> ---------------------------------------------------------------------
>
>                 Key: OFFICE-3860
>                 URL: https://issues.oasis-open.org/browse/OFFICE-3860
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: New Feature
>          Components: Formatting Properties
>    Affects Versions: ODF 1.2
>            Reporter: Andreas Guelzow 
>            Assignee: Andreas Guelzow 
>            Priority: Minor
>             Fix For: ODF 1.3
>
>
> This relates to the comment received in https://lists.oasis-open.org/archives/office-comment/201407/msg00008.html
> Currently the number:number element use a single attribute number:decimal-places to specify the number of decimal digits to be used. This means that formats such as "0.00#" (specified here using the Excel number format syntax) cannot be translated into ODF without the use of conditional formatting.
> I would propose to add an attribute to allow for formats of this type. 



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]