Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. Using the IntelliScript Editor
  7. XMap
  8. Libraries
  9. Schema Object
  10. Command Line Interface
  11. Scripts
  12. Parsers
  13. Script Ports
  14. Document Processors
  15. Formats
  16. Data Holders
  17. Anchors
  18. Transformers
  19. Actions
  20. Serializers
  21. Mappers
  22. Locators, Keys, and Indexing
  23. Streamers
  24. Validators, Notifications, and Failure Handling
  25. Validation Rules
  26. Custom Script Components

User Guide

User Guide

XPath Extensions

XPath Extensions

The Rule, Assert, List, Variable, and Trace elements can contain XPath expressions. The following functions can be part of the XPath expression.
The Validation Rules object defines the following functions as extensions of XPath 1.0. The extensions belong to the
dt
namespace, which is defined as
http://validations.informatica.com
.
Function
Description
dt:all-equal( param1[, param2, ...])
Returns true if all items in the list are equal. The parameters can be simple values or lists.
dt:check-uniqueness( value1[, value2, ...])
Returns true if all values in the list of parameters are unique. Each value can be:
  • A simple value
  • A variable that contains a list of strings
  • A variable that contains a list of nodes where each node is a simple value.
dt:date-add( startDate, format, numberOfDays)
Returns the date. If
numberOfDays
is of type
float
, the function rounds down the value to the next lower integer.
dt:date-diff( startDate, format, endDate, format)
Returns the number of days between two dates.
dt:date-format( date, inputFormat, outputFormat)
Converts the format of
date
from
inputFormat
to
outputFormat
.
dt:date-valid( string-to-match, format)
Returns true if the string matches the specified date format.
dt:deep-equal( element1, element2)
Returns true if both of the following are true:
  • element1
    and
    element2
    have all the same attributes, with all the same values.
  • element1
    and
    element2
    have all the same child elements, in the same order, and all the child elements are deep equal.
dt:empty( xpath)
Returns true if an XPath contains no child elements.
dt:exist( xpath)
Returns true if an XPath exists. Equivalent to
count(xpath) > 0
.
dt:is-sorted-lex( ascending, param1[, param2, ...])
Returns true if the list items are lexicographically sorted. The first parameter is a Boolean that sets the sort direction:
true
for ascending or
false
for descending.
dt:last-day-of-month( date, format)
Returns the last day of the selected month.
dt:list-items( list, separator)
Returns a string of all the items in the list, separated by the
separator
. The default separator is a comma.
dt:lookup( string, lookupName, default)
Looks up a string in a lookup table. Specify the string to look up, the name of the lookup table, and a default value to return if the string does not exist in the table.
dt:min-lex( value1[, value2, ...])
Sorts the list of input parameters lexicographically and returns the first item in the sorted list. Each value can be:
  • A simple value
  • A variable that contains a list of strings
  • A variable that contains a list of nodes where each node is a simple value.
dt:next-sequence()
Returns a node-set that contains the current element and all its following siblings, until another element of the same name.
dt:regex-match( string-to-match, regex)
Returns true if a string matches a regular expression.
dt:regex-replace( inputString, patternRegex, replacementString)
Returns
inputString
with all instances of
patternRegex
replaced by
replacementString
. If nothing matches
patternRegex
, the
inputString
value returns with no changes.
dt:string-replace( string1, string2, string3)
Replaces all instances of
string2
in
string1
with
string3
.
dt:unadjusted-calculation-period-dates( startDate, endDate, timeUnit, timeUnitMultiplier, lookupDate, dateFormat)
Returns true if
lookupDate
is within the first specified time period in the specified range, where the time period is
timeUnitMultiplier
times
timeUnit
and the range is between
startDate
and
endDate
.
  • timeUnitMultiplier
    is an integer.
  • timeUnit
    is one of the following strings:
    • Day
      or
      D
    • Week
      or
      W
    • Month
      or
      M
    • Year
      or
      Y
  • lookupDate
    is a date in the range between
    startDate
    and
    endDate
    .
  • dateFormat
    defines the formats of
    lookupDate
    ,
    startDate
    , and
    endDate
For more information about the date format, see DateFormatICU.

0 COMMENTS

We’d like to hear from you!