STRING
expressions return text strings. They are
used to manipulate non-numeric data. The
STRING DIGEST
expression creates a property identifier
that is a digest of a specified
PROP_NAME
expression node.
STRING DIGEST
generates Message Digest 5 (MD5) digest
strings, also called MD5 hashes and message digests. A
STRING DIGEST
expression requires a
PROP_NAME
expression node. Typically, a file name is
generated using a
STRING DIGEST
of the
Endeca.Identifier
property.
See the
EXPRESSION
element for DTD and attribute information.
This example creates a digest identifier based on the
Endeca.Identifier
property.
<EXPRESSION TYPE="STRING" NAME="DIGEST"> <EXPRESSION TYPE="PROPERTY" NAME="IDENTITY"> <EXPRNODE NAME="PROP_NAME" VALUE="Endeca.Identifier"/> </EXPRESSION> </EXPRESSION>
This example shows how to use a
STRING DIGEST
expression as a sub-expression of the
VOID RETRIEVE_URL
expression, which is used to
retrieve a document from its URL and store it in a file on disk.
<EXPRESSION LABEL="" NAME="RETRIEVE_URL" TYPE="VOID" URL=""> <COMMENT>Retrieve the document and store it as a temporary file in the state directory, named with the digest (MD5 hash) of its URL. </COMMENT> <EXPRESSION LABEL="" NAME="CONCAT" TYPE="STRING" URL=""> <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL=""> <EXPRNODE NAME="VALUE" VALUE="../partition0/state/"/> </EXPRESSION> <EXPRESSION TYPE="STRING" NAME="DIGEST"> <EXPRESSION TYPE="PROPERTY" NAME="IDENTITY"> <EXPRNODE NAME="PROP_NAME" VALUE="Endeca.Identifier"/> </EXPRESSION> </EXPRESSION> </EXPRESSION> </EXPRESSION>