Skip to content

data: add the Qurʾān as a work with a sura-verse citation system #23

Description

@maehr

Affected file, TextRefs ID, or URL

New: works/quran.yaml and systems/quran-sura-verse.yaml.

Citation system

quran-sura-verse — sura and verse (āya), e.g. 2:255.

What is wrong or missing?

The registry carries the Tanakh and the New Testament but not the Qurʾān. It is the most
obvious remaining gap in the scriptural set, and its citation system is the strongest case
in the whole corpus survey: sura-and-verse is stable, universal, edition-independent, and
has a fixed and closed extent. AGENTS.md already names quran as a valid bare key.

The work and the system are straightforward. The resolver is the hard part, and both
candidates the survey proposes turn out to have problems. Details under evidence.

Suggested correction or new value

The system. 114 suras, 6,236 verses in the Kufan counting that the 1924 Cairo edition
fixed and that effectively every modern citation follows.

key: quran-sura-verse
preferred_label: Sura and verse (Qurʾān)
description: >-
  Sura and verse (āya) numbering of the Qurʾān, in the Kufan counting of the
  1924 Cairo edition. 114 suras, 6,236 verses. Canonical form: two positive
  integers without leading zeros, separated by a colon.
locator_regex: '^(?<sura>[1-9][0-9]{0,2}):(?<verse>[1-9][0-9]{0,2})$'

Add chapter_sizes: with the 114 verse counts. That is what makes {verseGlobal} available,
the same mechanism systems/dhammapada-chapter-verse.yaml uses, and it also lets the
compiler reject an out-of-range verse rather than minting 2:999.

Note the separator. Every other system in the registry uses a dot. The colon is what Qurʾānic
citation actually uses, and locators may not contain / but may contain :. Decide
deliberately; changing it later re-mints every reference UUID.

The work.

work:
  key: quran
  preferred_label: Qurʾān
  # no creators: — anonymous/revealed corpus, per the CSL rule in AGENTS.md
alternative_labels: ['Quran', 'Koran', 'al-Qurʾān', 'القرآن']
citation_system: quran-sura-verse

Use references_range: — the verse space is regular, complete, and source-defined, which is
exactly the case that rule names.

The resolvers — unresolved, and the reason this issue may need splitting. Neither
candidate is ready:

  • Corpus Coranicum (BBAW) is the scholarly first choice and it is verse-addressable,
    but only through a view-specific route, and it cannot be link-checked by fetch. See below.
  • Tanzil uses a URL fragment, which is never sent to a server. It cannot be link-checked
    at all, by us or by anyone automating against the registry.

Options: ship the work and system with Corpus Coranicum on the /commentary view and an
honest last_checked from a browser; or ship the work and system with no resolver and open
a follow-up. Prefer the first if a reviewer confirms coverage; prefer the second if not.

Evidence and sources

Checked 2026-08-25. Browser checks were required; curl alone proves nothing on either site.

Corpus Coranicum — the survey's URL is wrong. corpuscoranicum.de/en/verse-navigator/ sura/2/verse/255 returns HTTP 200 but renders the literal text "404 Not Found." There is no
bare verse route. Reading the route table out of the app bundle (js/app.1ac292a1.js) gives
the real shapes:

/:lang(de|en|fr)/verse-navigator/sura/:sura/verse/:verse/commentary
                                                        /manuscripts
                                                        /variants
                                                        /intertexts
                                                        /print
                                                        /concordance/word/:word

Confirmed in a browser by the rendered document.title:

URL Title
…/sura/1/verse/1/commentary Sure 1 — al-fātiḥa — »Die Eröffnende« > Commentary Surah 1 Verse 1
…/sura/2/verse/255/commentary > Commentary Surah 2 Verse 255
…/sura/2/verse/255/manuscripts Manuscripts Surah 2 Verse 255
…/sura/999/verse/999/commentary > Commentary Surah 999 Verse 999

Three caveats, all of which a reviewer should weigh:

  1. The server returns byte-identical HTML for every path, including nonsense ones — same
    Content-Length, same ETag. Routing is entirely client-side. No automated link check
    can ever validate one of these URLs.
  2. An out-of-range verse is not rejected. sura/999/verse/999 renders a page. Same risk
    class as the Scaife fallback documented in the companion Perseus issue.
  3. Coverage looks partial. Sura 1:1 renders with the sura name resolved from data; 2:255
    renders with that prefix empty. The academy project ran 2007–2024 and is concluded, so
    some verses may simply have no commentary. Spot-check before committing to /commentary
    as the view.

Tanzil. The candidate tanzil.net/#2:255 is a fragment, which browsers never send to the
server. Per-verse resolution cannot be confirmed by fetch, and no query-parameter equivalent
was found: tanzil.net/?sura=2&aya=255 returns the same shell, /api/ is 404, and
/docs/api exists but reads "This topic does not exist yet."

Verse counts. Take them from the Tanzil Quran metadata
(https://tanzil.net/docs/quran_metadata), which documents sura, juzʾ, rukūʿ and sajda
structure. Only the numbering is used, which is factual, not the text.

Rights or licence note

No Qurʾānic text enters the registry — locators and resolver URLs only.

Tanzil's text licence is CC BY 3.0 (https://tanzil.net/docs/text_license): verbatim copying
permitted, modification forbidden, attribution with a link required. That governs the text,
not the act of linking, but record it if Tanzil becomes a resolver.

Corpus Coranicum publishes no licence reachable without JavaScript; the imprint route is
/{lang}/imprint. Record access: open with license_url: only, following the BHS
precedent in #19.

Activity

  1. added
    dataRegistry record content
    triageNeeds maintainer triage
    on Aug 25, 2026
  2. maehr commented on Aug 25, 2026

    @maehr
    MemberAuthor

    Part of #28, the corpus survey tracking issue.

  3. maehr commented on Aug 25, 2026

    @maehr
    MemberAuthor

    Implemented as far as it goes in #32 (draft, blocked on textrefs/textrefs.org#94). Three findings that correct this issue:

    1. Use /print, not /commentary. The print view rejects an out-of-range verse — 999:999 and 2:9999 both render Error 404. The requested resource could not be found. /commentary does not, as this issue reports. So caveat 2 above ("An out-of-range verse is not rejected") does not apply to /print, which makes it both better covered and safer. Checked 2026-08-25 across 1:1, 2:255, 18:10, 55:13, 78:1, 112:1 and 114:6; every one renders Sure N Vers M against the Cairo 1924 print. Caveat 1 stands: routing is client-side, so no automated link check can validate these URLs.

    2. chapter_sizes: would be inert here, and does not do what this issue expects. It gates exactly one thing — the {verseGlobal} template variable — and only for systems whose capture groups are named chapter and verse (scripts/compile.ts:168-184). This system names them sura and verse. And it does not "let the compiler reject an out-of-range verse": the verse is added to the offset without ever being compared to chapter_sizes[ch-1]. Only an out-of-range chapter is caught, and then only by dropping the resolver target with a warning. The 114 counts belong under references_range.counts, where they actually bound the reference set.

    3. The colon is the blocker, and it is a compiler limitation. expandRange hardcodes . for every multi-part range kind (compile.ts:68-74), while the system's locator_regex is the real definition of the canonical form. assertValidLocator then rejects the expansion. Filed as textrefs/textrefs.org#94 with a proposed separator field defaulting to ..

    Verse counts in #32 come from the Tanzil metadata XML (https://tanzil.net/res/text/metadata/quran-data.xml), parsed and checked: 114 suras, indices 1–114 with no gap, sum 6,236.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataRegistry record contenttriageNeeds maintainer triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions