# DT-CIUS-PT-020_11.5

Source: https://xmlvalid.com/rules/DT-CIUS-PT-020_11.5

> The BT-22 when prefixed with '#WITHHOLDINGTAXTYPE@WITHHOLDINGTAX-000#' is mandatory an element with the prefix '#WITHHOLDINGTAXAMOUNT@WITHHOLDINGTAX-000#'.

- Level: error
- Rule sets: CIUS-PT rules (Portugal, UBL) 2.1.1
- Context: `//ubl:Invoice/cbc:Note | //cn:CreditNote/cbc:Note`
- Test: `starts-with(normalize-space(.),$wht20_11) and (every $note in (ancestor::ubl:Invoice/cbc:Note | ancestor::cn:CreditNote/cbc:Note) satisfies (not(starts-with(normalize-space($note),concat('#WITHHOLDINGTAXAMOUNT@WITHHOLDINGTAX-',normalize-space(substring-before(substring-after(.,'#WITHHOLDINGTAXTYPE@WITHHOLDINGTAX-'),'#')),'#')))))`

Validate a document against these rules: https://xmlvalid.com/validate
