Skip to content
LambogeniusDocs

Compose using XSLT for Azure Logic Apps

Azure Functions from maps

Call HTTP-triggered Functions from XPath with az:InvokeText, the registry, authentication and caching.

Service provider/serviceProviders/lamboXsltComposeOperation ComposeXslt, shown in the designer as Compose using XSLT.

az:InvokeText

Bind any prefix to urn:lambogenius:azure-functions and call InvokeText(alias, value). No scripts are needed.

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:az="urn:lambogenius:azure-functions"
    exclude-result-prefixes="az">
  <xsl:template match="/Order">
    <Customer>
      <Id><xsl:value-of select="CustomerId"/></Id>
      <Name><xsl:value-of select="az:InvokeText('GetCustomerName', string(CustomerId))"/></Name>
    </Customer>
  </xsl:template>
</xsl:stylesheet>

The action must list the alias: "allowedFunctionAliases": ["GetCustomerName"]. Otherwise the call fails with FunctionNotAllowed before anything is sent.

The registry

Where each alias goes, and how to authenticate, is set by the operator in a registry file (XsltCompose__FunctionRegistryPath) or setting (XsltCompose__FunctionRegistry). Maps never contain URLs or keys.

{
  "schemaVersion": 1,
  "functions": {
    "GetCustomerName": {
      "endpoint": "https://<function-app>.azurewebsites.net/api/GetCustomerName",
      "authentication": { "mode": "ManagedIdentity", "scope": "api://<application-id>/.default" },
      "timeoutSeconds": 5,
      "maxRequestBytes": 65536,
      "maxResponseBytes": 65536,
      "cacheWithinTransform": true,
      "retryCount": 0
    }
  }
}
FieldRules
endpointAbsolute https URL, no query string or credentials. http only for localhost with XsltCompose__Development__AllowLocalhostHttp.
authenticationManagedIdentity (scope, optional clientId for a user-assigned identity) or FunctionKey (keySetting: the name of an app setting that holds the key, ideally a Key Vault reference).
cacheWithinTransformAnswers for repeated values are reused within one transformation.
retryCountMust be 0: the bridge never retries. Use the action's retry policy.

The Function contract

  • Request: POST with {"value": "…"} as JSON, plus x-correlation-id, traceparent, and the key or bearer token.
  • Answer: HTTP 200 text/plain UTF-8; the body is used exactly as is.
  • Anything else fails the action: 401/403 give FunctionAuthenticationFailed; 404, 429, 5xx, redirects and network errors give FunctionHttpFailed; a wrong content type or an oversized body gives FunctionResponseInvalid. A map never gets an empty value in place of an error.
  • Limits: 5 s per call, 64 KiB each way, 50 calls per transformation by default.