Rules
Basic Info
|
Rule
|
When Dispatch Line Item Commodity Classification Code List ID is 'VRBL:MX:COFEPRIS', the value of the Dispatch Line Item Commodity Classification Code must be contained in COFEPRIS Sector Code [VRBL-CL-MX-COFEPRIS] (prefixed by 'VRBL:MX:'). Allowed values: VRBL:MX:01, VRBL:MX:02, VRBL:MX:03, VRBL:MX:04, VRBL:MX:05. |
|
Context
|
/ubl:DespatchAdvice/cac:DespatchLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode
|
|
Pattern
|
vrbl-despatchadvice-mx-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-MX-Prefix:$VRBL-CL-MX-COFEPRIS
|
| showValues |
= |
true
|
Implementation
(
not(@listID = concat($VRBL-MX-Prefix, 'COFEPRIS'))
)
or
(
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-MX-Prefix)) = $VRBL-MX-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-COFEPRIS, 1, 1)
)
)
and
contains(
$VRBL-CL-MX-COFEPRIS,
concat(
substring($VRBL-CL-MX-COFEPRIS, 1, 1),
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-COFEPRIS, 1, 1)
)
)
)
)
)