Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

Using Functions

Using Functions

You can use the following functions when working with XQuery in Process Designer or in any field that uses a formula to set a value.
For information about XQuery functions that are available in the Expression Editor but are not described below, see http://www.xqueryfunctions.com/xq/alpha.html. Note that Application Integration doesn't support all functions documented in the URL.
For information about using the Expression Editor to work with functions, see Using the Expression Editor.
Application Integration does not support inline functions in the Expression Editor. The Expression Editor comes with powerful functions that can invoke operating system features. You must review the contents passed into the functions before using them.

Atomic Values of All Types

You can use the following functions in
processes
and service connectors:
Function Name
Syntax
Description
boolean
fn:boolean(arg)
Converts its argument to a boolean value according to specific rules. For more information, see boolean.
empty
fn:empty(arg)
Determines whether a sequence is empty. It is useful in various conditional checks and scenarios where determining the presence of data is necessary. For more information, see empty.
exists
fn:exists(arg)
Determines whether a sequence contains one or more items. For more information, see exists.
false
fn:false()
Returns the boolean value false. It's part of the XQuery standard functions for working with boolean values For more information, see false.
nilled
fn:nilled(arg)
Checks whether a given node is nilled. A nilled element is where the xsi:nil attribute is set to true in an XML document that supports XML Schema. For more information, see nilled.
not
fn:not(arg)
Accepts a sequence of items, from which it calculates the effective boolean value of the sequence as a whole before negating it. For more information, see not.
number
fn:number(arg)
Constructs an
xs:double
value either from a node that contains a number, or from an atomic value. For more information, see number.
string
fn:string(arg)
Converts an argument to its string representation. It is commonly used to ensure that a given value is treated as a string. For more information, see string.
true
fn:true()
Returns the boolean value true. For more information, see true.

Attachments for Processes

The functions described in the following table are available for handling attachments in processes.
In case of a process, the
$cid
value in the attachment functions refers to the process field (Input, Output or Temp). For example, if the input parameter is called customerPhoto (of type attachment), to get the attachment size, use:
sff:GetAttachmentSize($input.customerPhoto)
Be sure that your field names do not have spaces so they can be easily referenced in XQuery.
For more examples of using the attachment functions, see Attachments.
Function
Syntax
Description
createAttachmentFromBase64
sff:createAttachmentFromBase64($contentName as xs:string, $encodedContent as xs:string, $mimeType as xs:string)
Creates an attachment from the base64-encoded content.
getAttachmentContentType
sff:getAttachmentContentType($cid as xs:string?)
Returns the content-type.
getAttachmentCount
sff:getAttachmentCount($cid as xs:long)
Returns the number of attachments.
getAttachmentName
sff:getAttachmentName($cid as xs:string?)
Returns the attachment (file) name if available.
getAttachmentProperty
sff:getAttachmentProperty($cid as xs:string?, $attribute as xs:string)
Returns the attachment attribute, given the mime header name such as 'content-type'.
getAttachmentSize
sff:getAttachmentSize($cid as xs:long)
Returns the attachment size in bytes.
getBase64FromAttachment
sff:getBase64FromAttachment($cid as xs:string)
Returns base64-encoded attachment content from the variable, which has the attachment type.
hasAttachment
sff:hasAttachment($cid as xs:boolean)
Checks if an attachment exists.
setAttachmentContentType
sff:setAttachmentContentType($cid as xs:string, $val as xs:string)
Sets the attachment content-type.
setAttachmentName
sff:setAttachmentName($cid as xs:string, $val as xs:string)
Sets the attachment name.
setAttachmentProperty
sff:setAttachmentProperty($cid as xs:string, $attribute as xs:string, $val as xs:string)
Sets the attachment mime header attribute value.

Dates and Times

Process Designer supports most built-in XQuery date and time functions described at http://www.xqueryfunctions.com/xq/alpha.html, in addition to the following functions:
Function Name
Syntax
Description
addToDate
date:addToDate(date, format, amount)
Adds a specified amount to one part of a datetime value, and returns a date in the same format as the date you pass to the function. For more information, see addtoDate.
adjust-date-to-timezone
fn:adjust-date-to-timezone(arg, timezone)
Adjusts a date value to a specific time zone, or removes the time zone component from the date value. For more information, see adjust-date-to-timwzone.
adjust-dateTime-to-timezone
fn:adjust-dateTime-to-timezone(arg, timezone)
Adjusts a dateTime value to a specific time zone, or removes the time zone component from the dateTime value. For more information, see adjust-dateTime-to-timezone.
adjust-time-to-timezone
fn:adjust-time-to-timezone(arg, timezone)
Adjusts a time value to a specific time zone, or removes the time zone component from the date value. For more information, see adjust-time-to-timezone.
current-date
fn:current-date()
Returns the current date. For more information, see current-date.
current-dateTime
fn:current-dateTime()
Returns the current dateTime with time zone. For more information, see current-dateTime.
current-time
fn:current-time()
Returns the current time. For more information, see current-time.
dateDiff
date:dateDiff(date, date, format)
Returns the length of time between two dates in the format specified. For more information, see dateDiff.
dateTime
fn:dateTime(arg1, arg2)
Constructs a dateTime from a date and time. For more information, see dateTime.
dateToMillis
date:dateToMillis($date)
Converts the time to milliseconds.
day-from-date
fn:day-from-date(arg)
Returns the day portion of a date. For more information, see day-from-date.
day-from-dateTime
fn:day-from-dateTime(arg)
Returns the day portion of a date/time. For more information, see day-from-dateTime.
days-from-duration
fn:days-from-duration(arg)
Returns the number of days in a duration. For more information, see days-from-duration.
getDatePart
date:getDatePart(date, format)
Returns the specified part of a date as an integer value. For more information, see getDatePart.
getLocale
date:getLocale()
Returns a string representing the current locale the process is running in. For more information, see getLocale.
getTimeZone
date:getTimeZone()
Returns a string that specifies the timezone ID where the process is running or where the user is running it. For more information, see getTimeZone.
hours-from-dateTime
fn:hours-from-dateTime(arg)
Returns the hour portion of a date/time. For more information, see hours-from-dateTime.
hours-from-duration
fn:hours-from-duration(arg)
Returns the hours in a duration. For more information, see hours-from-duration.
hours-from-time
fn:hours-from-time(arg)
Returns the hour portion of a time. For more information, see hours-from-time.
implicit-timezone
fn:implicit-timezone()
Returns the value of the implicit timezone property. For more information, see implicit-timezone.
lastDay
date:lastDay(date)
Passes the date for which you want to return the last day of the month. You can enter any valid expression that evaluates to a date. For more information, see lastDay.
toDate
date:toDate(date, format)
Converts a character string to a Date data type. You use the toDate format strings to specify the format of the source strings. For more information, see toDate.
millisToDate
date:millisToDate($millis)
Converts the current time from milliseconds. For more information, see millistoDate.
minutes-from-dateTime
fn:minutes-from-dateTime(arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg. For more information, see minutes-from-dateTime.
minutes-from-duration
fn:minutes-from-duration(arg)
Returns an xs:integer representing the minutes component in the value of $arg. For more information, see minutes-from-duration.
minutes-from-time
fn:minutes-from-time(arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg. For more information, see minutes-from-time.
month-from-date
fn:month-from-date(arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg. For more information, see month-from-date.
month-from-dateTime
fn:month-from-dateTime(arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg. For more information, see month-from-dateTime.
months-from-duration
fn:months-from-duration(arg)
Returns an xs:integer representing the minutes component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration. For more information, see months-from-duration.
now
date:now()
Returns the current time in milliseconds.
seconds-from-duration
fn:seconds-from-duration(arg)
Returns an xs:decimal representing the seconds component in the value of $arg. The result is obtained by casting $arg to an xs:dayTimeDuration. For more information, see seconds-from-duration.
seconds-from-dateTime
fn:seconds-from-dateTime(arg)
Returns an xs:decimal value greater than or equal to 0 and less than 60, representing the seconds and fractional seconds in the localized value of $arg. For more information, see seconds-from-dateTime.
seconds-from-time
fn:seconds-from-time(arg)
Returns an xs:decimal value greater than or equal to 0 and less than 60, representing the seconds and fractional seconds in the localized value of $arg. For more information, see seconds-from-time.
timezone-from-date
fn:timezone-from-date(arg)
Returns the timezone component of $arg, if any. For more information, see timezone-from-date.
timezone-from-dateTime
fn:timezone-from-dateTime(arg)
Returns the timezone component of an xs:dateTime. For more information, see timezone-from-dateTime.
timezone-from-time
fn:timezone-from-time(arg)
Returns the timezone component of an xs:time. For more information, see timezone-from-time.
toChar
date:toChar(date, format)
Converts the date passed to a string based on the specified format string. For more information, see toChar.
trunc
date:trunc(xs:dateTime('date'), 'format')
Truncates dates to a specific year, month, day, hour, minute, second, or millisecond. For more information, see trunc.
year-from-date
fn:year-from-date(arg)
Returns an xs:integer representing the year in the localized value of $arg. The value might be negative. For more information, see year-from-date.
year-from-dateTime
fn:year-from-dateTime(arg)
Returns an xs:integer representing the year component in the localized value of $arg. For more information see year-from-dateTime.
years-from-duration
fn:years-from-duration(arg)
Returns an xs:integer representing the years component in the value of $arg. The result is obtained by casting $arg to an xs:yearMonthDuration. For more information, see years-from-duration.

Digital Signatures

The functions described in the following sections are available for use in digital signatures.
HMAC Functions
The following functions enable you to generate a digital signature by calculating a keyed-hash message authentication code (HMAC):
Function
Syntax
Description
hmacSignature
dsig:hmacSignature($data as xs:string, $key as xs:string, $algorithm as xs:string, $encoding as xs:string, $keyCharset as xs:string?) as xs:string
Generates an HMAC signature using the specified algorithm such as HMACSHA256 or HMACSHA512 and the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
You can use the optional keyCharset parameter to specify the character set of the secret key that you pass as an argument in the function. The keyCharset is set to UTF-8 by default.
hmacSHA1signature
dsig:hmacSHA1signature($data as xs:string, $key as xs:string, $encoding as xs:string, $keyCharset as xs:string?) as xs:string
Calculates an HMAC using the SHA1 algorithm and the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
$data
consist of four parts, including a JSON string in base64 encoding.
To ensure that you get hex binary and not base64 when you use the
hash:hash
function on the payload, use the following expression:
let $md5hex := hash:hash($jsonPayload,"MD5") return xs:base64Binary(xs:hexBinary($md5hex))
You can use the optional keyCharset parameter to specify the character set of the secret key that you pass as an argument in the function. The keyCharset is set to UTF-8 by default.
hmacSHA256signature
dsig:hmacSHA256signature($data as xs:string, $key as xs:string, $encoding as xs:string, $keyCharset as xs:string?) as xs:string
Calculates an HMAC using the SHA256 algorithm and the optional encoding where $encoding is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
You can use the optional keyCharset parameter to specify the character set of the secret key that you pass as an argument in the function. The keyCharset is set to UTF-8 by default.
hmacSHA512signature
dsig:hmacSHA512signature($data as xs:string, $key as xs:string, $encoding as xs:string, $keyCharset as xs:string?) as xs:string
Generates an HMAC SHA512 signature using the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
You can use the optional keyCharset parameter to specify the character set of the secret key that you pass as an argument in the function. The keyCharset is set to UTF-8 by default.
hmacSHA256signatureForList
dsig:hmacSHA256signatureForList($data as xs:string, @delimiter as xs:string, $key as xs:string, $encoding as xs:string, $keyCharset as xs:string?) as xs:string
Generates an HMAC SHA512 signature using the optional encoding where
$encoding
is one of the following values:
  • Base64 (default)
  • Base64Url
  • Hex
  • Hex64
For more information, see hmacSHA256signatureForList.
Key Signing Functions
The following functions enable you to generate digital signatures based on private keys:
Function
Syntax
Description
signWithKeyFile
dsig:signWithKeyFile($messageToSign as xs:string, $pathToKey as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string) as xs:string
Generates a signature using an asymmetric algorithm and a private key, specified in a PKCS8 file.
Arguments:
  • $digestAlgorithm: SHA1 or SHA256
  • $encryptionAlgorithm: RSA (common) or DSA (if using SHA1 for $digestAlgorithm).
  • $pathToKey: The PKCS8 certificate as a Base64-encoded string (-----BEGIN PRIVATE KEY----- ..... n-----END PRIVATE KEY-----\n) or a binary private key file.
  • $encoding
    (optional), which may be:
  • Base64 (default)
  • Hex64
  • Base64Url
signWithKeyString
dsig:signWithKeyString($messageToSign as xs:string, $key as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string) as xs:string
Generates a signature using an asymmetric algorithm and a private key, specified in a PKCS8 certificate encoded string.
Arguments:
  • $digestAlgorithm: SHA1 or SHA256
  • $encryptionAlgorithm: RSA (common) or ECDSA.
  • $key: The PKCS8 certificate as a Base64-encoded string (-----BEGIN PRIVATE KEY----- ..... n-----END PRIVATE KEY-----\n) or a binary private key.
  • $encoding
    (optional), which can be one of the following values:
    • Base64 (default)
    • Hex64
    • Base64Url
When you use Base64Url encoding to sign any data, you receive extra periods at the end. You must replace the period (.) with an empty string (“) using the replace function:
fn:replace(input, pattern, replacement, flags)
signWithCertificate
dsig:signWithCertificate($messageToSign as xs:string, $pathToCertificate as xs:string, $keyRecoveryPassword as xs:string, $encryptionAlgorithm as xs:string, $digestAlgorithm as xs:string, $encoding as xs:string $keyStorePassword as xs:string, $aliasName as xs:string, $keyStoreType as xs:string) as xs:string
Generates a signature using a PKCS12 certificate.
Arguments:
  • $pathToCertificate: File location on the agent that contains either a PKCS12 or JKS (Java keystore) certificate.
  • $keyRecoveryPassword: Password to access the key in the certificate.
  • $keyStorePassword: Password to open the key store. If empty, assumes the keystore is not password-protected.
  • $aliasName: Optional. Alias of entry in the keystore on the Secure Agent which contains the key. If the alias is not supplied (or empty), the first entry is used.
  • $keyStoreType: Type of keystore, which may be:
    • PKCS12 (default)
    • JKS (Java keystore)

Hashing Functions

The following functions enable you to generate a message hash string:
Function
Syntax
Description
hash
hash:hash($string, $alg)
Generates a hash string for a message using the specified algorithm (optional), where $alg is one of the following:
  • MD5 (default)
  • SHA1
  • SHA256

List Functions

The list functions support only the native Saxon functions. The following functions allow you to work with lists:
Function
Syntax
Description
append
list:append(objectlist, newItem)
Appends a new item to a list. For more information, see append.
count
list:count(objectlist)
Counts the items in a list. For more information, see count.
head
list:head(objectlist)
Returns the first item in a list. For more information, see head.
list
list:list(sequence)
Converts a sequence of IDs into a semicolon-separated list of IDs for an object list. For more information, see list.
remove
list:remove(objectlist, position)
Removes the item at the specified position from the list. For more information, see remove.
replace
list:replace(objectlist, position, newItem)
Replaces an existing item in a list with a new value. For more information, see replace.
sequence
list:sequence(objectlist_field_name)
Converts a semicolon-separated list to a sequence.
When an object list field is inserted into formula and content, the field is wrapped in the
list:sequence(object_field_name)
XQuery function. For object lists in hosted objects, this converts the semicolon-separated list of IDs in the object list into a sequence. For object lists for process objects, the value is already a sequence and the function returns the list unchanged. For more information, see sequence.
tail
list:tail(objectlist)
Return all items from the list with the exception of the first item. For more information, see tail.
List Function Examples
Perhaps the most common example of using the list functions is to get an object from a list each time a step is invoked, possibly from within a repeated Process or
Service
step. For example:
let mylist.Current:=list:head(mylist.List) let mylist.List:=list:tail(mylist.List)
The following example converts an object list in a semicolon-separated list, then iterates over each item:
for $objectid in list:sequence($objectlist) ...
The following example converts a sequence of IDs into a semicolon-separated list of IDs for an object list for hosted objects. For an object list for process objects, it returns a sequence of values:
let $mergedObjectLists := ( as:sequence($objectlist1), as:sequence($objectlist2) ) return list:list($mergedObjectLists)

Math

In processes and service connectors, you can use the math functions described at http://www.w3.org/2005/xpath-functions/math.
Function Name
Syntax
Description
acos
math:acos(arg)
Returns the arc cosine, that is inverse cosine of a numeric input value. The input represents the cosine of an angle, and the function returns the angle in radians, within the range 0 to π. For more information, see acos.
asin
math:asin(arg)
Returns the arcsine (inverse sine) of a numeric input value. The input represents the sine of an angle, and the function returns the angle in radians, within the range -π/2 to π/2. For more information, see asin.
atan
math:atan(arg)
Returns the arctangent (inverse tangent) of a numeric input value. It calculates the angle in radians whose tangent is the given number. The result ranges from -π/2 to π/2. For more information, see atan.
atan2
math:atan2(arg1, arg2)
Returns the angle in radians subtended at the origin by the point on a plane with coordinates (x, y) and the positive x-axis, the result being in the range -π to +π. For more information, see atan2.
cos
math:cos(arg)
Returns the cosine of a numeric input value, where the input represents an angle expressed in radians. For more information, seecos.
exp
math:exp(arg)
Calculates the exponential of a given numeric input, returning e^{x}, where e is Euler’s number that is approximately 2.71828, and x is the input argument. For more information, see exp.
exp10
math:exp10(arg)
Returns the value of 10 raised to the power of the numeric input argument, that is it calculates ( 10^x ), where ( x ) is the input value. For more information, see exp10.
log
math:log(arg)
Returns the natural logarithm of the argument. For more information, see log.
log10
math:log10(arg)
Returns the base-ten logarithm of the argument. For more information, see log10.
pi
math:pi()
Returns the mathematical constant π (pi), which is approximately 3.141592653589793. For more information, see pi.
pow
math:pow(arg1, arg2)
Returns the value of the first numeric argument raised to the power of the second numeric argument, that is ( x^y ). For more information, see pow.
sin
math:sin(arg)
Returns the sine of a numeric input angle, where the angle is given in radians. For more information, see sin.
sqrt
math:sqrt(arg)
Returns the square root of a non-negative numeric input value. For more information, see sqrt.
tan
math:tan(arg)
Returns the tangent of a given numeric value interpreted as an angle in radians. For more information, see tan.

Miscellaneous

The following miscellaneous functions are available:
Function
Syntax
Description
aesEncryption
util:aesEncryption(key, dataToEncrypt)
Encrypts the specified data with the provided key using the Advanced Encryption Standard (AES) algorithm. For more information about the function, see aesEncryption.
aesDecryption
util:aesDecryption(key, dataToDecrypt)
Decrypts the specified data with the provided key using the Advanced Encryption Standard (AES) algorithm. You must use the same key that you had used for encrypting the data in the aesEncryption function. For more information about the function, see aesDecryption.
base64Decode
util:base64Decode(data, charSet)
Returns the base64-decoded version of the input string provided based on the character set specified in the charSet argument. This function is typically used for attachments.
Application Integration supports the character sets that Azul JDK supports for encoding. For example, US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16.
Default for the charSet argument is UTF-8.
base64Encode
util:base64Encode(data, charSet)
Returns the base64-encoded version of the input string provided based on the character set specified in the charSet argument.
Application Integration supports the character sets that Azul JDK supports for encoding. For example, US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16.
Default for the charSet argument is UTF-8.
base64EncodeURL
util:base64EncodeUrl(str, charSet)
Returns a base64-encoded version of the string provided, safe to use in a URL.
Any "+" and "/" characters are replaced with "-" and "_". Any "=" characters are removed.
Default for the charSet argument is UTF-8.
decode
util:decode(value, search1, result1, args, default)
Searches a field for the specified value. For more information, see decode.
error
fn:error(error, description, error-object)
Raises a custom error.
escapeJsonString
util:escapeJsonString(str)
Escapes special characters in the provided string to make it valid for usage in JSON. See JSON standard for details. For more information about the function, see escapeJsonString.
exactly-one
fn:exactly-one(arg)
Returns a sequence if it contains exactly one item, otherwise returns errors.
format
util:format(value, pattern, timezoneId, locale)
Formats string content.
Use the following arguments:
  • value: The string being formatted.
  • pattern: A pattern describing how the value must be formatted. See Formatting Dates, Times, and Numbers.
  • timezoneId: Optional. The time zone ID. If you do not use a stored value (typically returned by a call to date:getTimeZone()), you can omit this argument as Process Designer will call date:getTimeZone().
  • locale: Optional. The locale. If you do not use a stored value (typically returned by a call to date:getLocale()), you can omit this argument as Process Designer will call date:getLocale().
If you use a locale argument but do not use a timezoneId argument, you must add the comma that would follow timezoneId. For example:
util:format("789","##00.00","",date:getLocale())
If the pattern argument contains a date, use lowercase letters to denote the year format
yyyy
. For example, use
util:format("2024-12-29T06:16:02.536Z", "yyyy-MM-dd HH:mm:ss")
. If you use uppercase letters, you might receive an incorrect year or errors might occur.
generate-random-string
util:generate-random-string(length as xs:integer)
Generates a random string of the specified length.
generateUUID
util:generateUUID()
Generates a universally unique identifier.
getAssetLocation
util:getAssetLocation()
Returns the location where the process or the guide that uses the function is stored. For more information, see getAssetLocation.
getAssetName
util:getAssetName()
Returns the name of the process or the guide that uses the function. For more information, see getAssetName.
getCatalogResource
util:getCatalogResource()
Returns the resource based on a catalog location URL within the organization. Takes any catalog resource in the Informatica Cloud organization as its parameter and returns an element node.
To display the element data, add a wrapper function. For example:
serialize(util:getCatalogResource("project:/spi.ipd/services.xml"))
getInstanceStartTime
util:getInstanceStartTime()
Returns the start time of the running instance of the specified process or guide. For more information, see getInstanceStartTime.
getOrganizationId
util:getOrganizationId()
Returns a string that is the organization Id of the context of the currently executing process. For more information, see getOrganizationId.
getOrganizationName
util:getOrganizationName()
Returns the organization name in the context of the executing process, guide, service connector, or data access service connector. For more information, see getOrganizationName.
getProcessId
util:getProcessId()
Returns the process Id of the currently executing or completed process.
getUserName
util:getUserName()
Returns a string that is the login name or ID of the authenticated User running the process .
getUserSystem
util:getUserSystem()
Returns a string that is the name of the system that authenticated the user running the process.
iif
util:iif(condition, val1, val2)
Returns val1 if the condition is true. Else, returns val2. For more information, see iif.
in
util:in(valueToSearch, values, caseFlag)
Matches input data with a list of values. By default, the match is case sensitive. For more information, see in.
isNull
util:isNull(value)
Checks whether the input passed is empty. For more information, see isNull.
one-or-more
fn:one-or-more
Returns a sequence if it contains one or more items, otherwise returns errors.
parseJSON
util:parseJSON(jsonStr)
Parses the provided JSON string and converts it to XML elements.
parseXML
util:parseXML(xmlStr)
Parses the provided XML string and converts it to an XML element.
random
util:random()
Returns a random number from 0 to 1.
resolveURN
util:resolveURN()
Retrieves the URN mapping for an organization.
safeNumber
util:safeNumber()
Holds a number value safely so it cannot be changed.
toDecimal
util:toDecimal(value, scale)
Converts a string or numeric value to a decimal value. For more information, see toDecimal.
toInteger
util:toInteger(value, flag)
Converts a string or numeric value to a decimal value. For more information, see toInteger.
setProcessTitle
ipd:setProcessTitle()
Sets the title of the process.
Use this function only in Informatica Process Designer.
simplifyXml
util:simplifyXml(undefined)
Utility function that is used to remove all namespaces and convert attributes into child elements. For more information, see simplifyXml.
toJSON
util:toJSON(elements)
Converts the provided list of XML elements to a JSON string.
toXML
util:toXML(element)
Converts the provided XML element to an XML string.
trace
util:trunc(arg, precision)
Provides an execution trace to be used in debugging queries. For more information, see trace.
trunc
util:trunc(arg, precision)
Truncates numbers to a specific digit based on the number of decimal places specified by the precision. For more information, see trunc(Numbers).
zero-or-one
fn:zero-or-one(arg)
Returns a sequence if it contains zero or one items, otherwise returns an error.

Numbers

The following number functions are available in the Expression Editor:
Function Name
Syntax
Description
abs
fn:abs(arg)
Returns the absolute value of a numeric value. For more information, see abs.
avg
fn:avg(arg)
Returns the average of the values in the input sequence given in the argument, that is, the sum of the values divided by the number of values. For more information, see avg.
ceiling
fn:ceiling(arg)
Returns the smallest, that is, closest to negative infinity number with no fractional part that is not less than the value of argument. If the type of argument is one of the four numeric types
xs:float
,
xs:double
,
xs:decimal
, or
xs:integer
, the type of the result is the same as the type of argument. If the type of argument is a type derived from one of the numeric types, the result is an instance of the base numeric type. For more information, see ceiling.
floor
fn:floor(arg)
Returns the largest, that is, closest to positive infinity number with no fractional part that is not greater than the value of argument. If type of argument is one of the four numeric types
xs:float
,
xs:double
,
xs:decimal
, or
xs:integer
, the type of the result is the same as the type of argument. If the type of argument is a type derived from one of the numeric types, the result is an instance of the base numeric type. For more information, see floor.
max
fn:max(arg, collation)
Returns the maximum value in a sequence of atomic values. For more information, see max.
min
fn:min(arg, collation)
Selects an item from the input sequence argument whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent. For more information, see min.
round
fn:round(arg)
Returns the number with no fractional part that is closest to the argument. If there are two such numbers, the one that is closest to positive infinity is returned. If type of argument is one of the four numeric types
xs:float
,
xs:double
,
xs:decimal
, or
xs:integer
, the type of the result is the same as the type of argument. If the type of argument is a type derived from one of the numeric types, the result is an instance of the base numeric type. For more information, see round.
round-half-to-even
fn:round-half-to-even(arg, precision)
Returns the numerically closest value to $arg that is a multiple of ten to the power of minus $precision. If two such values are equally near, for example, if the fractional part in $arg is exactly .500..., the function returns the one whose least significant digit is even. For more information, see round-half-to-even.
sum
fn:sum(arg, zero)
Returns a value obtained by adding together the values in $arg. For more information, see sum.

Sequences

The following sequences functions are available in the Expression Editor:
Function Name
Syntax
Description
count
fn:count(arg)
Determines the number of items in a sequence. For more information, see count.
distinct-values
fn:distinct-values(arg, collation)
Returns a sequence containing only the distinct atomic values from the provided sequence, effectively removing any duplicates. For more information, see distinct-values.
index-of
fn:index-of(seqParam, srchParam, collation)
Finds the positions of items in a sequence that are equal to a given search item. It returns a sequence of positions where the specified item occurs. For more information, see index-of.
insert-before
fn:insert-before(target, position, inserts)
Insert items into a sequence at a specified position. This function allows the modification of sequences by adding elements before a designated index. For more information, see insert-before.
last
fn:last()
Determines the position number of the last item in the current context node list during the evaluation of an expression. It is particularly useful within XPath expressions and FLWOR loops to determine the size or to operate on the last item of a sequence. For more information, see last.
position
fn:position()
Determines the current position number of an item during the iteration over a sequence. For more information, see position.
remove
fn:remove(target, position)
Eliminates an item from a sequence located at a specified position. This function helps in restructuring sequences by removing items without altering the rest. For more information, see remove.
reverse
fn:reverse(arg)
Reverses the order of items in a sequence. For more information, see reverse.
subsequence
fn:subsequence(sourceSeq, startingLoc, length)
Retrieves a specific portion of a sequence based on a starting location and an optional length. It allows extracting parts of a sequence efficiently, focusing only on the desired segment. For more information, see subsequence.
unordered
fn:unordered(sourceSeq)
Indicates the order of items in a sequence does not matter for a particular operation. It informs the query engine to ignore the order, potentially optimizing performance, especially in parallel processing scenarios. For more information, see unordered.

String

The following string functions are available in the Expression Editor:
Function Name
Syntax
Description
codepoint-equal
fn:codepoint-equal(comparand1, comparand2)
Compares two strings to determine if they are equal based on their Unicode code points. It checks if two strings are identical without considering any advanced collation rules. For more information, see codepoint-equal.
codepoints-to-string
fn:codepoints-to-string(arg)
Constructs a string from a sequence of Unicode code points. This function takes numeric representations of characters and converts them into a string. For more information, see codepoints-to-string.
compare
fn:compare(comparand1, comparand2, collation)
Compares two strings using a specified collation. This function can help determine the order of strings, for example, sorting based on a defined collation. For more information, see compare.
concat
fn:concat(arg1, arg2)
Concatenates two or more strings into a single string. This function allows you to effectively combine multiple string values into one continuous string. For more information, see concat.
contains
fn:contains(arg1, arg2, collation)
Determines whether one string contains another substring. This function determines if the main string contains at least one occurrence of the specified substring. It evaluates to a boolean value indicating the presence or absence of a substring within a larger string. For more information, see contains.
default-collation
fn:default-collation()
It is a setting or property that can affect XQuery expressions, particularly those dealing with collation-sensitive operations such as string comparisons. XQuery relies on this default collation to perform operations, such as sorting and comparing strings when a specific collation is not provided. For more information, see default-collation.
ends-with
fn:ends-with(arg1, arg2, collation)
Determines whether a string ends with a specified substring. It is a useful function for string manipulation and validation tasks. For more information, see ends-with.
lang
fn:lang(testlang, node)
Determines whether a node's language attribute matches a specified language. This function is particularly useful for querying XML documents that use language attributes to manage multilingual content. For more information, see lang.
lower-case
fn:lower-case(arg)
Converts all the characters in a string to lowercase. This function is useful for tasks where case-insensitivity is required, such as searching, sorting, or normalizing textual data. For more information, see lower-case.
matches
fn:matches(input, pattern, flags)
Determines whether a string matches a given regular expression pattern. This function is essential for pattern matching and text validation tasks. For more information, see matches.
normalize-space
fn:normalize-space(arg)
Removes leading and trailing white space from a string and replaces sequences of white space characters within the string with a single space. This function is useful for cleaning up and formatting text data. For more information, see normalize-space.
normalize-unicode
fn:normalize-unicode(arg, normalizationForm)
Performs Unicode normalization, that allows text to be compared without regard to subtle variations in character representation. It replaces certain characters with equivalent representations. Two normalized values can then be compared to determine whether they are the same. Unicode normalization is also useful for allowing character strings to be sorted appropriately.
The
$normalizationForm
argument controls which normalization form is used, and hence which characters are replaced.
For more information, see normalize-unicode.
replace
fn:replace(input, pattern, replacement, flags)
Replaces parts of a string that match a specified regular expression with a replacement string. This function is highly useful for string manipulation tasks such as text sanitation, formatting, and transformation. For more information, see replace.
starts-with
fn:starts-with(arg1, arg2, collation)
Determines whether a string begins with a specified substring. This function is particularly useful for string validation and prefix matching tasks. For more information, see starts-with.
string-join
fn:string-join(arg1, arg2)
Concatenates a sequence of strings into a single string, with a specified separator between each. This function is particularly useful for combining strings into a formatted output. For more information, see string-join.
string-length
fn:string-length(arg)
Determines the number of characters in a given string including the leading and trailing white space characters. It is particularly useful for tasks that require string validation or manipulation, where the size of the string is relevant. For more information, see string-length.
string-to-codepoints
fn:string-to-codepoints(arg)
Converts a string into a sequence of Unicode codepoints. This function provides a way to analyze and manipulate the individual characters embedded within a string at their fundamental encoding level. For more information, see string-to-codepoints.
substring
fn:substring(sourceString, startingLoc, length)
Extracts a portion of a string based on specified start and optional length parameters. It is useful for string manipulation tasks where specific parts of a string need to be isolated and processed. For more information, see substring.
substring-after
fn:substring-after(arg1, arg2, collation)
Returns the part of a string that follows a specified substring. It is useful for extracting text that appears after a certain character or sequence in a given string. For more information, see substring-after.
substring-before
fn:substring-before(arg1, arg2, collation)
Returns the part of a string that appears before a specified substring. This function is useful for extracting text that precedes a certain character or sequence in a given string. For more information, see substring-before.
tokenize
fn:tokenize(input, pattern, flags)
Splits a string into a sequence of substrings based on a specified regular expression pattern that serves as a delimiter. This function is particularly useful for parsing and separating components of a string for further processing. For more information, see tokenize.
translate
fn:translate(arg, mapString, transString)
Replaces characters in a string based on a specified mapping from source characters to target characters. This function is useful for simple character substitutions and deletions within strings. For more information, see translate.
upper-case
fn:upper-case(arg)
Converts all the characters in a given string to their uppercase equivalents according to the Unicode standard. This function is helpful for normalizing text for comparison or display purposes. For more information, see upper-case.

XML Documents, URIs, and IDs

The following XML Documents, URIs, and IDs functions applicable only for processes are available in the Expression Editor:
Function Name
Syntax
Description
base-uri
fn:base-uri(arg)
Returns the base URI of the given node. The base URI is typically the URI against which relative URIs in the document should be resolved. For more information, see base-uri.
collection
fn:collection(arg)
Returns a sequence of nodes from a collection identified by a URI. It is used to access sets of XML documents or items stored in a collection, typically in an XQuery or XML database environment. For more information, see collection.
doc
fn:doc(uri)
Retrieves a single XML document node identified by a URI. It is commonly used to load an XML document from a given URI into an XQuery expression for querying. For more information, see doc.
doc-available
fn:doc-available(uri)
Checks whether a document identified by the given URI is available and can be retrieved without error. For more information, see doc-available.
document-uri
fn:document-uri(arg)
Returns the document URI associated with a given document node. It helps identify the URI of the document from which the node originates. For more information, see document-uri.
encode-for-uri
fn:encode-for-uri(uri-part)
Returns a string where characters in the input string that are not allowed in a URI component are percent-encoded according to RFC 3986. It is similar to URL encoding but tailored for URI components. For more information, see encode-for-uri.
escape-html-uri
fn:escape-html-uri(uri)
Returns a string that is safe to use within HTML URIs by escaping characters that have a special meaning in HTML, such as &, <, >, ", and ' with corresponding percent-encodings. This ensures the URI can be safely embedded in HTML attributes without breaking the markup. For more information, see escape-html-uri.
id
fn:id(arg, node)
Returns a sequence of element nodes with unique IDs matching the specified ID value(s). It retrieves elements based on the values of their
ID
attributes, commonly used for referencing elements defined with
xml:id
or DTD
ID
attributes. For more information, see id.
idref
fn:idref(arg, node)
Returns the sequence of element or attribute nodes with an IDREF value matching the value of one or more of the ID values supplied in $arg. For more information, see idref.
iri-to-uri
fn:iri-to-uri(iri)
Converts an Internationalized Resource Identifier (IRI) to a Uniform Resource Identifier (URI) by escaping characters that are not allowed in URIs according to RFC 3986. This process includes percent-encoding characters outside the ASCII range and certain reserved characters. For more information, see iri-to-uri.
resolve-uri
fn:resolve-uri(relative, base)
Resolves a given relative URI against a base URI, producing an absolute URI. If the first argument is already an absolute URI, it returns it directly. It is useful for combining relative paths with base locations. For more information, see resolve-uri.
static-base-uri
fn:static-base-uri()
Returns the static base URI of the query or module in which it is called. This is the base URI that was statically assigned, often the location of the query file or module, and is used as the default base for resolving relative URIs in the query. For more information, see static-base-uri.

XML Namespaces and Names

The following XML Namespaces and Names functions are available in the Expression Editor:
Function Name
Syntax
Description
QName
fn:QName(paramURI, paramQName)
Constructs a QName (Qualified Name) from a namespace URI and a local part (local name). It is used to create a QName value dynamically in XQuery. For more information, see QName.
in-scope-prefixes
fn:in-scope-prefixes(element)
Returns the sequence of namespace prefixes that are in scope for a given element node. This helps identify what namespace prefixes can be used for that element and its sub-elements. For more information, see in-scope-prefixes.
local-name
fn:local-name(arg)
Returns the local part (local name) of the expanded QName of the node provided as input. This excludes the namespace prefix and namespace URI. For more information, see local-name.
local-name-from-QName
fn:local-name-from-QName(arg)
Returns the local part of a QName value. It extracts only the local name without namespace prefix or URI from the given xs:QName. For more information, see local-name-from-QName.
name
fn:name(arg)
Returns the QName value of the node as a string, representing the element or attribute name including its prefix, if any. It returns the string-form of the node's name. For more information, see name.
namespace-uri
fn:namespace-uri(arg)
Returns the namespace URI of the expanded QName of the provided node. It helps retrieve the namespace part associated with elements or attributes. For more information, see namespace-uri.
namespace-uri-for-prefix
fn:namespace-uri-for-prefix(prefix, element)
Returns the namespace URI that is bound to a specific prefix in the context of a given element node. This is useful for determining what namespace a prefix corresponds to when processing XML. For more information, see namespace-uri-for-prefix.
namespace-uri-from-QName
fn:namespace-uri-from-QName(arg)
Returns the namespace URI part of a given QName value. This allows extracting the namespace URI component from an xs:QName. For more information, see namespace-uri-from-QName.
node-name
fn:node-name(arg)
Returns the QName of the node, which includes the namespace prefix and local name as an
xs:QName
value. It is used to obtain the qualified name of element or attribute nodes. For more information, see node-name.
prefix-from-QName
fn:prefix-from-QName(arg)
Returns the namespace prefix part of a given QName value. If the QName has no prefix, the function returns an empty sequence. For more information, see prefix-from-QName.
resolve-QName
fn:resolve-QName(qname, element)
Takes a QName string and resolves it to an xs:QName value using the in-scope namespaces of a supplied element node. It essentially maps a QName in string form to an actual QName based on the element's namespace context. For more information, see resolve-QName.

XML Nodes

You can add common XML functions as you build expressions. From the Expression Editor, a list of common XML functions displays in these categories:
The following XML Nodes functions are available in the Expression Editor:
Function
Syntax
Description
data
fn:data(arg)
Returns the atomic value of a node.
The function takes a sequence of items and returns a sequence of atomic values. For more information, see data.
deep-equal
fn:deep-equal(parameter1, parameter2, collation)
Assesses whether two nodes have the same content and attributes. For more information, see deep-equal.
root
fn:root(arg)
Returns the root of the tree that contains the argument. For more information, see root.

0 COMMENTS

We’d like to hear from you!