4D v13.4

PROCESS 4D TAGS

Home

 
4D v13.4
PROCESS 4D TAGS

PROCESS 4D TAGS 


 

PROCESS 4D TAGS ( inputData ; outputData ) 
Parameter Type   Description
inputData  Text, BLOB in Data containing HTML tags to process
outputData  Text, BLOB in Processed data

The PROCESS 4D TAGS command causes the processing by 4D of 4D HTML tags contained in the inputData parameter (field or variable of the BLOB or Text type) and returns the resulting data in outputData.

This command lets you carry out processing on tagged HTML code without it being necessary for the Web server to send an HTML page using a command of the WEB SEND BLOB type or that a page suffixed “.shtml” be requested via a URL. It is not even necessary for the 4D Web server to be started.

Pass the data containing the tags to be processed in the inputData parameter. This parameter can be a field or variable of the BLOB or Text type. Keep in mind that if your database is operating in ASCII compatibility mode, we recommend that you use the BLOB type since the number of characters is not limited (32,000 limit for the Text type). If your database is running in standard mode (Unicode), the Text type is usually sufficient (parameters can receive up to 2 GB of text).

Compatibility note: Beginning with version 12 of 4D, when you use BLOB type parameters, the command automatically considers that the character set used for BLOBs is MacRoman. For better efficiency, it is strongly recommended to use Text type parameters for which processing is carried out in Unicode mode.

All the HTML tags of 4D are supported (4DTEXT, 4DHTML, 4DSCRIPT, 4DLOOP, etc.), even when the Web server is not started.

Note: When using the 4DINCLUDE tag outside the framework of the Web server (Web process):

  • with 4D in local mode or 4D Server, the default folder is the folder containing the database structure file,
  • with 4D in remote mode, the default folder is the folder containing the 4D application.

After command execution, the outputData parameter receives the data of the inputData parameter, along with the result of the processing of any 4D HTML tags that it contains, when applicable. If inputData does not contain any 4D HTML tags, the contents of outputData is identical to that of inputData.

The outputData parameter may be a field or a variable, but it must be of the same type as that of the inputData parameter.

This command makes it possible to store the values resulting from the processing of HTML tags in the database before they are sent.

It also permits the parsing of 4D HTML tags apart from the use of the Web server. In particular, you can use it to send e-mail messages in HTML format that contain processing of and/or references to data contained in the database via the 4D Internet Commands.

Compatibility note: Beginning with version 11 of 4D, this command no longer calls the On Web Authentication Database Method.

Example  

This example loads a 'template' type document, processes the tags it contains and then stores it:

 C_BLOB($Blob_x)
 C_BLOB($blob_out)
 C_TEXT($inputText_t)
 C_TEXT($outputText_t)
 
 DOCUMENT TO BLOB("mytemplate.txt";$Blob_x)
 $inputText_t:=BLOB to text($Blob_x;UTF8 Text without length)
 PROCESS 4D TAGS($inputText_t;$outputText_t)
 TEXT TO BLOB($outputText_t;$blob_out;UTF8 Text without length)
 BLOB TO DOCUMENT($document;$blob_out)

 
PROPERTIES 

Product: 4D
Theme: Tools
Number: 816

Different in remote mode

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D 2004
Modified: 4D v11 SQL
Modified: 4D v12
Renamed: 4D v13

 
SEE ALSO 

4D HTML Tags