Skip to content

Add locatorType field to citationMark schema #30

@gvonness-apolitical

Description

@gvonness-apolitical

Summary

The citationMark schema in semantic.schema.json defines a locator field but has no corresponding locatorType field to indicate what the locator refers to (page, chapter, section, etc.).

Current schema

"locator": {
  "type": "string",
  "description": "Page, chapter, section, or other locator (CSL-compatible, more general than pages)"
}

Proposed addition

Add a locatorType property alongside locator:

"locatorType": {
  "type": "string",
  "description": "Type of locator (CSL-compatible). Defaults to \"page\" if omitted.",
  "enum": [
    "page", "chapter", "section", "paragraph", "line",
    "verse", "volume", "issue", "part", "book",
    "figure", "table", "note", "opus", "sub-verbo"
  ]
}

Rationale

  • CSL compatibility: The Citation Style Language distinguishes locator (the value, e.g., "42-45") from locator-type (the kind, e.g., "page"). Without the type, renderers must guess or default to "page".
  • Existing usage: The cdx-core reference implementation already emits locatorType in its citation_with_page() constructor. The field passes validation today only because additionalProperties: true, but it should be an explicit part of the schema.
  • Renderer clarity: A citation like locator: "III" is ambiguous without knowing whether it refers to chapter III, volume III, or part III.

Impact

Non-breaking — this adds an optional property. Existing documents without locatorType remain valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions