Preprocessor interface (XML-RPC)
From DKPLP Doc
This is the specification for remote preprocessors that communicate via XML-RPC.
Contents |
Specification
The following specificartion is assigned specification number P1.
Preprocess
- External name
- preprocess
- Parameter count
- one
- Return type
- string
- Action
- Preprocesses the specified text.
Parameters
- string - The text that should be preprocessed.
Return value
The text after the preprocessor has been applied.
Get specification number
- External name
- getSpecificationNumber
- Parameter count
- zero
- Return type
- string
- Action
- Retrieves the specification number of the latest specification that the preprocessor's implements.
Return value
A string with format Pn where n is a positive integer. The string should reflect the preprocessor specification number of the implemented specification.
Draft of P2
Modify the following method.
Preprocess
- External name
- preprocess
- Parameter count
- one, optionally two
- Return type
- string
- Action
- Preprocesses the specified text.
Parameters
- string - The text that should be preprocessed, possibly compressed according to the second parameter. If the text is compressed (i.e. not "none") then it shall be base64 encoded.
- string - An optional string specifying the compression of the first parameter and the desired compression of the output. The value is one of the values returned by the Get supported compression method. If this parameter is not specified then "none" should be assumed.
Return value
The text after the preprocessor has been applied. The output should be compressed according to the second parameter, if the text is compressed (i.e. not "none") then it shall also be base64 encoded. So if the second parameter was "none" or was not supplied then the output should not be compressed, if the second parameter was "gzip" then the output should be compressed with gzip and then base64 encoded.
Get supported compressions
- External name
- getSupportedCompressions
- Parameter count
- zero
- Return type
- array<string>
- Action
- None.
Return value
An array containing one string for every compression type supported by the Preprocess. Valid values are "none" and "gzip".
