Skip to content

buildDdiXml silently drops hint and guidance_hint #76

Description

@jstet

buildDdiXml drops the XLSForm hint column and parameters: guidance_hint=… without any warning, and validateSubset doesn't flag them either. Checked with v0.1.7:

buildDdiXml(
  [{ type: 'integer', name: 'a', label: 'A', hint: 'In years', parameters: 'guidance_hint=ask twice' }],
  [], { settings: {} },
);
// <qstn responseDomainType="numeric"><qstnLit>A</qstnLit></qstn>  — no preQTxt, no ivuInstr

Impact downstream. qwacback switched its XLSForm → DDI path to formtransform (CorrelAid/qwacback#3). Its old Go converter mapped:

  • hint → <qstn><preQTxt>
  • guidance_hint → <qstn><ivuInstr>

Both are now lost (CorrelAid/qwacback#12). qwacback's DDI → XLSForm direction still maps preQTxt → hint and ivuInstr → guidance_hint, so the round trip no longer holds. A note's text, which formtransform folds into the next question's preQTxt, also comes back as that question's hint.

Ask. One of:

  1. Support them: hint → preQTxt (merged with any folded note text, if both are present) and guidance_hint → ivuInstr, registered like the other columns. Or:
  2. If they're deliberately out of scope, have validateSubset report them (a warning at least) instead of dropping them silently, so that callers like qwacback's ddi-emitter can tell users.

qwacback's equivalence test already has a hint_and_guidance case (CorrelAid/qwacback#16) and will pick up the change once the pin is bumped.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions