CONTENTS Title Page Copyright Page Preface 1 Introduction to DTIF 1.1 Requirements and Goals 1.1.1 Features 1.1.2 Backward Compatible Extensions 1.1.3 Modular Implementation 1.1.4 Sequential Processing 1.1.5 Scope of Attributes 1.2 Notation Conventions 1.2.1 DTIF Defined Types 1.2.2 DTIF Document Hierarchy 1.2.3 DTIF Table Description 1.2.3.1 Table Metadata 1.2.3.2 Table Windows 1.2.3.3 Table Data 1.2.4 Specifying Attribute Inheritance 1.2.5 Encoding Sparse Tables 1.3 Conforming Support of DTIF 1.3.1 Conforming DTIF Receivers 1.3.1.1 Message Classes 1.3.1.2 Attribute Inheritance 1.3.1.3 Support of Valid Documents 1.3.1.4 Support of Conforming Extensions 1.3.1.5 Automated Internalization 1.3.2 Conforming DTIF Senders 1.3.3 Conforming DTIF Modifiers 1.3.4 Conformance Subsets 1.3.5 Conformance Levels 1.4 Application Private Data 1.5 Extension Policy 1.5.1 DTIF Architectural Practices 1.5.2 Extended Attributes and Data Types 1.5.3 Version Changes 1.5.3.1 Major Version Updates 1.5.3.2 Minor Version Updates 1.6 Terminology 2 DTIF Document Structure 2.1 Document Descriptor 2.2 Document Header 2.2.1 Pattern Definition 2.2.2 Color 2.2.3 Standard Pattern 2.2.4 Font Definition 2.2.5 External References 2.2.6 Language Preference Tables 2.2.6.1 Named Edit Strings 2.2.6.2 Generic Columns 3 Table Structure 3.1 Table Metadata 3.1.1 Measurement Units 3.2 Table Windows 3.3 Table Rows 3.3.1 Cell Data 3.3.1.1 Cell State 3.3.1.2 Cell Value 3.3.1.2.1 Varying Text 3.3.1.2.2 Array Definition 3.3.1.2.3 Complex Numbers 4 Generic and Table Columns 4.1 Column Attributes 4.1.1 Data Types 5 Format Attributes 5.1 Format Information 5.1.1 Format Condition 5.1.2 Pattern Number 5.1.3 Size 5.2 Format Type 5.2.1 Numeric Formats 5.2.2 Text Formats 5.2.3 Date/Time Formats 5.3 Format Flags 6 Defined Types 6.1 Date and Time 6.1.1 Relative Time 6.2 Named Value List 6.3 ASCII String 6.4 Column Number 6.5 Row Number 6.6 Cell Coordinates 6.6.1 External and Relative Cell Coordinates 6.7 Ranges 6.7.1 Range 6.7.1.1 External Cell Range 6.7.1.2 Externally Named Ranges 6.7.1.3 Cell Range 6.7.1.4 Row Range 6.7.1.5 Column Range 6.7.1.6 Named Range 6.7.2 Repeat Sequence 7 Introduction to CFE 7.1 Scope and Applicability 7.2 Requirements and Goals 7.2.1 Expressions 7.2.2 Backward Compatible Extensions 7.2.3 Modular Implementation 7.2.4 Sequential Processing 7.3 Nongoals 7.3.1 Determining Operator Precedence During Encoding 7.3.2 Evaluating Expressions 7.3.3 Encountering Unsupported Expressions 7.4 Notation Conventions 7.5 CFE Architecture 7.6 Conforming Support of CFE 7.6.0.1 Message Classes 7.6.0.2 Support of Valid Documents 7.6.0.3 Support of Conforming Extensions 7.6.1 Conforming CFE Senders 7.6.2 Conforming CFE Modifiers 7.6.3 Conformance Subsets 7.6.4 Conformance Levels 7.7 Private Data 7.8 Extension Policy 7.8.1 Extended Attributes and Data Types 7.8.2 Version Changes 7.8.2.1 Major Version Updates 7.8.2.2 Minor Version Updates 7.9 Terminology 8 Canonical Form Expressions Format 8.1 Literals 8.1.1 Integer 8.1.2 Floating-point 8.1.3 Text String 8.1.4 Date 8.1.5 Scaled Integer 8.1.6 Complex Floating-point 8.1.7 Varying Length Text 8.1.8 Relative Date 8.2 Variables 8.2.1 Cell Coordinate 8.2.2 Cell Range 8.2.3 Row Range 8.2.4 Column Range 8.2.5 Named Range 8.2.6 Column Number 8.2.7 Row Number 8.2.8 Column Name 8.2.9 Current Value 8.2.10 Identifier 8.2.11 External Cell Coordinate 8.2.12 External Cell Range 8.2.13 External Named Range 8.3 Basic Arithmetic Functions 8.3.1 Negation 8.3.2 Addition 8.3.3 Subtraction 8.3.4 Division 8.3.5 Multiplication 8.3.6 Raise to a Power 8.3.7 Unary Plus 8.3.8 Percent 8.4 Boolean and Relational Expressions 8.4.1 Conditional Expression (if-then-else) 8.4.2 Logical NOT 8.4.3 Logical AND 8.4.4 Logical OR 8.4.5 Equal To 8.4.6 Greater Than 8.4.7 Greater Than or Equal To 8.4.8 Less Than 8.4.9 Less Than or Equal To 8.4.10 Not Equal To 8.4.11 Between 8.4.12 Absolute Value 8.4.13 Modulus 8.4.14 Square Root 8.5 Statistical Functions 8.5.1 Summation (Total) 8.5.2 Average 8.5.3 Count 8.5.4 Minimum 8.5.5 Maximum 8.5.6 Standard Deviation 8.5.7 Variance 8.5.8 Biased Standard Deviation 8.5.9 Biased Variance 8.6 Conversion Functions 8.6.1 Convert to Value 8.6.2 Round to the Nearest Whole Number 8.6.3 Truncate 8.6.4 Integer 8.6.5 Decimal String 8.7 Identification Functions 8.8 String Functions 8.8.1 String Character 8.8.2 String Character Code 8.8.3 String Concatenate 8.8.4 String Extract 8.8.5 String Find Substring 8.8.6 String Fixed 8.8.7 String Format 8.8.8 Extract Substring Left 8.8.9 String Length 8.8.10 String Lowercase 8.8.11 String Pretty 8.8.12 String Proper 8.8.13 String Repeat 8.8.14 String Replace 8.8.15 String Reverse 8.8.16 Extract Substring Right 8.8.17 String Trim 8.8.18 String Uppercase 8.8.19 Contains Substring 8.8.20 String Starts With 8.9 Choose and Lookup Functions 8.9.1 Choose 8.9.2 Index 8.9.3 Vlookup 8.9.4 Hlookup 8.9.5 Table 8.9.6 Matches 8.9.7 Field In Table 8.9.8 SQL Select 8.9.9 Str-Extract Last Argument 8.10 Date/Time Functions 8.10.1 Date Day of the Week 8.10.2 Date Month Name 8.10.3 Day of the Week 8.10.4 Month Name 8.10.5 Date/Time Literal Functions 8.10.6 Date/Time Extraction Functions 8.10.7 Date Difference Functions 8.10.8 Convert Expression to Date/Time Functions 8.10.9 Date/Time Addition Functions 8.11 Cell-Related Functions 8.11.1 Error 8.11.2 Null 8.11.3 Current Row 8.11.4 Current Column 8.11.5 Current Cell 8.11.6 Row Portion of Cell Name 8.11.7 Column Portion of Cell Name 8.11.8 Constructed Cell Name 8.11.9 Count Rows 8.11.10 Count Columns 8.11.11 Cell Extract 8.11.12 Not Available 8.11.13 Not Calculatable 8.11.14 Cell Indirection 8.12 Financial Functions 8.12.1 Appreciation 8.12.2 Depreciation-Declining Balance with Crossover to Straight Line 8.12.3 Depreciation-Declining Balance 8.12.4 Depreciation-Double Declining Balance 8.12.5 Depreciation-Straight Line 8.12.6 Depreciation-Sum of Year's Digits 8.12.7 Discount 8.12.8 Future Value 8.12.9 Future Value of an Annuity 8.12.10 Future Value of a Single Sum 8.12.11 Interest Payments 8.12.12 Internal Rate of Return 8.12.13 Modified Internal Rate of Return 8.12.14 Net Present Value 8.12.15 Payback 8.12.16 Number of Periods to Achieve Future Value 8.12.17 Number of Periods Given Present Value 8.12.18 Payment Per Period Given Present Value 8.12.19 Payment Per Period to Achieve Future Value 8.12.20 Principal 8.12.21 Present Value of an Annuity 8.12.22 Present Value to Achieve Future Value 8.12.23 Interest Rate 8.12.24 Periods to Achieve Future Value 8.13 Series Functions 8.13.1 LogEst 8.13.2 Least Squares 8.13.3 Integrate 8.13.4 Sigma 8.13.5 Trend 8.14 Additional Constants 8.14.1 True 8.14.2 False 8.14.3 PI 8.15 Miscellaneous Functions 8.15.1 Random Number (Uniformly Distributed) 8.15.2 Sign 8.15.3 Parenthesized Expressions 8.15.4 Private Function 8.15.5 Field Reference 8.16 Trigonometric Functions 8.16.1 Sine 8.16.2 Cosine 8.16.3 Tangent 8.16.4 Arc Sine 8.16.5 Arc Cosine 8.16.6 Arc Tangent 8.16.7 Arc Tangent 2 8.17 Transcendental Functions 8.17.1 Log, Base 10 8.17.2 Log, Base e (Natural) 8.17.3 Antilog 8.17.4 Factorial 8.17.5 Exponent E(x) 8.18 Binary Functions 8.18.1 Arithmetic Shift Left 8.18.2 Arithmetic Shift Right 8.18.3 One's Complement 9 Introduction to ESF 9.1 Scope and Applicability 9.2 Requirements and Goals 9.2.1 Features 9.2.2 Backward Compatible Extensions 9.2.3 Modular Implementation 9.2.4 Sequential Processing 9.3 Nongoals 9.4 Notation Conventions 9.5 ESF Architecture 9.5.1 Sample Edit String 9.5.2 Repeat Sequences 9.6 Conforming Support of ESF 9.6.1 Conforming ESF Receivers 9.6.1.1 Message Classes 9.6.1.2 Support of Valid Documents 9.6.1.3 Support of Conforming Extensions 9.6.1.4 Automated Internalization 9.6.2 Conforming ESF Senders 9.6.3 Conforming ESF Modifiers 9.6.4 Conformance Subsets 9.6.5 Conformance Levels 9.7 Private Data 9.8 Extension Policy 9.8.1 Extended Attributes and Data Types 9.8.2 Version Changes 9.8.2.1 Major Version Updates 9.8.2.2 Minor Version Updates 9.9 Terminology 10 Edit String Format 10.1 Single Edit String Tags 10.2 Numeric Tags 10.2.1 Binary Digit Tag 10.2.2 Digit Separator Tag 10.2.3 Digit Separator Literal Tag 10.2.4 Decimal Digit Tag 10.2.5 Radix Point Tag 10.2.6 Radix Point Literal Tag 10.2.7 Exponent Tag 10.2.8 Zero Replace Tag 10.2.9 Currency Tag 10.2.10 Currency Literal Tag 10.2.11 Floating Blank Suppression Tag 10.2.12 Hexadecimal Digit Tag 10.2.13 Octal Digit Tag 10.2.14 Missing Separator Tag 10.2.15 Sign Indicators 10.2.15.1 Encoded Minus Tag 10.2.15.2 Encoded Plus Tag 10.2.15.3 Encoded Sign Tag 10.2.15.4 Minus Tag 10.2.15.5 Plus Tag 10.2.15.6 Sign Tag 10.2.15.7 Minus Literal Tag 10.2.15.8 Minus Literal End Tag 10.2.15.9 Plus Literal Tag 10.3 Date Time Tags 10.3.1 Am Pm Tag 10.3.2 Day Number Tag 10.3.3 Fraction Second Tag 10.3.4 Hour 12 Tag 10.3.5 Hour 24 Tag 10.3.6 Julian Digit Tag 10.3.7 Minute Tag 10.3.8 Month Number Tag 10.3.9 Second Tag 10.3.10 Week Day Name Tag 10.3.11 Year Tag 10.3.12 Abbreviated Day Name 10.3.13 Abbreviated Month Name 10.3.14 Year Separator 10.3.15 Month Separator 10.3.16 Day Separator 10.3.17 Hour Separator 10.3.18 Minute Separator 10.3.19 Second Separator 10.3.20 Fractional Second Separator 10.4 Text Tags 10.4.1 Alphabetic Tag 10.4.2 Long Text Tag 10.4.3 Lowercase Tag 10.4.4 Uppercase Tag 10.5 Other Tags 10.5.1 Any Character Tag 10.5.2 Any Case Tag 10.5.3 Logical Character Tag 10.5.4 Reverse Tag 10.5.5 String Literal Tag 10.6 Repeated Edit String Tag Sequences A Collected DTIF Syntax Diagrams B List of Language and Country Codes C Interchanging Multidimensional Documents C.1 What Is Multidimensional Data? C.2 Multidimensional Tables and Relational Tables C.3 Encoding and Decoding Multidimensional Tables C.4 A Business Example C.5 A Scientific Example D ABSTRACT SYNTAX CONVENTIONS D.1 Built-in Types and Their Operators D.1.1 Primitive Data Types D.1.2 Constructed Types D.1.3 Tagged Types D.1.4 Defined Types D.1.4.1 Universal Defined Types D.1.5 Pre-Defined Types Glossary Application . . . DDIF Defined types . . . May Metadata . . . User Will . . . Window EXAMPLES 2-1 Font Definition 3-1 Example of Varying Text Data Type 5-1 Format Info List Example 5-2 Format Condition Example 5-3 Pattern number Example 6-1 Example of Row Range 6-2 Example of a Column Range 6-3 Value Sequence Example 1 6-4 Value Sequence Example 2 7-1 Example of an Expression Encoded in CFE 8-1 Example of Text String Syntax 8-2 Example of Current Value 9-1 Example of Edit String Pattern 9-2 Edit String Repeat Sequence Figure 10-1 Example of Binary Digit Tag 10-2 Example of Digit Separator Tag with Nonnumeric Data Value 10-3 Example of Digit Separator Tag with Numeric Data Value 10-4 Example of Digit Separator Literal Tag with Nonnumeric Data Value 10-5 Example of Digit Separator Literal Tag with Numeric Data Value 10-6 Example of Decimal Digit Tag 10-7 Example of a Single Radix Point Tag 10-8 Example of Two Radix Point Tags 10-9 Example of a Single Radix Point Literal Tag 10-10 Example of Two Radix Point Literal Tags 10-11 Example of Exponent Tag 10-12 Example of Exponent Tag with Adjusted Exponent 10-13 Example of Blank Zero Replace Tag 10-14 Example of Asterisk Zero Replace Tag 10-15 Example of Multiple Currency Tags 10-16 Example of a Single Currency Tag 10-17 Example of Multiple Currency Literal Tags 10-18 Example of Single Currency Literal Tag 10-19 Example of Floating Blank Suppression Tag 10-20 Example of Hexadecimal Digit Tag 10-21 Example of Octal Digit Tag 10-22 Example of Encoded Minus Tag 10-23 Example of Encoded Plus Tag 10-24 Example of Encoded Sign Tag 10-25 Example of Multiple Minus Tags for Numeric Data 10-26 Example of a Single Minus Tag for Numeric Data 10-27 Example of a Single Minus Tag for Nonnumeric Data 10-28 Example of Multiple Plus Tags for Numeric Data 10-29 Example of a Single Plus Tag for Numeric Data 10-30 Example of a Single Plus Tag for Nonnumeric Data 10-31 Example of Multiple Sign Tags for Numeric Data 10-32 Example of a Single Sign Tag for Numeric Data 10-33 Example of a Single Sign Tag for Nonnumeric Data 10-34 Example of Minus Literal Tag at the End of a Negative Value 10-35 Example of Minus Literal Tag With a Text Literal 10-36 Example of Minus Literal Tags at the Beginning and the End of a Negative Value 10-37 Example of Plus Literal Tag with "CR" Value 10-38 Example of Plus Literal DB Tag 10-39 Example of Am Pm Tag 10-40 Example of Day Number Tag 10-41 Example of Fraction Second Tag 10-42 Example of Hour 12 Tag 10-43 Example of Hour 24 Tag 10-44 Example of Julian Digit Tag 10-45 Example of Minute Tag 10-46 Example of Month Name Tag 10-47 Example of Month Number Tag 10-48 Example of Second Tag 10-49 Example of Weekdayname Tag 10-50 Example of Year Tag 10-51 Example of Alphabetic Tag 10-52 Example of Long Text Tag 10-53 Example of Lowercase Tag 10-54 Example of an Uppercase Tag 10-55 Example of Any Character Tag 10-56 Example of Any Case Tag 10-57 Example of Multiple Logical Character Tags 10-58 Example of a Single Logical Character Tag 10-59 Example of Multiple Reverse Tags 10-60 Example of a Single Reverse Tag 10-61 Example of String Literal Tag 10-62 Example of Repeat Defined Type 10-63 Example of Edit String Coded Multiple Times FIGURES 1-1 Example of a DTIF Document 1-2 Attribute Inheritance Heirarchy 1-3 Example of a DTIF Table 1-4 Application Private Data Syntax Diagram 2-1 DTIF Document Syntax Diagram 2-2 Document Descriptor Syntax Diagram 2-3 Document Header Syntax Diagram 2-4 Pattern Definition Syntax Diagram 2-5 Color Syntax Diagram 2-6 Standard Pattern Syntax Diagram 2-7 Font Definition Syntax Diagram 2-8 External Reference Syntax Diagram 2-9 Storage System Tag Syntax Diagram 2-10 External References Index Syntax Diagram 2-11 Language Preference Table Syntax Diagram 2-12 Named Edit String Syntax Diagram 2-13 Edit String Format Syntax Diagram 3-1 Table Syntax Diagram 3-2 Table Metadata Syntax Diagram 3-3 Measurement Units Syntax Diagram 3-4 Table Window Syntax Diagram 3-5 Table Rows Syntax Diagram 3-6 Cell Data Syntax Diagram 3-7 Cell State Syntax Diagram 3-8 Cell Value Syntax Diagram 3-9 Varying Text Syntax Diagram 3-10 Array Definition Syntax Diagram 3-11 Complex Float Syntax Diagram 4-1 Column Attributes Syntax Diagram 4-2 Single or Repeat Sequence Syntax Diagram 4-3 Expression Syntax Diagram 4-4 Data Type Syntax Diagram 5-1 Format Info List Syntax Diagram 5-2 Font Number Syntax Diagram 5-3 Language Preference Index Syntax Diagram 5-4 Format Condition Syntax Diagram 5-5 Pattern Number Syntax Diagram 5-6 Measurement Syntax Diagram 5-7 Format Type Syntax Diagram 5-8 Edit String Index Syntax Diagram 5-9 Numeric Format Type Syntax Diagram 5-10 Numeric Format Precision Syntax Diagram 5-11 Predefined Text Types Syntax Diagram 5-12 Predefined Date Types Syntax Diagram 5-13 Format Flags Syntax Diagram 6-1 Date/Time Definition Syntax Diagram 6-2 Relative Time Definition Syntax Diagram 6-3 Named Value List Syntax Diagram 6-4 Named Value Tag Syntax Diagram 6-5 Value Data Syntax Diagram 6-6 ASCII String Syntax Diagram 6-7 Column Number Syntax Diagram 6-8 Row Number Syntax Diagram 6-9 Cell Coordinates Syntax Diagram 6-10 External Cell Coordinates Syntax Diagram 6-11 Range Definition Syntax Diagram 6-12 Range Syntax Diagram 6-13 External Cell Range Syntax Diagram 6-14 Externally Named Range Syntax Diagram 6-15 Cell Range Syntax Diagram 6-16 Row Range Syntax Diagram 6-17 Column Range Syntax Diagram 6-18 Named Range Syntax Diagram 6-19 Repeat Sequence Syntax Diagram 6-20 Value Sequence Syntax Diagram 7-1 Private Function Expression Syntax Diagram 7-2 Storage System Tag Syntax Diagram 7-3 Named Parameter Syntax Diagram 8-1 CFE Syntax Diagram 8-2 Expression List Syntax Diagram 8-3 Integer Syntax Diagram 8-4 Floating-Point Syntax Diagram 8-5 Text String Syntax Diagram 8-6 Text Syntax Diagram 8-7 Date Syntax Diagram 8-8 Scaled Integer Syntax Diagram 8-9 Complex Floating-Point Syntax Diagram 8-10 Complex Float Syntax Diagram 8-11 Varying Length String Syntax Diagram 8-12 Varying Text Syntax Diagram 8-13 Relative Date Syntax Diagram 8-14 Cell-Coordinate Syntax Diagram 8-15 Cell Coordinate Syntax Diagram 8-16 Cell-Range Syntax Diagram 8-17 Cell Range Syntax Diagram 8-18 Row-Range Syntax Diagram 8-19 Row Range Syntax Diagram 8-20 Column-Range Syntax Diagram 8-21 Column Range Syntax Diagram 8-22 Named-Range Syntax Diagram 8-23 Named Range Syntax Diagram 8-24 Column-Number Syntax Diagram 8-25 Column Number Syntax Diagram 8-26 Row-Number Syntax Diagram 8-27 Row Number Syntax Diagram 8-28 Column-Name Syntax Diagram 8-29 Current-Value Syntax Diagram 8-30 Identifier Syntax Diagram 8-31 Negation Syntax Diagram 8-32 Addition Syntax Diagram 8-33 Subtraction Syntax Diagram 8-34 Division Syntax Diagram 8-35 Multiplication Syntax Diagram 8-36 Raise to a Power Syntax Diagram 8-37 Unary Plus Syntax Diagram 8-38 Percent Syntax Diagram 8-39 Conditional Expression Syntax Diagram 8-40 Logical NOT Syntax Diagram 8-41 Logical AND Syntax Diagram 8-42 Logical OR Syntax Diagram 8-43 Equal To Syntax Diagram 8-44 Greater Than Syntax Diagram 8-45 Greater Than or Equal To Syntax Diagram 8-46 Less Than Syntax Diagram 8-47 Less Than or Equal To Syntax Diagram