/ .. / / -> download
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "s1kd-newdm" "1" "2021-04-16" "" "s1kd-tools"
.hy
.SH NAME
.PP
s1kd-newdm - Create a new S1000D data module
.SH SYNOPSIS
.IP
.nf
\f[C]
s1kd-newdm [options]
\f[R]
.fi
.SH DESCRIPTION
.PP
The \f[I]s1kd-newdm\f[R] tool creates a new S1000D data module with the
data module code and other metadata specified.
.SH OPTIONS
.TP
-#, --code <DMC>
The data module code of the new data module.
The prefix \[dq]DMC-\[dq] is optional.
.RS
.PP
If - is given for the code, a random data module code will be generated.
If only a model identification code is given instead (e.g.,
\f[C]-# TEST\f[R]), or the \f[C].defaults\f[R] file specifies a default
model identification code, this will be used as part of the random code.
The information type of the random code will be 000A-D.
.RE
.TP
-$, --issue <issue>
Specify which issue of S1000D to use.
Currently supported issues are:
.RS
.IP \[bu] 2
5.0 (default)
.IP \[bu] 2
4.2
.IP \[bu] 2
4.1
.IP \[bu] 2
4.0
.IP \[bu] 2
3.0
.IP \[bu] 2
2.3
.IP \[bu] 2
2.2
.IP \[bu] 2
2.1
.IP \[bu] 2
2.0
.RE
.TP
-\[at], --out <path>
Save the new data module to <path>.
If <path> is an existing directory, the data module will be created in
it instead of the current directory.
Otherwise, the data module will be saved as the filename <path> instead
of being automatically named.
.TP
-%, --templates <dir>
Use XML templates in the specified directory instead of the built-in
templates.
.TP
-\[ti], --dump-templates <dir>
Dump the built-in XML templates to the specified directory.
.TP
-,, --dump-dmtypes-xml
Dumps the built-in default \f[C].dmtypes\f[R] XML.
This can be used to quickly set up a starting point for a project\[aq]s
custom info codes, from which info names can be modified and unused
codes can be removed to fit the project.
.TP
-., --dump-dmtypes
Dumps the simple text form of the built-in default \f[C].dmtypes\f[R].
.TP
-!, --no-infoname
Do not include an info name for the new data module.
.TP
-a, --act <ACT>
ACT data module code.
.TP
-B, --generate-brex-rules
When creating a new BREX data module, use the \f[C].defaults\f[R] and
\f[C].dmtypes\f[R] files to add a basic set of context rules.
.TP
-b, --brex <BREX>
BREX data module code.
.TP
-C, --country <country>
The country ISO code of the new data module.
.TP
-c, --security <sec>
The security classification of the new data module.
.TP
-D, --dmtypes <dmtypes>
Specify the \f[C].dmtypes\f[R] file name.
.TP
-d, --defaults <defaults>
Specify the \f[C].defaults\f[R] file name.
.TP
-f, --overwrite
Overwrite existing file.
.TP
-h, -?, --help
Show help/usage message.
.TP
-I, --date <date>
Issue date of the new data module in the form of YYYY-MM-DD.
.TP
-i, --infoname <info>
The info name of the new data module.
.TP
-j, --brexmap <map>
Use a custom \f[C].brexmap\f[R] file when using the -B option.
.TP
-k, --skill <skill>
The skill level code of the new data module.
.TP
-L, --language <language>
The language ISO code of the new data module.
.TP
-M, --maintained-sns <SNS>
Determine the tech name from on one of the built-in S1000D maintained
SNS.
Supported SNS:
.RS
.IP \[bu] 2
Generic
.IP \[bu] 2
Support and training equipment
.IP \[bu] 2
Ordnance
.IP \[bu] 2
General communications
.IP \[bu] 2
Air vehicle, engines and equipment
.IP \[bu] 2
Tactical missiles
.IP \[bu] 2
General surface vehicles
.IP \[bu] 2
General sea vehicles
.PP
When creating a BREX data module, this SNS will be included as the SNS
rules of the new data module.
The \[dq]\f[C]maintainedSns\f[R]\[dq] \f[C].defaults\f[R] file key can
be used to set one of the above SNS as the default.
.RE
.TP
-m, --remarks <remarks>
Set remarks for the new data module.
.TP
-N, --omit-issue
Omit issue/inwork numbers from filename.
.TP
-n, --issno <issue>
The issue number of the new data module.
.TP
-O, --origcode <CAGE>
The CAGE code of the originator.
.TP
-o, --origname <orig>
The originator enterprise name of the new data module.
.TP
-P, --sns-levels <levels>
When determining tech name from an SNS (-S or -M), include the specified
number of levels of SNS in the tech name, from 1 (default) to 4.
Each level is separated by \[dq] - \[dq].
.RS
.PP
For example, if <levels> is 2, then:
.IP \[bu] 2
tech names derived from a subsystem will be formatted as \[dq]System -
Subsystem\[dq]
.IP \[bu] 2
tech names derived from a subsubsystem will be formatted as
\[dq]Subsystem - Subsubsystem\[dq]
.IP \[bu] 2
and tech names derived from an assembly will be formatted as
\[dq]Subsubsystem - Assembly\[dq].
.PP
If two levels have the same title, then only one will be used.
The \[dq]\f[C]snsLevels\f[R]\[dq] \f[C].defaults\f[R] file key can also
be set to control this option.
.RE
.TP
-p, --prompt
Prompts the user for any values left unspecified.
.TP
-q, --quiet
Do not report an error when the file already exists.
.TP
-R, --rpccode <CAGE>
The CAGE code of the responsible partner company.
.TP
-r, --rpcname <RPC>
The responsible partner company enterprise name of the new data module.
.TP
-S, --sns <BREX>
Determine the tech name from the SNS rules of a specified BREX data
module.
This can also be specified in the \f[C].defaults\f[R] file with the key
\[dq]\f[C]sns\f[R]\[dq], or the key \[dq]\f[C]brex\f[R]\[dq] if
\[dq]\f[C]sns\f[R]\[dq] is not specified.
.TP
-s, --schema <schema>
The schema URL.
.TP
-T, --type <schema>
The type (schema) of the new data module.
Supported schemas:
.RS
.IP \[bu] 2
appliccrossreftable - Applicability cross-reference table
.IP \[bu] 2
brdoc - Business rule document
.IP \[bu] 2
brex - Business rule exchange
.IP \[bu] 2
checklist - Maintenance checklist
.IP \[bu] 2
comrep - Common information repository
.IP \[bu] 2
condcrossreftable - Conditions cross-reference table
.IP \[bu] 2
container - Container
.IP \[bu] 2
crew - Crew/Operator information
.IP \[bu] 2
descript - Descriptive
.IP \[bu] 2
fault - Fault information
.IP \[bu] 2
frontmatter - Front matter
.IP \[bu] 2
ipd - Illustrated parts data
.IP \[bu] 2
learning - Technical training information
.IP \[bu] 2
prdcrossreftable - Product cross-reference table
.IP \[bu] 2
proced - Procedural
.IP \[bu] 2
process - Process
.IP \[bu] 2
sb - Service bulletin
.IP \[bu] 2
schedul - Maintenance planning information
.IP \[bu] 2
scocontent - SCO content information
.IP \[bu] 2
techrep - Technical repository (replaced by comrep in issue 4.1)
.IP \[bu] 2
wrngdata - Wiring data
.IP \[bu] 2
wrngflds - Wiring fields
.RE
.TP
-t, --techname <tech>
The tech name of the new data module.
.TP
-V, --infoname-variant <variant>
The info name variant of the new data module.
.TP
-v, --verbose
Print the file name of the newly created data module.
.TP
-w, --inwork <inwork>
The inwork number of the new data module.
.TP
-z, --issue-type <type>
The issue type of the new data module.
.TP
--version
Show version information.
.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 <file>
Use an XML catalog when resolving entities.
Multiple catalogs may be loaded by specifying this option multiple
times.
.SS Prompt (-p) option
.PP
If this option is specified, the program will prompt the user to enter
values for metadata which was not specified when calling the program.
If a piece of metadata has a default value (from the \f[C].defaults\f[R]
and \f[C].dmtypes\f[R] files), it will be displayed in square brackets
[] in the prompt, and pressing Enter without typing any value will
select this default value.
.SS \f[C].defaults\f[R] file
.PP
This file sets default values for each piece of metadata.
By default, the program will search the current directory and parent
directories for a file named \f[C].defaults\f[R], but any file can be
specified by using the -d option.
.PP
All of the s1kd-new* commands use the same \f[C].defaults\f[R] file
format, so this file can contain default values for multiple types of
metadata.
.PP
Each line consists of the identifier of a piece of metadata and its
default value, separated by whitespace.
Lines which do not match a piece of metadata are ignored, and may be
used as comments.
Example:
.IP
.nf
\f[C]
# General
countryIsoCode               CA
languageIsoCode              en
originator                   khzae.net
responsiblePartnerCompany    khzae.net
securityClassification       01
\f[R]
.fi
.PP
Alternatively, the \f[C].defaults\f[R] file can be written using an XML
format, containing a root element \f[C]defaults\f[R] with child elements
\f[C]default\f[R] which each have an attribute \f[C]ident\f[R] and an
attribute \f[C]value\f[R].
.IP
.nf
\f[C]
<?xml version=\[dq]1.0\[dq]?>
<defaults>
<!-- General -->
<default ident=\[dq]countryIsoCode\[dq] value=\[dq]CA\[dq]/>
<default ident=\[dq]languageIsoCode\[dq] value=\[dq]en\[dq]/>
<default ident=\[dq]originator\[dq] value=\[dq]khzae.net\[dq]/>
<default ident=\[dq]responsiblePartnerCompany\[dq] value=\[dq]khzae.net\[dq]/>
<default ident=\[dq]securityClassification\[dq] value=\[dq]01\[dq]/>
</defaults>
\f[R]
.fi
.SS \f[C].dmtypes\f[R] file
.PP
This file sets the default schema and info name for data modules based
on their info code.
By default, the program will search the current directory and parent
directories for a file named \f[C].dmtypes\f[R], but any file can be
specified by using the -D option.
.PP
Each line consists of an info code, a schema identifier, and optionally
a default info name.
Example:
.IP
.nf
\f[C]
000    descript
022    brex        Business rules
040    descript    Description
520    proced      Remove procedure
\f[R]
.fi
.PP
Like the \f[C].defaults\f[R] file, the \f[C].dmtypes\f[R] file may also
be written in an XML format, where each child has an attribute
\f[C]infoCode\f[R], an attribute \f[C]schema\f[R], and optionally an
attribute \f[C]infoName\f[R].
.IP
.nf
\f[C]
<?xml version=\[dq]1.0\[dq]>
<dmtypes>
<type infoCode=\[dq]000\[dq] schema=\[dq]descript\[dq]/>
<type infoCode=\[dq]022\[dq] schema=\[dq]brex\[dq] infoName=\[dq]Business rules\[dq]/>
<type infoCode=\[dq]040\[dq] schema=\[dq]descript\[dq] infoName=\[dq]Description\[dq]/>
<type infoCode=\[dq]520\[dq] schema=\[dq]proced\[dq] infoName=\[dq]Remove procedure\[dq]/>
</dmtypes>
\f[R]
.fi
.PP
The info code field can also include an info code variant, item location
code, learn code, and learn event code, which allows for more specific
default schemas and info names.
.PP
Example of info code variants:
.IP
.nf
\f[C]
258A  proced  Other procedure to clean
258B  proced  Other procedure to clean, Clean with air
258C  proced  Other procedure to clean, Clean with water
\f[R]
.fi
.PP
Example of item location codes:
.IP
.nf
\f[C]
200A-A  proced  Servicing, while installed
200A-C  proced  Servicing, on the bench
200A-T  proced  Servicing, training
\f[R]
.fi
.PP
Example of learn codes:
.IP
.nf
\f[C]
100A-A-H10A  learning  Operation: Performance analysis
100A-A-T5CC  learning  Operation: Simulation
100A-A-T80E  learning  Operation: Assessment
\f[R]
.fi
.PP
The XML format additionally supports the use of the attribute
\f[C]infoNameVariant\f[R], for use with S1000D Issue 5.0 and up,
allowing extensions of the info name to be encoded separately:
.IP
.nf
\f[C]
<dmtypes>
<type
infoCode=\[dq]258A\[dq]
schema=\[dq]proced\[dq]
infoName=\[dq]Other procedure to clean\[dq]/>
<type
infoCode=\[dq]258B\[dq]
schema=\[dq]proced\[dq]
infoName=\[dq]Other procedure to clean\[dq]
infoNameVariant=\[dq]Clean with air\[dq]/>
<type
infoCode=\[dq]258C\[dq]
schema=\[dq]proced\[dq]
infoName=\[dq]Other procedure to clean\[dq]
infoNameVariant=\[dq]Clean with water\[dq]/>
</dmtypes>
\f[R]
.fi
.PP
Defaults are chosen in the order they are listed in the
\f[C].dmtypes\f[R] file.
An info code which does not specify a variant, item location code, learn
code or learn event code, or uses asterisks in their place, matches all
possible variants, item location codes, learn codes and learn event
codes.
.SS \f[C].brexmap\f[R] file
.PP
Refer to the documentation for s1kd-defaults(1) for a description of the
\f[C].brexmap\f[R] file.
.SS Custom XML templates (-%)
.PP
A minimal set of S1000D templates are built-in to this tool, but
customized templates may be used with the -% option.
This option takes a path to a directory where the custom templates are
located.
Each template should be named \f[C]<schema>.xml\f[R], where
\f[C]<schema>\f[R] is the name of the schema, matching one of the schema
names in the \f[C].dmtypes\f[R] file or the schema specified with the -T
option.
.PP
The templates must be written to conform to the default S1000D issue of
this tool (currently 5.0), regardless of what issue of S1000D the
project is using.
The final output will be automatically transformed when another issue is
specified with the -$ option.
.PP
The \f[C]templates\f[R] default can also be specified in the
\f[C].defaults\f[R] file to use these custom templates by default.
.SH EXAMPLE
.IP
.nf
\f[C]
$ s1kd-newdm -# S1KDTOOLS-A-00-07-00-00A-040A-D
\f[R]
.fi
.SH AUTHORS
khzae.net.


/ gopher://khzae.net/0/s1000d/s1kd-tools/src/tools/s1kd-newdm/doc/s1kd-newdm.1
Styles: Light Dark Classic