Skip to content

feat(ddi)!: cells as authored, unlabelled groups, messages without a constraint (#160) - #163

Merged
jstet merged 1 commit into
mainfrom
feat/ddi-lossless-2
Sep 27, 2026
Merged

jstet merged 1 commit into
mainfrom
feat/ddi-lossless-2

Conversation

@jstet

@jstet jstet commented Sep 27, 2026

Copy link
Copy Markdown
Member

Follow-up to #162 (#160). It closes the small losses that PR left.

was lost now
constraint_message without a constraint a cdl:constraint_message note is written anyway
required spelling (TRUE) cdl:required holds the cell as authored; yes when there is no cell
guidance_hint inside parameters cdl:parameters holds the cell as authored; ivuInstr still has the hint
a group without a label marked with a new cdl:no_label note; txt stays its name, for readers that show one
consecutive notes that blank lines can't separate each note's own text goes in cdl:row_label, only when needed
a language used only in hints the form model now collects languages from every text column, not only label

The generated forms now include:

  • required spellings
  • messages without a constraint
  • unlabelled groups
  • notes with blank lines, and notes in only some languages

I ran 2000 per property locally.

Left, per ddi2xlsform/README.md:

  • unregistered types (calculate), which stay out by design
  • empty groups
  • columns the model doesn't lift (a separate PR is next)
  • whitespace in the type cell

Breaking

  • cdl:parameters now includes a guidance_hint.
  • cdl:constraint_message now appears without a constraint.
  • ddi2xlsform gives a guidance_hint inside parameters back as it was. pyxform rejects that when the hint has spaces. For hints_survey it rejects the source too, so its ddi2xlsform.json is now xfail with the same reason.

Checks

  • vitest: 1467 passed
  • pytest validation + codegen: 150 passed, 4 xfailed
  • worker gradle test, npm run validate and the drift check pass

🤖 Generated with Claude Code

…constraint (#160)

Closes the small losses #162 left:

- constraint_message is kept without a constraint
- cdl:required holds the cell as authored (TRUE, true), yes by default
- cdl:parameters holds the cell as authored, guidance_hint included
  (ivuInstr still has it), not only the parameters DDI has no element for
- cdl:no_label marks a group without a label (its txt stays its name)
- notes whose joined preQTxt can't be split at blank lines (a blank line
  in one, a language only some have) keep their own text in cdl:row_label
- the form model's languages come from every text column, not only label:
  a language only a hint has is no longer dropped

The generated forms cover all of these.

BREAKING CHANGE: cdl:parameters now includes a guidance_hint, and
cdl:constraint_message appears without a constraint. ddi2xlsform gives
back a guidance_hint inside parameters as it was, which pyxform rejects
when it has spaces (hints_survey, as its source).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jstet
jstet merged commit 672efe2 into main Sep 27, 2026
4 checks passed
@jstet
jstet deleted the feat/ddi-lossless-2 branch September 27, 2026 18:29
jstet added a commit that referenced this pull request Sep 27, 2026
…ts column (#166)

qwacback's old DDI → XLSForm export put the guidance hint into
`parameters` as `guidance_hint=<text>`. pyxform reads that cell as
space-separated key=value pairs, so a hint with spaces makes the form
invalid. Since #163 ddi2xlsform gives parameters back as authored, and
with it that invalid cell, which Kobo refuses.

The XLSForm writer now moves such a hint (its text has whitespace) to the
guidance_hint column. One without whitespace stays in parameters, so a
valid form still comes back as written. hints_survey's ddi2xlsform.json
is valid XLSForm again; its source stays an expected pyxform failure.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant