feat(ddi)!: every form field in the codebook, standard DDI first (#153) - #158
Merged
Merged
Conversation
convention:ddiFields maps every Instrument field to a standard DDI 2.5 element or attribute, a typed `cdl:` note where DDI has none, or a documented loss; a unit test fails when a field has none of these. Standard DDI: - the hint is `qstn/postQTxt` (was merged into `preQTxt`); `preQTxt` is only a note row before the question or a grid's / select_multiple's shared text. Grid members and select_multiple options now keep their hints, so `hint-dropped` is LimeSurvey-only. - `varFormat/@category` date / time; `var/@dcml="0"` for integer; `valrng/range` for a range's start/end; - `qstn/@seqNo` (position among the data questions) and `qstn/backward` (the var / varGrp IDs its relevant refers to). Typed notes: `cdl:default`, `cdl:appearance`, `cdl:parameters` (what no element holds), a group's `cdl:hint` per language, `cdl:exclusive` on a select_multiple's varGrp, `stdyDscr/notes type="cdl:setting"` for style. xlsform2lstsv writes `num_value_int_only=1` for an integer, and a LimeSurvey N with it reads back as integer, so integer survives both ways. BREAKING CHANGE: the question hint moves from `preQTxt` to `postQTxt`; readers taking the hint from `preQTxt` must read `postQTxt`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #153. Part 3 of #155, after #151 (logic) and #152 (structure).
Breaking for DDI readers: the question hint moves from
preQTxttopostQTxt(the layout agreed with qwacback on #153, tracked in qwacback#37).Standard DDI wherever one fits
qstn/postQTxt, one perxml:lang. Grid members and select_multiple options now keep theirs.qstn/preQTxtonly; no longer joined with the hintqstn/ivuInstr, now also on select_multiple optionsvarFormat/@category="date"/"time"var/@dcml="0"start/endvalrng/range/@min/@max(registry defaults when not authored)qstn/@seqNo, the position among the data questions (a select_multiple's options share it)relevantdepends onqstn/backward/@qstn, the IDs of the referenced var or varGrpcdl:notes only where DDI 2.5 has no placecdl:default,cdl:appearance,cdl:parameters(only what no element holds, e.g.step=5,randomize=true), a group'scdl:hint(per language),cdl:exclusive(codes, on the select_multiple'svarGrp), andstdyDscr/notes type="cdl:setting" subject="style".Guard
registry/conventions/ddiFields.jsonldmaps every field ofsrc/instrument/types.tsto one of three things: a standard DDI element, acdl:note, or a documented loss.tests/ts/unit/ddi/fields.test.tsfails when a field has no entry, or when the convention names a field that doesn't exist.calculationand other unlifted columns, a choice list's name, theor_othershorthand as such, andGroupItem.closed.LimeSurvey: integer vs decimal
num_value_int_only=1forinteger, and anNquestion with it reads back asinteger.Checks
fields.test.ts.<qstn responseDomainType="…"without the closing>, sinceseqNofollows it.npm run validateand the drift check are clean.🤖 Generated with Claude Code