Hello all,
I am having a bit of a problem trying to make this xpath expression work. Here is my attempt:
xpath(
outputs('Compose_3'),
concat(
'count(//root/item[starts-with(., "',
first(split(item(), '|')),
'") and normalize-space(substring-after(substring-after(., ";"), ";")) != "" and contains(., ";',
substring-before(substring-after(item(), "|"), ";"),
'")])'
)
)
Here is a sample input for this xpath which is generated from the XML output
"Data and Analytics|2024-09;2024-09-30;",
"Data and Analytics|2024-09;2024-09-30;",
"Enterprise App and Emerging Tech|2024-09;2024-10-01;",
"Enterprise App and Emerging Tech|2024-09;2024-10-01;",
"Mobility and Customer Experience|2024-09;2024-10-07;2024-12-31",
"Mobility and Customer Experience|2024-09;2024-10-07;2024-12-31",
"Mobility and Customer Experience|2024-10;2024-10-27;2024-11-07",
"Data and Analytics|2024-10;2024-10-23;2024-12-08",
"Data and Analytics|2024-10;2024-10-23;2024-12-08",
"Cloud - Infra - CS and Obser|2024-10;2024-10-24;2024-12-15"
A sample of the XML Output:
<root><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-07-30;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Enterprise App and Emerging Tech|2024-07;2024-08-08;</item><item>Data and Analytics|2024-08;2024-08-28;</item><item>Enterprise App and Emerging Tech|2024-08;2024-09-05;2024-12-12</item><item>Enterprise App and Emerging Tech|2024-08;2024-08-31;2024-09-19</item><item>Cloud - Infra - CS and Obser|2024-09;2024-09-30;2024-10-03</item><item>Data and Analytics|2024-09;2024-09-30;</item><item>Data and Analytics|2024-09;2024-09-30;</item><item>Enterprise App and Emerging Tech|2024-09;2024-10-01;</item><item>Enterprise App and Emerging Tech|2024-09;2024-10-01;</item><item>Mobility and Customer Experience|2024-09;2024-10-07;2024-12-31</item>
The objective of the xpath expression is to count all not-null values after the second ";" for each substring before "|" AND each substring between "|" and the first ";" such as "2024-09" from the sample above.