fix(xlsform): a guidance_hint pyxform rejects in parameters becomes its column - #166
Merged
Merged
Conversation
…ts column 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>
Merged
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.
qwacback's old DDI → XLSForm export stored the guidance hint inside
parametersasguidance_hint=<text>. pyxform readsparametersas space-separatedkey=valuepairs, so a hint with spaces makes the form invalid. Since #163,ddi2xlsformgivesparametersback exactly as authored, including that invalid cell, and Kobo would refuse the result.Now the XLSForm writer moves such a hint, one whose text has whitespace, to the
guidance_hintcolumn. A hint without whitespace stays inparameters, so a valid form still comes back as written. The codebook doesn't change:cdl:parametersstays as authored.hints_survey'sddi2xlsform.jsonis valid XLSForm again, so its pyxform xfail is removed. Its source stays an expected failure.parameters, and one that moves.ddi2xlsform/README.mdlists it under known losses as a repair.Checks
npm run validateand the drift check pass🤖 Generated with Claude Code