composition rule

composition.pattern

Use a declared pattern member with one annotation mode.

  • product: error
  • marketing: error
  • public: warning
  • docs: warning

Rationale

No separate rationale is authored; the rule statement above is authoritative.

Guidance

No separate guidance is authored. The rule's authored examples and fix policies follow below.

Checker behavior

Message

{captured} is not a valid Canon composition.

Applies in

  • heading
  • body
  • blockquote
  • list item
  • table cell
  • json key
  • glossary term
  • notation token

Detection

detector
composition.pattern
kind
delegated

Authored examples and fix policies

subtypes
[
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.bond",
                    "state": "under"
                  },
                  {
                    "axis": "axis.move",
                    "state": "under"
                  }
                ],
                "composition_id": "compose.pattern",
                "member_id": "pattern.abeyance"
              },
              "components": [
                {
                  "end": 4,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "pattern-member-valid",
          "profile": "patterns",
          "surface": "docs",
          "text": "B-V-"
        }
      ],
      "incorrect": [
        {
          "captured": "O+P-",
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.open",
                    "state": "over"
                  },
                  {
                    "axis": "axis.physical",
                    "state": "under"
                  }
                ],
                "composition_id": "compose.pattern"
              },
              "components": [
                {
                  "end": 4,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "pattern-member-invalid",
          "outcome_id": "violation",
          "profile": "patterns",
          "surface": "docs",
          "text": "O+P-"
        }
      ]
    },
    "id": "member",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  },
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.open",
                    "state": "over"
                  },
                  {
                    "axis": "axis.focus",
                    "state": "under"
                  }
                ],
                "composition_id": "compose.pattern"
              },
              "components": [
                {
                  "end": 4,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "pattern-state-annotation",
          "profile": "patterns",
          "surface": "docs",
          "text": "O+F-"
        }
      ],
      "incorrect": [
        {
          "captured": "O+4F-3",
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.open",
                    "magnitude": 4
                  },
                  {
                    "axis": "axis.focus",
                    "magnitude": -3
                  }
                ],
                "composition_id": "compose.pattern"
              },
              "components": [
                {
                  "end": 6,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "pattern-mixed-annotation",
          "outcome_id": "violation",
          "profile": "patterns",
          "surface": "docs",
          "text": "O+4F-3"
        }
      ]
    },
    "id": "annotation",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  }
]