ebook img

XML Forms Architecture (XFA) Specification PDF

1123 Pages·2007·7.985 MB·English
by  Adobe
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview XML Forms Architecture (XFA) Specification

bbc June 8, 2007 XML Forms Architecture (XFA) Specification Version 2.5 NOTICE: All information contained herein is the property of Adobe Systems Incorporated. Any references to company names in the specifications are for demonstration purposes only and are not intended to refer to any actual organization. Adobe is a registered trademark of Adobe Systems Incorporated in the United States and/or other countries. Microsoft, Windows, and ActiveX are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Mac OS is a trademark of Apple Computer, Inc., registered in the United States and other countries. JavaScript is a registered trademark of Netscape Communications Corporation. Unicode is a registered trademark of Unicode, Inc. SAP is the trademark or registered trademark of SAP AG in Germany and in several other countries. All other trademarks are the property of their respective owners. This publication and the information herein are furnished AS IS, are furnished for informational use only, are subject to change without notice, and should not be construed as a commitment byAdobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third-party rights. This limited right of use does not include the right to copy other copyrighted material from Adobe, or the software in any of Adobe’s products that use the Portable Document Format, in whole or in part, nor does it include the right to use any Adobe patents, except as may be permitted by an official Adobe Patent Clarification Notice (see [Adobe-Patent-Notice]in the Bibliography). Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are “Commercial Items,” as that term is defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §§227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference. Contents .................................................................................................................................................................................................................i Preface.......................................................................................................................................viii Intellectual Property...................................................................................................................................................................viii Document Contents.....................................................................................................................................................................ix Intended Audience.......................................................................................................................................................................ix Perspective Used in Describing Processing Guidelines...................................................................................................ix Associated Schemas.......................................................................................................................................................................x Related Documentation................................................................................................................................................................x What’s New........................................................................................................................................................................................x Conventions......................................................................................................................................................................................x Part 1: XFA Processing Guidelines 1 Introduction to XML Forms Architecture (XFA) ......................................................................15 Key Features...................................................................................................................................................................................15 Scenarios for Using a Form Described by XFA...................................................................................................................15 Family of XFA Grammars...........................................................................................................................................................17 Major Components of an XFA Form: XFA Template and Data ....................................................................................20 Data Binding: Making the Connection Between XFA Template and Data..............................................................24 Lifecycle of an XFA Form...........................................................................................................................................................25 Static versus Dynamic Forms...................................................................................................................................................27 2 Template Features for Designing Static Forms.......................................................................29 Form Structural Building Blocks..............................................................................................................................................29 Basic Composition........................................................................................................................................................................33 Content Types...............................................................................................................................................................................36 Formatting Text That Appears as Fixed or Variable Content.......................................................................................39 Basic Layout ...................................................................................................................................................................................45 Appearance Order (Z-Order)....................................................................................................................................................57 Extending XFA Templates ........................................................................................................................................................58 Connecting the PDF to the XFA Template..........................................................................................................................59 3 Object Models in XFA................................................................................................................62 XFA Names......................................................................................................................................................................................62 Document Object Models.........................................................................................................................................................63 Scripting Object Model..............................................................................................................................................................73 4 Exchanging Data Between an External Application and a Basic XFA Form........................108 Creating, Updating, and Unloading a Basic XFA Data DOM......................................................................................108 Localization and Canonicalization......................................................................................................................................138 Loading a Template to Produce the XFA Template DOM..........................................................................................154 Basic Data Binding to Produce the XFA Form DOM.....................................................................................................155 Form Processing........................................................................................................................................................................187 Data Output.................................................................................................................................................................................187 iii XFA Specification Contents iv 5 Representing and Processing Rich Text.................................................................................188 About Rich Text..........................................................................................................................................................................188 Representation of Rich Text Across XML and XFA DOMs...........................................................................................189 Rich Text That Contains External Objects.........................................................................................................................193 Displaying and Printing Rich Text.......................................................................................................................................194 6 Template Features for Designing Forms with Repeating Sections.....................................195 Prototypes....................................................................................................................................................................................195 Forms with Repeated Fields or Subforms .......................................................................................................................202 7 Template Features for Designing Dynamic Forms ...............................................................217 Basic Composition.....................................................................................................................................................................220 Content Types............................................................................................................................................................................224 Formatting Text in Dynamic Forms....................................................................................................................................226 Repeating Elements using Occurrence Limits................................................................................................................226 Basic Layout in Dynamic Forms...........................................................................................................................................227 Appearance Order (Z-Order).................................................................................................................................................234 Grammar Excluded from XFAF.............................................................................................................................................235 8 Layout for Growable Objects..................................................................................................237 Text Placement in Growable Containers..........................................................................................................................240 Flowing Layout for Containers ............................................................................................................................................241 Tables.............................................................................................................................................................................................281 9 Dynamic Forms........................................................................................................................286 Static Forms Versus Dynamic Forms..................................................................................................................................286 Data Binding for Dynamic Forms........................................................................................................................................287 Layout for Dynamic Forms.....................................................................................................................................................310 10 Automation Objects................................................................................................................322 How Script Elements Are Used Within Automation Objects ....................................................................................322 Document Variables.................................................................................................................................................................325 Calculations.................................................................................................................................................................................328 Validations...................................................................................................................................................................................329 Events............................................................................................................................................................................................335 Order of Precedence for Automation Objects Activated by the Same Trigger .................................................348 11 Scripting...................................................................................................................................353 Purpose of Scripting.................................................................................................................................................................353 Specifying Where to Execute a Script................................................................................................................................354 Selecting a Script Language..................................................................................................................................................354 Setting Up a Scripting Environment...................................................................................................................................356 The Relationship Between Scripts and Form Objects..................................................................................................357 Exception Handling .................................................................................................................................................................358 Picture Clauses and Localization.........................................................................................................................................358 Unicode Support.......................................................................................................................................................................359 12 Using Barcodes........................................................................................................................360 13 Forms That Initiate Interactions with Servers.......................................................................375 Submitting Data and Other Form Content to a Server................................................................................................375 Using Web Services..................................................................................................................................................................382 Invoking ADO APIs Through the Source Set DOM .......................................................................................................397 Submitting Data and Other Form Content via E-mail..................................................................................................403 XFA Specification Contents v Null handling..............................................................................................................................................................................405 14 User Experience.......................................................................................................................406 Widgets ........................................................................................................................................................................................406 User Experience with Digital Signatures ..........................................................................................................................415 Accessibility and Field Navigation......................................................................................................................................416 15 Dealing with Data in Different XML Formats........................................................................423 Extended Mapping Rules.......................................................................................................................................................423 XSLT Transformations..............................................................................................................................................................458 16 Security and Reliability...........................................................................................................460 Tracking and Controlling Templates Through Unique Identifiers...........................................................................460 Protecting an XFA Server from Attack...............................................................................................................................462 Signed Forms and Signed Submissions............................................................................................................................464 Structuring Forms for Portability and Archivability......................................................................................................480 Part 2: XFA Grammar Specifications 17 Template Specification ...........................................................................................................482 Guide to the Template Specification..................................................................................................................................482 Template Reference.................................................................................................................................................................488 18 Config Specification................................................................................................................761 Background.................................................................................................................................................................................761 The Configuration Data Object Model..............................................................................................................................762 Config Element Reference.....................................................................................................................................................764 19 Locale Set Specification..........................................................................................................794 20 Connection Set Specification..................................................................................................820 About the Connection Set Grammar.................................................................................................................................820 Connection Set Element Reference....................................................................................................................................822 21 Data Description Specification...............................................................................................834 About the Data Description Grammar...............................................................................................................................834 Data Description Grammar....................................................................................................................................................834 Data Description Element Reference.................................................................................................................................837 22 Source Set Specification .........................................................................................................843 The Source Set Data Object Model.....................................................................................................................................843 Source Set Element Reference..............................................................................................................................................845 23 XDP Specification ....................................................................................................................873 About the XDP Grammar........................................................................................................................................................873 XDP Element Language Syntax............................................................................................................................................876 XDP Reference............................................................................................................................................................................880 Part 3: Other XFA-Related References 24 Canonical Format Reference...................................................................................................887 Date................................................................................................................................................................................................887 Time................................................................................................................................................................................................888 XFA Specification Chapter , vi Date-Time.....................................................................................................................................................................................889 Number.........................................................................................................................................................................................889 Text.................................................................................................................................................................................................890 25 FormCalc Specification............................................................................................................891 Grammar and Syntax...............................................................................................................................................................891 FormCalc Support for Locale.................................................................................................................................................918 Arithmetic Built-in Functions................................................................................................................................................922 Date And Time Built-in Functions.......................................................................................................................................932 Financial Built-in Functions...................................................................................................................................................946 Logical Built-in Functions.......................................................................................................................................................956 String Built-in Functions.........................................................................................................................................................961 URL Built-in Functions.............................................................................................................................................................984 Miscellaneous Built-in Functions.........................................................................................................................................988 26 Picture Clause Specification ...................................................................................................991 About.............................................................................................................................................................................................991 Picture-Clause Building Blocks.............................................................................................................................................992 Complex Picture-Clause Expressions.................................................................................................................................996 Calendars and Locale.............................................................................................................................................................1001 Asian Date, Time and Number Considerations............................................................................................................1001 Picture Clause Reference......................................................................................................................................................1006 27 Rich Text Reference...............................................................................................................1027 Summary of Supported XHTML and CSS Attributes...................................................................................................1027 Supported Container Elements..........................................................................................................................................1028 Supported Paragraph Formatting.....................................................................................................................................1029 Supported Character Formatting......................................................................................................................................1034 Retaining Consecutive Spaces (xfa-spacerun:yes)......................................................................................................1042 Embedded Object Specifications .....................................................................................................................................1044 Version Specification..............................................................................................................................................................1044 Part 4: Appendices, Bibliography, Glossary and Index A Algorithms for Determining Coordinates Relative to the Page.........................................1047 B Layout Objects.......................................................................................................................1048 C AXTE Line Positioning...........................................................................................................1058 Introduction..............................................................................................................................................................................1058 Discussion..................................................................................................................................................................................1063 Detailed Algorithms...............................................................................................................................................................1067 D History of Changes in This Specification .............................................................................1070 New Object Models................................................................................................................................................................1070 New XFA Template Features...............................................................................................................................................1071 Modified XFA Template Features......................................................................................................................................1084 Deprecated XFA Template Features.................................................................................................................................1084 E Schemas..................................................................................................................................1085 About the Schemas................................................................................................................................................................1085 XFA Specification Chapter , vii Bibliography ..........................................................................................................................1088 General References.................................................................................................................................................................1088 Fonts and Character Encoding References....................................................................................................................1092 Barcode References................................................................................................................................................................1093 Glossary..................................................................................................................................1096 Preface This specification is a reference for XML Forms Architecture (XFA). It is intended for use in developing applications that create XFA templates (which represent forms awaiting fill-in) and applications that process XFA forms. Such XFA processing applications may be simple stand-alone form-fill in applications, or they may be a set of client-server applications that work together to fill-in and process a form. Intellectual Property The general idea of using templates and processing rules to build interactive forms is in the public domain. Anyone is free to devise templates using unique structures and apply customized processing rules to them. However, Adobe Systems Incorporated owns the copyright for the particular template-based grammar and processing rules constituting the XFA Specification, the written specification for the Adobe XML Architecture. Thus, these elements of the XFA Specification and Adobe XML Architecture may not be copied without Adobe's permission. Adobe will enforce its copyrights Adobe’s intention is to maintain the integrity of the Adobe XML Architecture standard. This enables the public to distinguish between the Adobe XML Architecture and other interchange formats for electronic documents, transactions and information. However, Adobe desires to promote the use of the Adobe XML Architecture for form-related interactions among diverse products and applications. Accordingly, Adobe gives anyone copyright permission to use the Adobe XML Architecture, subject to the conditions stated below, to: ● Prepare files whose content conforms to the Adobe XML Architecture ● Write drivers and applications that produce output represented in the Adobe XML Architecture ● Write software that accepts input in the form of the Adobe XML Architecture specifications and displays, prints, or otherwise interprets the contents ● Copy Adobe’s copyrighted grammar, as well as the example code to the extent necessary to use the Adobe XML Architecture for the purposes above The condition of such intellectual property usage is: ● Anyone who uses the copyrighted grammar, as stated above, must include the appropriate copyright notice. This limited right to use the example code in this document does not include the right to use other intellectual property from Adobe, or the software in any of Adobe’s products that use the Adobe XML Architecture, in whole or in part, nor does it include the right to use any Adobe patents, except as may be permitted by an official Adobe Patent Clarification Notice (see [Adobe-Patent-Notice] in the Bibliography). Adobe, the Adobe logo, and Acrobat are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Nothing in this document is intended to grant you any right to use these trademarks for any purpose. viii XFA Specification Preface Document Contents ix Document Contents This reference is a complete guide to XFA. It describes the various XML grammars that comprise XFA and it explains the rules for processing those grammars in conjunction with data supplied from sources outside the XFA form. This reference is presented in the following major parts: ● Part 1: XFA Processing Guidelines. This part contains narrative chapters that introduce XFA and provide rules for processing XFA in conjunction with data received from an outside source. These rules provide a standard interpretation of XFA expressions and data, which helps to ensure that XFA-related behavior in XFA processing applications is equivalent. More importantly it helps to ensure that XFA processing applications that contribute to sequential processing of XFA documents do not have mis-matched expectations. ● Part 2: XFA Grammar Specifications. This part provides a set of references that describe the elements and attributes of each of the grammars that comprise XFA. Each chapter describes one of these grammars. ● Part 3: Other XFA-Related References. Each chapter in this part contains reference material for non-XML expressions used with XFA. Although the standards described in these chapters are an important part of XFA processing, they are not considered XFA grammars. ● Part 4: Appendices, Bibliography, Glossary and Index. This part contains appendices that provide adjunct information referenced by the narrative chapters in Part 1. It also contains a bibliography, a glossary and an index. Intended Audience You should read this specification if you are developing a template designing application or if you are developing an XFA processing application. This is especially true if either type of application is intended to work with the Adobe® XFA-compatible products, such as Acrobat® and LiveCycle® Designer. Non-technical readers may benefit from reading the chapter, “Introduction to XML Forms Architecture (XFA)” on page15. Perspective Used in Describing Processing Guidelines This document is written from the perspective of an XFA processing application. That is, this document describes the steps an XFA processing application must perform to properly interpret XFA, especially in the context of accepting outside data into an XFA form. The narrative in this document describes the XFA processing rules as through the processing application were using XML Document Object Models (DOMs) as its internal representation of XFA constructs and of data. It also assumes all property references are in terms of objects. While such representations are not required, they are the most common way of implementing code that processes XML data. Notwithstanding this document’s focus on DOMs and objects, nothing in this specification demands that the same internal data structures be employed by any particular implementation. Similarly, notwithstanding the use of terms such as "object" associated with object-oriented languages, nothing in this specification constrains what programming language(s) may be used by any particular implementation. However conforming implementations must provide the same external functionality and must employ the same external data structures. XFA Specification Preface Associated Schemas x Associated Schemas Many of the XFA grammars described in this specification are contained in an attachment carried within this PDF file. See “Schemas” on page1085 for instructions concerning how to extract and use those schemas. Although these schemas can be used to validate the XML syntax of XFA documents, such validation is not normally part of XFA form processing. Most people filling out a form cannot resolve errors detected during such validation. It is expected that XFA documents will be generated by software and will be correct by design. Hence, these schemas are more likely to be used in development. XML validation differs from XFA form validation, which validates the content entered into the form. XFA form validation is described in “Validations” on page329. XFA also supports the use of XML data documents which are or may be separate from the form itself. A simple schema language based on annotated sample data is defined for this purpose in “Data Description Specification” on page834. This facility is not used for validation as such; data which does not conform to the data description is simply ignored. However the data description does control the merging of data into the form and the subsequent generation of a new XML data document. See “Exchanging Data Between an External Application and a Basic XFA Form” on page108. Related Documentation This document replaces the previous version of this specification. This version and previous versions back to 2.0 are available at http://adobe.com/go/xfa_specifications. What’s New A complete list of enhancements in XFA versions 2.0 through 2.5, labelled by version, is given in the appendix “History of Changes in This Specification” on page1070. Caution: In XFA 2.5 some previously endorsed syntax is still legal, but deprecated. It will be removed in a future version of the specification. See “Deprecated XFA Template Features” on page1084. Conventions This document uses notational and graphical conventions as a shorthand for conveying more complex information. Notational Conventions This document uses typefaces and character sequences to indicate the roles and connotations of expressions. Typefaces The following table describes typeface usage in this document:

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.