Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Localization and Canonicalization
146
Picture clauses and their role in output formatting (localization) and input parsing
(canonicalization)
Picture clause
parent element
Output
Input
(Alternate name)
formatting parsing
validate
✔
Role of picture clause
Specifies a test applied to data in the Form DOM, where the
test verifies the data complies with the given picture clause.
Generally, the validation picture clause reflects canonical
format and is locale-agnostic because all data in the Form
DOM is represented in canonical format.
The validation test must succeed before the XFA processing
application updates the Data DOM with the value from the
Form DOM.
<field name="field1" … >
<validate>
<picture> … </picture>
</validate>
</field>
The validate picture clause is used for testing, not for
conversion.
bind
✔
✔
XML data file or submitting data to a server.
<field name="field1" … >
<bind>
<picture> … </picture>
</bind>
</field>
Rules for Localizing Data
The following rules determine which data can be canonicalized and/or localized. Data not covered by
those rules is copied unmodified into and out of the XFA Data DOM. The diagram
“Dataflow paths for
localizing and canonicalizing data” on page 144
different localization/canonicalization paths.
This section describes the following rules:
●
●
●
●
●
●
●
Rule 1, Non-Localizable Data
Rule 2, Input Parsing a Data Value Using a Picture Clause
Rule 2A, Input Parsing a Without a Picture Clause May Use Default Picture Clauses for Current Locale
Rule 3, Output Formatting
Rule 4, Output Formatting When Output Picture Clause Omitted
Rule 4A, Output Formatting a Null Value
Rule 5, FormCalc Scripts May Localize/Canonicalize Data in the XFA Data DOM