Wednesday, April 30, 2025

OIC - Understanding self::node() XSLT function in Oracle Integration cloud

In Oracle Integration Cloud (OIC) XSLT, the XPath function self::node() is used to reference the current node in a predicate or expression.

Purpose of self::node()

It ensures that the comparison or operation is being done on the current node itself, rather than its child or attribute.

Example Usage in OIC

In your expression:

fn:count(ns95:dtstart[(self::node() = $FileProcessingDate)])

Here:

  • self::node() refers to the value of the current dtstart element.
  • It compares that value directly to $FileProcessingDate.

Why use self::node()?

While . (dot) also refers to the current node, self::node() is more explicit and avoids ambiguity in complex expressions, especially when namespaces or deeper hierarchies are involved in OIC mappings.

Simplified Equivalent

This:

self::node() = $FileProcessingDate

Is functionally equivalent to:

. = $FileProcessingDate

But self::node() is sometimes preferred in tools like OIC for clarity or compatibility.


No comments:

Post a Comment

Featured Post

OIC - OIC Utility to Reprocess Failed Real-Time Integration JSON Payloads

📌 Use Case In real-time OIC integrations, JSON payloads are exchanged with external systems via REST APIs. When such integrations fail (du...