apply_fixes
Applies selected fix candidates to an existing S1000D data module, revalidates them, rejects mismatches, and returns verified XML plus remaining fixes.
Instructions
Apply fixes to an existing data module. Each selection copies the location and ONE candidate of a fix that s1000d-verify-mcp suggest_fixes (or this server) returned: { location, action, target?, value? }. The server computes the fix candidates again and applies a selection only if it matches one of them; a value outside the candidates (or outside a range / pattern candidate) is not applied and comes back in rejected[] with the reason. "provide" candidates change the product, not the document: pass them as "product". The result is verified again. Returns xml, applied[], rejected[], verification, the fixes that remain. Writes only when write is true (a path is overwritten in place; xml is written under its own file name in the first CSDB folder).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | An existing document as an XML string (alternative to path; max 5 MB). Not for XML you wrote yourself: build new data modules with build_data_module. | |
| path | No | File path of the document. | |
| write | No | Write the result into the CSDB (the first folder of csdbDirs / S1000D_CSDB_DIR). Default false: the XML is only returned. Nothing is written when the XML is not valid against the XSD unless allowInvalid is true. | |
| product | No | The product to evaluate applicability for. attributes: ACT productAttribute id → value; conditions: CCT cond id → value. Omit to skip the applicability check. | |
| csdbDirs | No | CSDB folders (in addition to S1000D_CSDB_DIR) used to resolve references, find BREX and number new objects. The FIRST folder is also where write: true writes. | |
| maxFixes | No | Cap on the remaining fixes listed in the response (default 50). | |
| overwrite | No | With write: true, replace a file of the same name. Default false: an existing file is left alone and reported as write-conflict. | |
| selections | Yes | ||
| allowInvalid | No | With write: true, write even when verification.schema.state is "invalid". Default false. |