Skip to content

Releases: CorrelAid/formtransform

v0.1.7

Choose a tag to compare

@jstet jstet released this 25 Sep 10:17
a4013ea

New

  • Exclusive answers in select_multiple (#53, convention:exclusiveChoice). Mark a choice with exclusive: yes (also true/1) on the choices sheet, e.g. "Keine Angabe" or "Nichts davon".
    • LimeSurvey TSV: the question gets exclude_all_others with those codes, so LimeSurvey unticks the other answers. Verified to survive import.
    • LimeSurvey TSV → XLSForm: restored as exclusive: yes.
    • DDI: no field for it; unchanged.
    • validateSubset warns on an unrecognised value, and on a mark that no select_multiple uses (e.g. on a select_one list).
    • The generated skill documents the column, so the skill archive's contents changed.
  • SHA256SUMS release asset: checksums of all archives, also listed below.

Checksums (SHA-256)

61aadec2d9c45dd3cc78930a67295405f009a2805271165338d742f08f3bf00c  cdl-survey-types-0.1.7.tar.gz
bad18a59d5e1867123b942fb57dd3fae37114cac079cfa7dd91b29f2571626fd  correlaid-formtransform-0.1.7.tgz
7cb163d2521ed199708ae5c6d3f0ea18a86cc72f6ebcd5e247ef13cdbcf9a392  formtransform-fixtures-0.1.7.tar.gz

v0.1.6

Choose a tag to compare

@jstet jstet released this 25 Sep 10:00
0bd4800

New

  • Subset check for DDI (#52). validateSubset(survey, choices, { target: 'ddi' }) checks:

    • registered types
    • resolvable choice lists
    • unique names and codes
    • the appearance allowlist
    • empty labels

    It leaves out LimeSurvey's name/code limits, since DDI keeps names as authored (full_name is fine). SubsetTarget is exported. buildDdiXml itself still doesn't validate; call the check first.

  • CLI:

    • xlsform2ddi runs the DDI check by default: Kobo forms convert as is, and unregistered types (geopoint, image, …) are rejected with the findings listed. --skip-validation converts anyway.
    • validate --target lstsv|ddi.
  • Fixtures release asset (formtransform-fixtures-<version>.tar.gz): registry/entities/ and tests/fixtures/surveys/ at their repo paths, for golden tests against the prebuilt package.

Behavior change (CLI): xlsform2ddi no longer applies the LimeSurvey name gate, but now rejects unregistered types unless --skip-validation is given.

v0.1.5

Choose a tag to compare

@jstet jstet released this 25 Sep 09:35
bf4d867

Fixes

  • validateSubset checks choice lists (#48):

    • a code used twice within one list → error, also rejected by the strict loader gate (duplicate codes collide in LimeSurvey)
    • a choice row with a list_name but no code → error (it was silently skipped)
    • an empty choice label → warning; for multilingual lists it names the languages that lack a label

    The same code in different lists stays fine.

Behavior change: forms with duplicate codes within a list no longer load with validation on.

v0.1.4

Choose a tag to compare

@jstet jstet released this 25 Sep 08:14
73a9f56

Fixes

  • FieldSanitizer output always passes the validator (#44). The convention:sanitization rule used to strip only _ and -. It now:

    1. transliterates ä→ae, ö→oe, ü→ue (and capitals), ß→ss
    2. drops other diacritics (é→e)
    3. deletes everything outside [a-zA-Z0-9]

    Examples: aktivitätshäufigkeit → aktivitaetshaeufigke, job satisfaction → jobsatisfaction, the code täglich → taegl. Input with no letter or digit left throws. ${ref} references resolve to the sanitized name.

Who sees different names: direct FieldSanitizer callers, and conversions with validation skipped. Strict validation already rejected these names.

Docs

  • The generated skill (cdl-survey-types) no longer tells authors to use snake_case, which the validator rejects. The skill archive's contents changed, so its checksum is new.
  • README: corrected the name rule.

v0.1.3

Choose a tag to compare

@jstet jstet released this 24 Sep 16:45
9268dd6

Fixes

  • Selects with unresolvable answer options are rejected (#41).
    • XLSValidator.validateSubset now reports an error for a select_one/select_multiple with no list name or with a list that has no rows on the choices sheet.
    • It also reports an error for a select_*_from_file with no file or with a file that isn't a registered vocabulary.
    • New optional { fileChoices } argument (type SubsetOptions): CSVs you pass to convert() count as resolved. formtransform validate reads CSVs beside the form.
    • The converter throws for the same cases, with a message naming the question. Before, it emitted a question with no answers, or said "Unimplemented XLSForm type" for a missing file.

Behavior change: a form with an empty or missing choice list no longer converts.

v0.1.2

Choose a tag to compare

@jstet jstet released this 24 Sep 13:55
ad12509

New

  • range is a registered type (#33).
    • DDI: numeric / contin, matching qwacback.
    • LimeSurvey: numeric input N, with min_num_value_n / max_num_value_n taken from parameters start / end, and integer-only when start and step are whole numbers.
    • Converting back from LimeSurvey: an N with both bounds becomes range.
    • Limits: LimeSurvey has no step on N, so step is enforced only as integer vs. decimal, and it reads back as step=1.

Previously range was rejected by validation and TSV conversion, and it became text in DDI.

v0.1.1

Choose a tag to compare

@jstet jstet released this 24 Sep 12:59
1234d7c

Fixes

  • select_*_from_file converts to LimeSurvey TSV in the browser (#24). Registered vocabularies (registry/vocab/) are built into the library; convert() inlines them without file access. parseVocabCsv is exported for your own CSVs, and XLSFormParser.convertXLS{File,Data}ToTSV take fileChoices.
  • Quoted vocabulary labels. 14 ISO 3166-1 labels with a comma (e.g. Korea, Republic of) were cut at the comma in TSV output. Re-convert forms using iso_3166_1.csv.

New

  • Releases attach correlaid-formtransform-<version>.tgz (prebuilt, installs without a build step) and cdl-survey-types-<version>.tar.gz (#4):
    npm install https://github.com/CorrelAid/formtransform/releases/download/v0.1.1/correlaid-formtransform-0.1.1.tgz
  • qwacback DDI equivalence test under tests/live/qwacback/ (#14).
  • AI disclosure (#19).

Known

  • range isn't a registered type and converts to DDI as text (#33).

v0.1.0

Choose a tag to compare

@jstet jstet released this 24 Sep 12:21
336205c

First tagged release of @correlaid/formtransform and the schematron-worker image. Pin this instead of a commit SHA.

npm install github:CorrelAid/formtransform#v0.1.0
docker pull ghcr.io/correlaid/schematron-worker:v0.1.0   # published by this tag

What's in it

  • Conversions: XLSForm ↔ LimeSurvey TSV, XLSForm / LimeSurvey TSV → DDI-Codebook 2.5, plus the DDI response-data CSV (buildDataCsv, lstsvToDataCsv). The CLI takes --data for xlsform2ddi and lstsv2ddi. See RESPONSE_DATA.md for the path from a Kobo or LimeSurvey export.
  • Browser-safe library: everything exported from the package root works in a browser (ARCHITECTURE.md, "The browser boundary"). That includes parseResponses, XLSValidator, QUESTION_TYPES and APPEARANCES.
  • Generated sub-skill: skills/cdl-survey-types/.

Fixed just before this tag (#28)

  • Skip logic in browser bundles (#23): browser bundles no longer silently turn every relevant into 1. js-xpath is replaced by an in-repo parser, so no bundler alias or patch is needed.
  • Parentheses: they're now preserved in converted expressions (a and (b or c) used to become a and b or c, in Node too). Re-convert any survey converted before this release.
  • Loud failures: relevance or calculations that can't be converted now fail the conversion instead of degrading to 1.