Obtains a field of the desired type.
1 ocr.field
<ocr.field
type='type'
setPattern='setPattern'
setDecimalSeparator='setDecimalSeparator'
setGroupingSeparator='setGroupingSeparator'
setNegativeSuffix='setNegativeSuffix'
setPositiveSuffix='setPositiveSuffix'
toUserFormat='toUserFormat'
debug='debug'
setDateFormat='setDateFormat'
>
<text /> +
</ocr.field>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Atype | String | The field type that you will obtain is defined. | |||
AsetPattern | String | The pattern which should accomplish the fragment to obtain is defined. | |||
AsetDecimalSeparator | String | The decimal separator for the numerci fields is defined. | |||
AsetGroupingSeparator | String | The grouper for the numeric fields is defined. | |||
AsetNegativeSuffix | String | The suffix for the negative numeric fields is defined. | |||
AsetPositiveSuffix | String | The suffix for the positive numeric fields is defined. | |||
AtoUserFormat | String | Si true devuelve en muero String, si es false retorna como Número Java. | |||
Adebug | String | If true returns, it shows the debug result in the console. | |||
AsetDateFormat | String | The format for the date field is defined. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Etext | String | Text of which you will obtain the field. |
Returns | |
---|---|
Type | Description |
Field | Returns the field which accomplish the search. |
Example
Obtains the text through a HOCR document of which its debug information is printed.
Copy
<xsql-script name='ocr.field'> <body> <!-- Example numeric field --> <ocr.field type='number' setPattern='(((\d{1,3})(.\d{3})*)|(\d+))(,\d+)?' setDecimalSeparator=',' setGroupingSeparator='.' setNegativeSuffix='' setPositiveSuffix='' toUserFormat='true' debug='true' > <m_ocr_text /> </ocr.field> <!-- Example date field--> <ocr.field type='date' setPattern='(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[-/.](19|20)\\d\\d(?:,)d+)?' setDateFormat='MM/DD/YYYY' > <m_ocr_text /> </ocr.field> </body> </xsql-script>