Learn R Programming

DDIwR (version 0.24)

updateSchema: Update the internal DDI Codebook schema object.

Description

Extract structural facts from a Codebook XSD while preserving the existing R naming conventions and curated descriptive metadata.

Usage

updateSchema(xsd = NULL, return = FALSE)

Arguments

xsd

Path or URL to codebook.xsd. Defaults to the pinned 2.6 release.

return

Return the proposed list without changing the in-memory cache.

Author

Adrian Dusa

Details

The extractor follows type inheritance, restrictions, local elements and attribute groups. Each element receives a parent-specific contentModel containing sequence/choice particles and numeric min/max occurrence bounds. PHRASE, FORM, imported markup groups and wildcards remain outside the simplified child model. Existing descriptions, examples, recommendations and deprecation flags are preserved; new records use schema documentation.

Inspect updateSchema(xsd, return = TRUE) before applying a different schema. Structural facts are refreshed, including removed/prohibited attributes. Legacy element-wide optional/repeatable flags are retained for existing records; validation uses contentModel. No source files are overwritten.