# BR-TMP-2

Source: https://xmlvalid.com/rules/BR-TMP-2

> BT-124 "External document location" muss eine absolute URL mit gültigem Schema enthalten.

- Level: error
- Rule sets: XRechnung 3.0 rules (UBL) 2.6.0
- Context: `/ubl:Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference | /cn:CreditNote/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference`
- Test: `matches(cbc:URI, $XR-URL-REGEX)`

> BT-124 "External document location" muss eine absolute URL mit gültigem Schema enthalten.

- Level: error
- Rule sets: XRechnung 3.0 rules (CII) 2.6.0
- Context: `/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument[ram:TypeCode = '916']`
- Test: `not(exists(ram:URIID)) or (matches(ram:URIID, $XR-URL-REGEX))`

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