Schematron

1 program Added 2026-02-08T15:57:34Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit c1dd9d7a43 · authored 2026-02-08T16:58:18+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/schematron
LLM (this repo) · 1Pldb

Related languages

s7 (0.28)Scheme-79 (0.28)SCM (0.28)Scheme48 (0.25)Steel (0.24)

LLM-contributed programs

Book Validation Schema

Provenance: commit c1dd9d7a43 · authored 2026-02-08T16:58:18+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.sch · added: 2026-02-08T15:57:34Z
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
  <title>Book Validation Schema</title>

  <pattern>
    <rule context="book">
      <assert test="title">
        A book must have a title.
      </assert>
      <assert test="author">
        A book must have an author.
      </assert>
      <assert test="string-length(isbn) = 13 or string-length(isbn) = 10">
        ISBN must be either 10 or 13 characters long.
      </assert>
    </rule>

    <rule context="book/publication_year">
      <assert test=". &gt;= 1450 and . &lt;= 2030">
        Publication year must be between 1450 and 2030.
      </assert>
    </rule>

    <rule context="book/price">
      <assert test="@currency">
        Price must have a currency attribute.
      </assert>
      <assert test=". &gt; 0">
        Price must be greater than zero.
      </assert>
    </rule>
  </pattern>
</schema>

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Schematron (mapped to pl/schematron). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Schematron/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← schemaorg Scheme →