metacore icon indicating copy to clipboard operation
metacore copied to clipboard

Dependence on non-standard Define-XML conventions

Open lexjansen opened this issue 10 months ago • 1 comments

Looking at the code of xml_builders.R and xml_helpers.R I noticed that there are some assumptions about Define-XML that are non-standard, and not defined in the Define-XML specification.

  1. There is an assumption that a prefix "def" is used for the Define-XML namespace (http://www.cdisc.org/ns/def/v2.1 for Define-XML 2.1). Although recommended as best practice to make it easier for users to understand and implement Define-XML, and to aid in the comparison of documents. In practice, other namespace prefixes can be used—as long as the Define-XML conforms to the rules of XML namespaces.
  2. In several places in the code I see that assumptions are made about conventions for OIDs. For example, OIDs for ItemGroupDef elements can not be assumed to have a structure "IG." and OIDs for variables can not be assumed to have structure "IT.". It is problematic when code makes any assumptions about the convention for OIDs. Trying to extract information, like names, from OIDs will fail when a Define-XML file does not follow an imposed and non-standard OID convention. It will limit the Define-XML files that will be supported by metacore. From the Define-XML specification: "The value of an OID attribute has no intrinsic meaning. Although some may find convenience in applying a predefined convention for assigning values to aid readability (as illustrated throughout this document), no meaning should be attached to the OID value. The significance of an OID value is simply that it is used to reference an object defined elsewhere, and no additional semantics are implied."

lexjansen avatar Sep 01 '23 01:09 lexjansen

Thank I will look into this

statasaurus avatar Oct 13 '23 08:10 statasaurus