Page 1 of 1

shorten a XPATH expression (or-junction)

Posted: Wed Feb 14, 2018 3:33 pm
by mariomueller
Hi all,

is there a way to write to expression

Code: Select all

<xsd:assert test="(G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z30') or (G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z31') " />
in a shorter way like e.g. (the following is not working, as also Z99 would be valid and I don't no why?)

Code: Select all

<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051='Z30' or 'Z31' " />

Thanks
Regards
Mario

Re: shorten a XPATH expression (or-junction)

Posted: Wed Feb 14, 2018 5:33 pm
by adrian
Hi,

Try:

Code: Select all

<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/(D_4051=('Z30', 'Z31'))" />
Regards,
Adrian

Re: shorten a XPATH expression (or-junction)

Posted: Thu Feb 15, 2018 6:32 am
by mariomueller
Hi Adrian,

thanks for your reply. Unfortunatelly this does not work :-(

Regards
Mario

Re: shorten a XPATH expression (or-junction)

Posted: Thu Feb 15, 2018 6:44 am
by mariomueller
Hi adrian,

I found it. This works:

<xsd:assert test="G_SG8/G_SG10/S_CCI[D_7059='Z01']/D_4051=('Z30','Z31')"/>

Regards
Mario