docs← Back to article

Markdown for LLMs

LDC-E5208 — Anchor quote missing from the fragment text

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E5208 — Anchor quote missing from the fragment text

## What it means

A `@source` anchor ties a rule to the exact place of its norm inside a
fragment: the `quote` must appear in the fragment official text as one
unbroken run of characters, byte for byte. A quote that skips words, comes
from another article, or is empty names no place at all. The compiler
reports the anchor and keeps the rule unlinked — copy the passage from the
fragment text exactly, or point the anchor at the fragment that holds it.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

source ACT { kind law; jurisdiction KZ; }
edition ED of ACT { language ru-KZ; officiality official;
  materialization_status ABSTRACT_ONLY; }
fragment ART1 in ED { kind article; locator "article/1";
  text ru-KZ official """Статья 1. Взнос уплачивается за расчётный месяц."""; }
relation paid(x: Text);
relation due(x: Text);
@source(ART1, quote = """Взнос месяц""")
rule GAP(x: Text) strict { when paid(x); then due(x); }
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

source ACT { kind law; jurisdiction KZ; }
edition ED of ACT { language ru-KZ; officiality official;
  materialization_status ABSTRACT_ONLY; }
fragment ART1 in ED { kind article; locator "article/1";
  text ru-KZ official """Статья 1. Взнос уплачивается за расчётный месяц."""; }
relation paid(x: Text);
relation due(x: Text);
@source(ART1, quote = """уплачивается за расчётный""")
rule GAP(x: Text) strict { when paid(x); then due(x); }
```

## Engine message

The engine reports this in its own wording:

```text
example.law:12:1: error LDC-E5208: @source(ART1): quote "Взнос месяц" is not found as a contiguous substring of the fragment official text — §33/§194 anchor quote not in fragment text
```

## Related

- [Sources](/constructs/sources/) — how anchors tie rules to fragment text.
- [Facts and evidence](/constructs/facts-and-evidence/) — how norms cite their origin.