.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "s1kd-repcheck" "1" "2024-03-21" "" "s1kd-tools" .hy .SH NAME .PP s1kd-repcheck - Validate CIR references in S1000D CSDB objects .SH SYNOPSIS .IP .nf \f[C] s1kd-repcheck [options] [...] \f[R] .fi .SH DESCRIPTION .PP The \f[I]s1kd-repcheck\f[R] tool validates references to Common Information Repository (CIR) items within S1000D CSDB objects. Any CIR references which cannot be resolved to a specification within a CIR data module will cause the tool to report an error. .SH OPTIONS .TP -A, --all-refs Validate indirect tool/supply/part CIR references using the element \f[C]\f[R]. Normally, only the direct reference elements \f[C]\f[R], \f[C]\f[R] and \f[C]\f[R] are validated. .TP -a, --all In addition to CIR data modules specified with -R or explicitly linked in CIR references, allow CIR references to be resolved against any CIR data modules that were specified as objects to check. .TP -D, --dump-xsl Dump the built-in XSLT used to extract CIR references. .TP -d, --dir The directory to start searching for CIR data modules in. By default, the current directory is used. .TP -F, --valid-filenames Print the filenames of valid objects. .TP -f, --filenames Print the filenames of invalid objects. .TP -h, -?, --help Show help/usage message. .TP -L, --list-refs List CIR references found in objects instead of validating them. .TP -l, --list Treat input as a list of CSDB objects to check. .TP -N, --omit-issue Assume that the issue/inwork numbers are omitted from object filenames (they were created with the -N option). .TP -o, --output-valid Output valid CSDB objects to stdout. .TP -p, --progress Display a progress bar. .TP -q, --quiet Quiet mode. Error messages will not be printed. .TP -R, --cir A CIR to resolve references in CSDB objects against. Multiple CIRs can be specified by using this option multiple times. .RS .PP If \[dq]*\[dq] is given for , the tool will search for CIR data modules automatically. .RE .TP -r, --recursive Search for CIR data modules recursively. .TP -T, --summary Print a summary of the check after it completes, including statistics on the number of objects that passed/failed the check. .TP -t, --type Validate or list only CIR references of the specified type. The built-in types are: .RS .IP \[bu] 2 acp (Access point) .IP \[bu] 2 app (Applicability annotation) .IP \[bu] 2 caut (Caution) .IP \[bu] 2 cbr (Circuit breaker) .IP \[bu] 2 cin (Control/Indicator) .IP \[bu] 2 ent (Enterprise) .IP \[bu] 2 fin (Functional item) .IP \[bu] 2 part .IP \[bu] 2 supply .IP \[bu] 2 tool .IP \[bu] 2 warn (Warning) .IP \[bu] 2 zone .RE .TP -v, --verbose Verbose output. Specify multiple times to increase the verbosity. .TP -X, --xsl Use custom XSLT to extract CIR references. .TP -x, --xml Print an XML report of the check. .TP -\[ha], --remove-deleted Validate with elements that have a change type of \[dq]delete\[dq] removed. CIR data modules with an issue type of \[dq]deleted\[dq] will also be ignored in the automatic search when this option is specified. .TP --version Show version information. .TP --zenity-progress Print progress information in the zenity --progress format. .TP ... Object(s) to check CIR references in. .PP In addition, the following options allow configuration of the XML parser: .TP --dtdload Load the external DTD. .TP --huge Remove any internal arbitrary parser limits. .TP --net Allow network access to load external DTD and entities. .TP --noent Resolve entities. .TP --parser-errors Emit errors from parser. .TP --parser-warnings Emit warnings from parser. .TP --xinclude Do XInclude processing. .TP --xml-catalog Use an XML catalog when resolving entities. Multiple catalogs may be loaded by specifying this option multiple times. .SS Custom XSLT (-X) .PP What elements are extracted as CIR references for validating, and how they are validated, can be configured through a custom XSLT script specified with the -X (--xsl) option. .PP The custom XSLT script should add the following attributes to elements which will be validated as CIR references: .TP \f[B]\f[CB]type\f[B]\f[R] A name for the type of CIR reference. .TP \f[B]\f[CB]name\f[B]\f[R] A descriptive name for the CIR reference that can be used in reports. .TP \f[B]\f[CB]test\f[B]\f[R] An XPath expression used to match the corresponding CIR identification element. .PP The namespace for these attributes must be: \f[C]urn:s1kd-tools:s1kd-repcheck\f[R] .PP Example XSLT template to extract functional item references: .IP .nf \f[C] fin Functional item //functionalItemIdent[\[at]functionalItemNumber=\[aq] \[aq]] \f[R] .fi .PP A custom script also allows validating non-standard types of \[dq]CIR\[dq] references. For example, if a project wants to validate acronyms used in data modules against a central repository of acronyms, this could be done like so: .IP .nf \f[C] acr Acronym //acronym[acronymTerm = \[aq] \[aq]] \f[R] .fi .PP As there is no standard \[dq]acronym\[dq] CIR type, the object containing the repository would need to be specified explicitly with -R. .PP The built-in XSLT for extracting CIR references can be dumped as a starting point for a custom script by specifying the -D (--dump-xsl) option. .SH EXIT STATUS .TP 0 The check completed successfully, and all CIR references were resolved. .TP 1 The check completed successfully, but some CIR references could not be resolved. .TP 2 The number of CSDB objects specified exceeded the available memory. .SH EXAMPLE .PP Part repository: .IP .nf \f[C] ABC part \f[R] .fi .PP Part references in a procedure: .IP .nf \f[C] 1 1 \f[R] .fi .PP Command and results: .IP .nf \f[C] $ s1kd-repcheck -R ... s1kd-repcheck: ERROR: (): Part 12345/DEF not found. \f[R] .fi .SH AUTHORS khzae.net.