User guide
32 Creating Card Formats
Valid values are “true” and “false”. The default is “false” if this attribute is not defined.
<g><text id="LINE3" fill="black" x="75" y="525" font-size="11pt" font-family="DejaVu Serif"
datacard:appendData="true">Expires </text></g>
datacard:format Attribute
This attribute is used to
• Perform a character-by-character type validation.
• Insert data into the dynamic personalization data.
• Use only the first “n” characters from the personalization data.
The following type checking characters may be used to validate characters in the data:
To render a fixed-length bar code text item such as EAN8, the data item from this sample data
stream supplies 7 numeric characters. In this case, the following datacard:format attribute can
be defined:
datacard:format=”9999999”
• If the data stream sends “1234567”, then this passes the type checking defined by the
datacard:format attribute. The EAN8 bar code is rendered successfully.
• If the data stream sends “1234567890123”, then the first 7 characters still successfully pass
the type checking. The EAN8 bar code is rendered successfully using only the first seven
characters “1234567”.
• If the data stream sends “1234A67”, then the data fails the type checking with an error
“Format requires numeric character”. The card is rejected in this case.
datacard:appendData Example
Checking Definition
9 Numeric only {0 .. 9}
A Alphabet only {A .. Z, a .. z}
N Alphabet or numeric {0 .. 9, A .. Z, a .. z}
X Any character acceptable
datacard:format Example #1