S1000D Reader (S1000D Stack)
v0.22.0Read S1000D data and publication modules as structure, with applicability and verification status.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_data_modules
List the CSDB objects (data modules by default; optionally publication modules, DML, DDN, IMF, UPF, ICN) in the CSDB folders with DMC parts, techName/infoName, issue, language, schema name (descript/proced/…), S1000D issue and applicability display text. A DML or DDN row also carries its code, issue date, entry/item count and a reconciliation summary against the CSDB (found / issue-mismatch / not-found / not-checked; for a DML also how many DMs and PMs it does not list). Filter by modelIdentCode, systemCode, infoCode, schemaName or title text. Paged with offset/limit.
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
filter | object | |
include | array | Object kinds to list (default: dm). |
limit | number | Objects per call (default 100, max 1000). |
offset | number | Index of the first object (default 0). |
read_data_module
Read one data module as structure, not XML: identification and status (DMC, issue, language, title, BREX ref, QA, DM-level applicability), the body as a tree of blocks (sections, paragraphs, lists, tables, figures with ICN, warnings/cautions/notes, numbered steps, requirements; processes and fault isolation too), the reference list at the head of the content when the data module has one (content.refs: targets and the titles written there), the references it makes, ALWAYS a "verification" status (XSD by default) and ALWAYS "securityClassification" (the data module's value and the values carried…
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
dmc | string | DMC of the data module to read from the CSDB (e.g. "S1000DBIKE-AAA-D00-00-00-00AA-041A-A"; "DMC-" prefix optional). Alternative to path/xml. |
includeLocation | boolean | Add "location" (path, line, column) to every node of the body or the outline (default false). Pass true when you are going to edit the data module with s1000d-writer-mcp edit_data_module: its "at" and… |
maxNodes | number | Cap on body nodes returned (default 5000). |
omitNotApplicable | boolean | Drop blocks that are notApplicable for the given product (default false: keep them, marked). The number dropped is reported. |
outlineDepth | integer | With section "outline": how many levels of headings / steps to return (default: all levels). |
path | string | File path of the document. |
product | object | The product to evaluate applicability for. attributes: ACT productAttribute id → value (e.g. {"model": "Brook trekker", "version": "Mk9"}); conditions: CCT cond id → value. Omit to get "undetermin… |
section | string | Which part to return (default all). "outline" returns only headings, step numbers, the first sentence and the size (nodes / chars / admonitions) of each subtree — call it first on a large data modul… |
verify | string | How much to verify before reading: "schema" (default) runs XSD validation only; "full" also checks BREX along the brexDmRef chain and resolves references; "none" skips verification (reported as not-ru… |
xml | string | The document as an XML string (alternative to path; max 5 MB). |
read_publication_module
Read a publication module (PMC) as a table of contents: the pmEntry tree with titles, and for each dmRef/pmRef the resolved target (file, techName/infoName, issue) from the CSDB. Also returns the PM identification and a verification status.
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
path | string | File path of the document. |
pmc | string | PMC to read from the CSDB (e.g. "S1000DBIKE-B6865-EPWG1-00"; "PMC-" prefix optional). Alternative to path/xml. |
verify | string | How much to verify before reading: "schema" (default) runs XSD validation only; "full" also checks BREX along the brexDmRef chain and resolves references; "none" skips verification (reported as not-ru… |
xml | string | The document as an XML string (alternative to path; max 5 MB). |
resolve_reference
Resolve one reference to a CSDB object: a DMC, a PMC, or an ICN (file name or entity name). Returns the file path(s), issue(s) and title. For an ICN, pass "fromPath" of the data module whose DOCTYPE declares the entity to get the declared file and notation.
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
dmc | string | DMC to resolve. |
fromPath | string | Data module whose DOCTYPE declares the ICN entity (optional). |
icn | string | ICN (entity name or file name) to resolve. |
pmc | string | PMC to resolve. |
describe_applicability
Describe the applicability vocabulary of a data module so a product can be chosen: the ACT product attributes (ids, names, enumerations/patterns, which one identifies the product), the CCT condition types and conditions, the PCT products (ready-made product values), the applic statements in the data module (ids and display texts), and which attributes used by the statements have no value in the PCT. Nothing is evaluated here; pass the chosen values as "product" to read_data_module.
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
dmc | string | DMC of the data module to read from the CSDB (e.g. "S1000DBIKE-AAA-D00-00-00-00AA-041A-A"; "DMC-" prefix optional). Alternative to path/xml. |
path | string | File path of the document. |
xml | string | The document as an XML string (alternative to path; max 5 MB). |
read_icn_metadata
Read an ICN metadata file (IMF, icnmetadata.xsd): ICN, issue, title, keywords, security, source/originator and other status items as a flat list, plus the related ICN files found in the CSDB.
| Parameter | Type | Description |
|---|---|---|
csdbDirs | array | CSDB folders to search for data modules by DMC, referenced objects, ACT/CCT/PCT and BREX (default: S1000D_CSDB_DIR / the config file). When given, these folders replace S1000D_CSDB_DIR and the csdbDir… |
icn | string | ICN whose IMF to read from the CSDB (e.g. "C0419-S1000D0360-001-01" or "ICN-C0419-…"). |
path | string | File path of the document. |
xml | string | The document as an XML string (alternative to path; max 5 MB). |