/ .. / / -> download
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dmodule>
<dmodule xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.s1000d.org/S1000D_5-0/xml_schema_flat/descript.xsd">
  <identAndStatusSection>
    <dmAddress>
      <dmIdent>
        <dmCode modelIdentCode="S1KDTOOLS" systemDiffCode="A" systemCode="23" subSystemCode="0" subSubSystemCode="0" assyCode="00" disassyCode="00" disassyCodeVariant="A" infoCode="040" infoCodeVariant="A" itemLocationCode="D"/>
        <language languageIsoCode="en" countryIsoCode="CA"/>
        <issueInfo issueNumber="026" inWork="01"/>
      </dmIdent>
      <dmAddressItems>
        <issueDate year="2021" month="07" day="06"/>
        <dmTitle>
          <techName>s1kd-flatten(1) | s1kd-tools</techName>
        </dmTitle>
      </dmAddressItems>
    </dmAddress>
    <dmStatus issueType="changed">
      <security securityClassification="01"/>
      <responsiblePartnerCompany>
        <enterpriseName>khzae.net</enterpriseName>
      </responsiblePartnerCompany>
      <originator>
        <enterpriseName>khzae.net</enterpriseName>
      </originator>
      <applic>
        <displayText>
          <simplePara>All</simplePara>
        </displayText>
      </applic>
      <brexDmRef>
        <dmRef>
          <dmRefIdent>
            <dmCode modelIdentCode="S1000D" systemDiffCode="G" systemCode="04" subSystemCode="1" subSubSystemCode="0" assyCode="0301" disassyCode="00" disassyCodeVariant="A" infoCode="022" infoCodeVariant="A" itemLocationCode="D"/>
          </dmRefIdent>
        </dmRef>
      </brexDmRef>
      <qualityAssurance>
        <unverified/>
      </qualityAssurance>
      <reasonForUpdate id="rfu-0001" updateHighlight="1" updateReasonType="urt02">
        <simplePara>Add -l (--list) option.</simplePara>
      </reasonForUpdate>
    </dmStatus>
  </identAndStatusSection>
  <content>
    <description>
      <levelledPara>
        <title>NAME</title>
        <para>s1kd-flatten - Flatten a publication module for publishing</para>
      </levelledPara>
      <levelledPara>
        <title>SYNOPSIS</title>
        <para>
          <verbatimText verbatimStyle="vs24"><![CDATA[s1kd-flatten [-d <dir>] [-I <path>] [-cDfimNPpqRruvx] <PM> [<DM>...]]]></verbatimText>
        </para>
      </levelledPara>
      <levelledPara>
        <title>DESCRIPTION</title>
        <para>The <emphasis>s1kd-flatten</emphasis> tool combines a publication module and the data modules it references in to a single file for use with a publishing system.</para>
        <para>Data modules are by default searched for in the current directory using the data module code, language and/or issue info provided in each reference.</para>
      </levelledPara>
      <levelledPara>
        <title>OPTIONS</title>
        <para>
          <definitionList>
            <definitionListItem>
              <listItemTerm>-c, --containers</listItemTerm>
              <listItemDefinition>
                <para>Flatten referenced container data modules by copying the references inside the container directly in to the publication module. The copied references will also be flattened, unless the -m option is specified.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-D, --remove</listItemTerm>
              <listItemDefinition>
                <para>Remove unresolved references.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-d, --dir <dir></listItemTerm>
              <listItemDefinition>
                <para>Directory to start search in. By default, the current directory is used.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-f, --overwrite</listItemTerm>
              <listItemDefinition>
                <para>Overwrite input publication module instead of writing to stdout.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-h, -?, --help</listItemTerm>
              <listItemDefinition>
                <para>Show help/usage message.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-I, --include <path></listItemTerm>
              <listItemDefinition>
                <para>Add <path> to the list of directories that the tool will search when resolving references.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-i, --ignore-issue</listItemTerm>
              <listItemDefinition>
                <para>Always match the latest issue of an object found, regardless of the issue specified in the reference.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem changeMark="1" changeType="add" reasonForUpdateRefIds="rfu-0001">
              <listItemTerm>-l, --list</listItemTerm>
              <listItemDefinition>
                <para>Treat input (stdin or arguments) as lists of CSDB objects, rather than CSDB objects themselves. This option only applies to the simple "flat" format (-p/--simple).</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-m, --modify</listItemTerm>
              <listItemDefinition>
                <para>Modify the references in the publication module without flattening them.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-N, --omit-issue</listItemTerm>
              <listItemDefinition>
                <para>Assume that the files representing the referenced data modules do not include the issue info in their filenames, i.e. they were created using the -N option of the s1kd-new* tools.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-P, --only-pm-refs</listItemTerm>
              <listItemDefinition>
                <para>Only flatten PM references, leaving DM references alone.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-p, --simple</listItemTerm>
              <listItemDefinition>
                <para>Instead of the hierarchical PM-based format, use a simpler "flat" format.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-q, --quiet</listItemTerm>
              <listItemDefinition>
                <para>Quiet mode. Errors are not printed.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-R, --recursively</listItemTerm>
              <listItemDefinition>
                <para>Recursively flatten referenced publication modules, copying their content in to the "master" publication module.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-r, --recursive</listItemTerm>
              <listItemDefinition>
                <para>Search directories recursively.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-u, --unique</listItemTerm>
              <listItemDefinition>
                <para>Remove duplicate references within the PM content.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-v, --verbose</listItemTerm>
              <listItemDefinition>
                <para>Verbose output. Specify multiple times to increase the verbosity.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>-x, --use-xinclude</listItemTerm>
              <listItemDefinition>
                <para>Use XInclude rather than copying each data module's contents directly inside the publication module. DTD entities in data modules will only be carried over to the final publication when using this option, otherwise they do not carry over when copying the data module.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--version</listItemTerm>
              <listItemDefinition>
                <para>Show version information.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm><DM>...</listItemTerm>
              <listItemDefinition>
                <para>When using the -p option, the filenames to include can be specified manually as additional arguments instead of searching for them in the current directory. When not using the -p option, additional arguments are ignored.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm><PM></listItemTerm>
              <listItemDefinition>
                <para>The publication module to flatten.</para>
              </listItemDefinition>
            </definitionListItem>
          </definitionList>
        </para>
        <para>
          In addition, the following options allow configuration of the XML parser:
          <definitionList>
            <definitionListItem>
              <listItemTerm>--dtdload</listItemTerm>
              <listItemDefinition>
                <para>Load the external DTD.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--huge</listItemTerm>
              <listItemDefinition>
                <para>Remove any internal arbitrary parser limits.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--net</listItemTerm>
              <listItemDefinition>
                <para>Allow network access to load external DTD and entities.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--noent</listItemTerm>
              <listItemDefinition>
                <para>Resolve entities.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--parser-errors</listItemTerm>
              <listItemDefinition>
                <para>Emit errors from parser.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--parser-warnings</listItemTerm>
              <listItemDefinition>
                <para>Emit warnings from parser.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--xinclude</listItemTerm>
              <listItemDefinition>
                <para>Do XInclude processing.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>--xml-catalog <file></listItemTerm>
              <listItemDefinition>
                <para>Use an XML catalog when resolving entities. Multiple catalogs may be loaded by specifying this option multiple times.</para>
              </listItemDefinition>
            </definitionListItem>
          </definitionList>
        </para>
      </levelledPara>
      <levelledPara>
        <title>EXIT STATUS</title>
        <para>
          <definitionList>
            <definitionListItem>
              <listItemTerm>0</listItemTerm>
              <listItemDefinition>
                <para>No errors.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>1</listItemTerm>
              <listItemDefinition>
                <para>The publication module specified is malformed.</para>
              </listItemDefinition>
            </definitionListItem>
            <definitionListItem>
              <listItemTerm>2</listItemTerm>
              <listItemDefinition>
                <para>An encoding error occurred.</para>
              </listItemDefinition>
            </definitionListItem>
          </definitionList>
        </para>
      </levelledPara>
      <levelledPara>
        <title>EXAMPLE</title>
        <para>
          <verbatimText verbatimStyle="vs24">$ s1kd-flatten -x PMC-EX-12345-00001-00_001-00_EN-CA.XML > Book.xml</verbatimText>
        </para>
      </levelledPara>
    </description>
  </content>
</dmodule>


/ gopher://khzae.net/0/s1000d/s1kd-tools/src/tools/s1kd-flatten/doc/DMC-S1KDTOOLS-A-23-00-00-00A-040A-D_EN-CA.XML
Styles: Light Dark Classic