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
}
}
}| Field | Rules |
|---|---|
| endpoint | Absolute https URL, no query string or credentials. http only for localhost with XsltCompose__Development__AllowLocalhostHttp. |
| authentication | ManagedIdentity (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). |
| cacheWithinTransform | Answers for repeated values are reused within one transformation. |
| retryCount | Must be 0: the bridge never retries. Use the action's retry policy. |
The Function contract
- Request:
POSTwith{"value": "…"}as JSON, plusx-correlation-id,traceparent, and the key or bearer token. - Answer: HTTP 200
text/plainUTF-8; the body is used exactly as is. - Anything else fails the action: 401/403 give
FunctionAuthenticationFailed; 404, 429, 5xx, redirects and network errors giveFunctionHttpFailed; a wrong content type or an oversized body givesFunctionResponseInvalid. 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.