没有合适的资源?快使用搜索试试~ 我知道了~
首页XFA Specification 3.1: 基于模板的交互表单架构解析
XFA Specification 3.1: 基于模板的交互表单架构解析
需积分: 10 2 下载量 27 浏览量
更新于2024-06-30
收藏 7.16MB PDF 举报
"XML Forms Architecture (XFA) Specification 3.1.pdf"
XML Forms Architecture (XFA) 是一种基于模板的架构,它定义了一种语法和处理规则,使得企业能够构建交互式表单。XFA的核心功能是允许在模板中定义用户可以填写数据的字段。这种模板化的语法提供了一个通用的语言,不同企业生产的表单处理应用之间可以通过这个共同的语法进行形式相关的互动。
XFA规范的版本3.1进一步完善了这一标准,提供了更多细节和改进。在2009年11月16日发布的这份文档中,详细阐述了XFA的具体实现和使用方法。作为开放标准,XFA旨在促进跨平台、跨应用程序的表单设计和处理的一致性,减少技术壁垒。
XFA的一个关键特性是它的灵活性,它可以嵌入到各种环境,如Adobe的PDF文档中,使得PDF不仅仅是静态的文档,而是可以包含动态元素和用户输入的表单。此外,XFA支持动态布局调整,这意味着表单可以根据不同的设备和屏幕尺寸自动调整其显示方式,提高用户体验。
在XFA中,表单由多个部分组成,包括模板、数据模型和表示层。模板定义了表单的视觉布局和交互元素;数据模型则存储表单的数据,可以与后端数据库或其他数据源集成;表示层负责将模板和数据模型呈现给用户。这种分离的设计使得表单设计和数据管理可以独立进行,增强了表单的复用性和可维护性。
XFA还支持JavaScript等脚本语言,用于实现更复杂的逻辑和验证规则,确保用户输入的数据质量和一致性。此外,它与其他技术如Microsoft的ActiveX、JavaScrip、以及Unicode等有良好的兼容性,这进一步扩展了XFA表单的功能和适用范围。
在安全性方面,虽然XFA文档没有直接涉及安全策略,但作为嵌入在PDF中的技术,它必须遵循PDF的安全机制,例如数字签名和权限管理,以保护表单数据的安全和完整性。
XML Forms Architecture (XFA) 是一个强大的工具,用于创建动态、交互式的电子表单,它提供了一种标准化的方法来设计、填充和处理数据,促进了企业级表单处理的效率和互操作性。在现代数字化办公环境中,XFA在数据收集、业务流程自动化和跨系统数据交换等方面扮演着重要角色。
16
1
Introduction to XML Forms Architecture (XFA)
The XML Forms Architecture (XFA) provides a template-based grammar and a set of processing rules that
allow businesses to build interactive forms. At its simplest, a template-based grammar defines fields in
which a user provides data.
The open nature of XFA provides a common grammar for describing interactive forms. This common
grammar provides a common basis for form-related interactions between form processing applications
produced by diverse businesses.
Key Features
XFA forms provide a wide range of capabilities.
● Workflow: Data presentation, data capture and data editing, application front-end, printing.
● Dynamic interactions: From interactive, human edited forms with dynamic calculations, validations and
other events to server-generated machine-filled forms.
● Dynamic layout: Forms can automatically rearrange themselves to accommodate the data supplied by
a user or by an external data source, such as a database server.
● Scalability: Single-page static forms, dynamic document assemblies based on data content, large
production runs containing hundreds of thousands of transactions.
XFA is similar to PDF interactive forms introduced in PDF 1.2, which is also known as AcroForm, with the
following differences:
● XFA can be used in XML-based workflows.
● XFA separates data from the XFA template, which allows greater flexibility in the structure of the data
supported and which allows data to be packaged separately from the form.
● XFA can specify dynamically-growing forms.
● XFA can specify Web interactions, such as HTTP and Web Services (WSDL). Such interactions can be
used to submit data to a server or to request a server perform a calculation and return the result.
● XFA works with other XML grammars.
Scenarios for Using a Form Described by XFA
An XFA template describes how a form should appear and behave. It can play a role in several situations:
interacting with a user, printing forms, and processing machine-generated data.
An XFA template may describe a range of form characteristics, such as the following:
● Appearance of the form, including fields, layout and graphics
● Default data to be used for fields
● Types of data expected, including checks on the validity of provided data
● Scripts associated with specific events, such as the user clicking a particular field
XFA Specification
Chapter 1, Introduction to XML Forms Architecture (XFA) Scenarios for Using a Form Described by XFA 17
Interacting with a User
An XFA form interacts with a user in several ways. It presents an electronic version of an electronic form,
which the user fills out. In supply data or selecting buttons, the user may trigger a variety of actions, that
affect the form or that initiate an interaction with another server. The user may also invoke features that
make the form more accessible.
Form Appearance
After opening a template, a user sees an interactive form that represents the layout, graphics, and fields
defined in the XFA template.
The interactive form presents data associated with fields. Initially, the only data in the form are default
values defined in the template. As the user provides data in fields, the default values are replaced with
user-provided values. Date, time, and numeric values are displayed in a manner appropriate for the user’s
locale.
The user interacts with the form, supplying values and selecting options. The user’s input and selections
are reflected in the form.
As the user enters data, parts of the form or fields may automatically grow to accommodate data entered
by the user or a machine-generated source.
Actions the User Can Trigger
XFA templates may be designed to allow a user to initiate various actions, such as the following:
● Calculations. Entering data into a field may cause the values of other fields to be recalculated.
● Data checks. Entering data into a field may initiate a series of validity checks on the entered value.
● Web Services (WSDL) interactions.
● Submission of data to a server.
Accessibility and Field Navigation
XFA templates can specify form characteristics that improve accessibility and guide the user through filling
out a field.
● Visual clues. Fields may display default values that provide hints about the desired input values. In
addition to fields, XFA template may aid the user, by providing radio buttons, check boxes, and choice
lists.
● Accelerator keys. An XFA template may include accelerator keys that allow users to move from field to
field, by typing in a control sequence in combination with a field-specific character.
● Traversal order. An XFA template may be defined with a traversal order, which allows the user to tab
from one field to the next.
● Speech. An XFA template supports speech enunciation, by allowing a form to specify the order in which
text descriptions associated with a field should be spoken.
● Visual aids. XFA template may specify text displayed when the tooltip hovers over a field or a subform.
XFA Specification
Chapter 1, Introduction to XML Forms Architecture (XFA) Family of XFA Grammars 18
Printing Forms
An XFA processing application can be requested to print a blank form or one that is filled out. The data for
the filled-out form can come from a database, from an XML data file generated by an application, or from a
previous interactive session or sessions in which data was manually entered.
During this process, the form may be printed with print view which differs from the view seen by users in
interactive sessions. For example the print view might have the following differences:
● Signature fields appear as underlines for hand-signing rather than as widgets for digital signing.
● Some of the data on the form is printed as barcodes rather than text.
● Summary data is computed and printed on the first page of the form.
In addition there may be different print views for duplex (two-sided) and simplex (one-sided) printers. XFA
can operate with a wide variety of printers including label printers as well as ordinary sheet printers.
Processing Machine-Generated Data
Most people think of an interactive form as something that interacts with a user, but XFA templates may
specify interactions that are entirely machine oriented. For example, an XFA template may describe a
machine-interactive form that consumes data produced by another machine, performs some calculations
and scripts, and then submits the updated data to another machine. The sources of data could be a data
base front-end, a barcode reader, or a client application submitting data.
Family of XFA Grammars
XFA is fully compliant with [XML1.0]. In keeping with the hierarchical nature of XML, XFA divides the
definition of the form into a set of functional areas. Each functional area is represented by an individual
XML grammar. The whole set of XFA grammars can be packaged inside a single XML document known as
an XDP (XML Data Package). This is the form used to move all or part of an XFA form from one application
to another.
The XFA grammars are also reflected in the internal representation of XFA forms, when a form is being
processed. These internal representations are Document Object Models (DOMs) of the sort with which
XML-oriented programmers are familiar.
Representation of an XFA Form
The following table shows the major XFA grammars. There are some specialized grammars that are not
shown here.
XFA grammar Description
datasets Contains all the sets of data used with the form.
data Contains the data held by fields in the form. Each item of this data may
have been defined as a default, entered by a user, obtained from an
external file, database, or network service, or it may result from a
calculation.
dataDescription Defines the schema for the data. XFA can operate without a data
schema but respects it when it is provided.
XFA Specification
Chapter 1, Introduction to XML Forms Architecture (XFA) Family of XFA Grammars 19
Other datasets Other datasets are defined as needed for special purposes. For
example when a partially-filled form is saved a special dataset may be
created to hold information indicating that calculations have been
manually overridden in certain fields.
template Controls the appearance and behavior of the form.
PDF Page background and certification information described by a PDF
object. Although PDF is not an XML format, it is represented as a
stream within an XML object. If such a form is displayed or printed, the
template objects are drawn on top of the PDF content.
Other XFA-related grammars The XFA grammar defines other grammars to define such information
as Web connections and localization information.
Other XML Application-defined information may be included along with the
XFA-defined information. This can be expressed as any valid XML as
long as the outermost element does not use an XFA namespace.
XFA grammar Description
datasets template
Other
XFA-related
packages
PDF
data
XML
XFA
XFA Specification
Chapter 1, Introduction to XML Forms Architecture (XFA) Family of XFA Grammars 20
Instead of XFA containing PDF,
PDF may contain XFA. The PDF
content includes dictionary
entries that signify the
presence of XFA and identify
which version of this
specification it adheres to.
Note: When one of the
Acrobat family of
products opens such a
document, it invokes
the XFA plug-in, which
supports XFA
grammars.
The Relationship between XFA and PDF
There is overlapping functionality between XFA and PDF. However the two grammars serve different
purposes. XFA has a more abstract view of a form than PDF. XFA concentrates on the logic of a form
whereas PDF concentrates on the appearance. However it is possible to combine the two. When the two
are combined the result is a form in which each page of the XFA form overlays a PDF background. This
architecture is sometimes referred to as XFAF (XFA Foreground).
XFAF has the advantage that the PDF can be tweaked to give fine control over the appearance of each
page. However it has the disadvantage that the position of each field and of all the other page content is
fixed on the page. Dynamic subforms cannot be used with XFAF. Within a page each field’s content can
change, or the field can be made invisible, but the field is fixed in size. This type of form corresponds to an
assemblage of traditional pre-printed paper forms.
The alternative which might be called full XFA is to express all of the form, including boilerplate, directly in
XFA. This makes it possible for the XFA processor to adjust the layout and appearance of the form as
needed. For example, a list of dependants can grow to exactly the number of dependants and no more. A
telephone bill can list just those charges that apply, rather than listing all possible charges with amounts of
0.00 for the ones that do not apply. A fully dynamic form of this type can be shorter when printed and can
escape the busy look of pre-printed forms. On the other hand laying out a form of this type takes more
CPU time. Also, XFA lacks some of the visual refinements that are available in PDF. For example in PDF
characters can be individually positioned to support all types of kerning. In XFA individual positioning of
characters is not possible so only the type of kerning performed by the XFA processor is supported.
Although XFA can make use of PDF it is not tied to a particular page description language. XFA processors
can print using PostScript®, PCL, ZPL, or whatever other language the printer requires.
datasets template
Other
XFA-derived
packages
data
XFA
PDF
Content
XML
剩余1525页未读,继续阅读
lxj434368832
- 粉丝: 56
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 高清艺术文字图标资源,PNG和ICO格式免费下载
- mui框架HTML5应用界面组件使用示例教程
- Vue.js开发利器:chrome-vue-devtools插件解析
- 掌握ElectronBrowserJS:打造跨平台电子应用
- 前端导师教程:构建与部署社交证明页面
- Java多线程与线程安全在断点续传中的实现
- 免Root一键卸载安卓预装应用教程
- 易语言实现高级表格滚动条完美控制技巧
- 超声波测距尺的源码实现
- 数据可视化与交互:构建易用的数据界面
- 实现Discourse外聘回复自动标记的简易插件
- 链表的头插法与尾插法实现及长度计算
- Playwright与Typescript及Mocha集成:自动化UI测试实践指南
- 128x128像素线性工具图标下载集合
- 易语言安装包程序增强版:智能导入与重复库过滤
- 利用AJAX与Spotify API在Google地图中探索世界音乐排行榜
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功