APPLY XSLT TRANSFORMATION

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


APPLY XSLT TRANSFORMATION (xmlSource; xslSheet; result)

ParameterTypeDescription
xmlSourceString | BLOBName or access path of XML source document, or
BLOB containing the XML source
xslSheetString | BLOBName or access path of document containing XSL
stylesheet, or
BLOB containing the XSL stylesheet
resultString | BLOBName or access path of the document receiving the
result of the XSLT transformation, or
BLOB receiving the result of the XSLT transformation

Description

The APPLY XSLT TRANSFORMATION command applies an XSLT transformation to a document or a BLOB containing XML and generates a document or a BLOB result. The scope of this command is the current process.

Note: For more information about XSL transformation (or XSLT), refer to the Presentation of XML Commands section.

The command requires three BLOBs or character string parameters. Warning: This command only accepts variables or fields as parameters.

If you pass a character string, you designate a document. In this case, you can only pass the name (the document must be next to the database structure) or the full access path of the document.

You cannot mix different types of parameters within the same call.

The xmlSource parameter must contain the XML source to transform. The command checks the validity of the XML code.

The xslSheet parameter must contain the XSL style sheet to use for the XSLT transformation. This style sheet may have been generated manually or using speciality software. The command checks the validity of the XML code.

The result parameter must contain the name of the document or the BLOB that must receive the result of the XSLT transformation. If you pass a document name that does not exist at the designated location, 4th Dimension creates it automatically. If the document is already open with write access, an error is generated.

The command parses the XML source and transforms it using the instructions in the XSL style sheet. If the SET XSLT PARAMETER command was used beforehand, the command replaces the parameters defined by their value. The result of the transformation is written in the document or BLOB result.

Note: In order to optimize performance of this command, especially in repeated applications from the same XSL sheet, 4th Dimension compiles and keeps the latest XSL sheets used stored in memory.

Example

Refer to the example of the SET XSLT PARAMETER command.

See Also

GET XSLT ERROR, SET XSLT PARAMETER.

System Variables or Sets

If the transformation was executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next