The format
A format built for the way American local government actually writes law.
A municipal code held in a vendor's own format is only as portable as the vendor is willing to be, and the day a town wants to leave is the day it finds out. We store yours as CS-Local, a format we built and publish in full, at the same address the files themselves point at.
It started from Akoma Ntoso, the international markup for legislation, which gave us a sound way to identify a provision and to record an amendment against it. It did not give us a way to say who adopted a chapter, whether a board can change it without a Town Meeting vote, or that a section number reads 14.05.030 in California and 1-14 in Maine. American local government is not one tradition: sixteen kinds of government publish codes, from cities and counties to townships, authorities and tribal governments. We read 738 complete codes across 25 states before deciding what the format had to hold.
So CS-Local is ours, and we would rather say that than imply a committee somewhere stands behind it. What makes it open is that it is written down: the specification, the grammars and a worked example are published at the namespace, in enough detail for somebody else to read our files without us.
Why it matters
- It is ours, and it is published
- We built CS-Local, starting from Akoma Ntoso and going well past it, because no existing format could describe the range of ways American local governments write law. The specification lives at the same URL our files point at, so a city, town or county can hand its XML to anyone and be understood.
- A code is more than its ordinances
- A fifth of the codes we surveyed contain chapters a legislature never voted on: subdivision rules, health regulations, wetlands regulations. CS-Local records which body adopted a chapter and what it takes to amend it, so a resident can tell a Town Meeting article from a board vote.
- The citation is the identifier
- Every provision is named for the way a person would cite it, so a link to § 240-4.5(A)(1) is the identifier for § 240-4.5(A)(1). Nothing has to be looked up, and a URL written into a decision keeps resolving.
- An amendment is part of the document
- The adopted text and the proposed text are two expressions of one work, and each change is recorded against the provision it changes. That is what makes the redline on this site a reading of the file rather than a picture of one.
- Definitions know where they apply
- Sherborn's Chapter 240 defines STRUCTURE three times: generally, for floodplain management, and again for historic districts. Each is scoped to the section that defines it, because a floodplain provision pointing at the general definition is wrong in a way that has consequences.
- Nothing is thrown away
- Editor's notes, disposition lists, reserved section numbers and the old portal's identifiers are all carried, each in its own element. A reserved number is a promise that nothing is missing, and a repealed section is where an old citation has to land.
What it looks like
A section of Sherborn's zoning bylaw, as it is stored.
<section eId="sec_240-4.5" GUID="38073776">
<num>240-4.5</num>
<heading>Open space residential subdivision</heading>
<subsection eId="sec_240-4.5__subsec_a">
<num>A.</num>
<intro><p>Purpose and intent: The primary purposes of this section are to:</p></intro>
<paragraph eId="sec_240-4.5__subsec_a__para_1">
<num>(1)</num>
<content><p>Further the goals and recommendations of the Master Plan,
<ref href="#sec_240-6.1">§ 240-6.1</ref></p></content>
</paragraph>
</subsection>
</section>
The identifiers
Named for the citation, so a reference is a link and a link is a reference.
| Chapter | chp_240 |
| Article | art_IV |
| Section | sec_240-4.5 |
| Subsection A. | sec_240-4.5__subsec_a |
| Paragraph (1) | sec_240-4.5__subsec_a__para_1 |
| A defined term | sec_240-1.5__def_building |
| A zoning district | dist_ra |
Read the files
Sherborn's Chapter 240, both expressions, downloadable by anyone without an account.
- 240-adopted.xml the bylaw as it stands
- 240-proposed.xml with the amendments before Town Meeting, marked
- 240-proposed.docx the same amendments as Word tracked changes
The full specification, including every rule a schema cannot express, is CS-Local 1.0, published with the profile registry and a worked example. It is the contract our converter emits against and our renderer reads, and it is the document somebody replacing us would work from.