Hi Guy,
Please forgive me if I did not get your requirement correctly... but, I guess you want to make your ESQL code independent on a namespace value, isn't it? If so, you can declare namespace variables initializing them as strings, as in:
DECLARE myNS NAMESPACE 'http://schemas.myCompany.com/corporate/headers/v1_0';
and so, you could either read the namespace from the input message:
SET inputNamespace = FIELDNAMESPACE(InputRoot.SOAP.Body);
or from a UDP... just save the string it contains into a namespace variable (dunno if that's a game changer or just a trick, but I guess that did it for me), and then make your ESQL read it from a variable as in:
SET OutputRoot.SOAP.Body.{inputNamespace}:Fault.(XMLNSC.NamespaceDecl)xmlns:soap = inputNamespace;
I hope this helps! :)
------------------------------
Victor Garcia
IBM
------------------------------
Original Message:
Sent: Fri April 16, 2021 04:33 AM
From: Guy Clarke
Subject: Parameterising namespaces
Hi Matthias,
Thanks for the response. I have tried UDP but as its a string it doesn't work as a namespace, or am I missing a trick?
How do you convert strings into code? Is that how you would use a UDP, convert it to a namespace?
Yes at the start of the flow we know what version of the message we want. The Swift support pac supports 3 different versions, when a new pac is available with the Swift for the latest year I want to deploy that but continue to support the current year. The pac has UDPs to tell it which year we are working with. So if I can parameterise the namespaces in the ESQL, and we are not using new fields, then we can switch to the next version without code changes. Obviously if you want to take advantage of new features you may have to change code, but if the differences are simply validation then you want to avoid code changes ideally.
------------------------------
Guy Clarke
------------------------------
Original Message:
Sent: Thu April 15, 2021 05:42 PM
From: Matthias Jungbauer
Subject: Parameterising namespaces
Outside the scope of the support pacs, I would have plenty of ideas.
Working with UDP should work, but it is not that flexible.
Converting strings into code works.
What is the starting point of your flow?
Does your input message know what version of swift/iso to work with?
You can configure the DFDL parser at design time, deployment time and run time.
------------------------------
Matthias Jungbauer