| testValid | R Documentation |
Attempts a minimal validation of a DDI Codebook element, by searching for mandatory elements and attributes.
testValid(element, monolang = TRUE)
element |
A standard element of class |
monolang |
Logical, the codebook file is monolingual |
This function currently attempts a minimal check for the absolute
most mandatory elements, such as the stdyDscr. An absolute bare version
of this element, filled with arbitrary default values, can be produced with
the function makeElement(), activating its attribute fill.
It also checks for chained expectations, that is element X is mandatory only
if the parent element is present.
Future versions will implement more functionality for recommended elements and attributes, with the intention to provide a 1:1 validation as offered by the "CESSDA Metadata Validator".
To ease the validation of the DDI Codebook XML files, the argument monolang
is activated by default. This means a single attribute xmlang in the main
codeBook element. For multi-language codebooks, an error is flagged if this
argument is missing where appropriate.
A character vector of validation problems found.
Adrian Dusa
makeElement
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.