io7m | single-page | multi-page | xstructural 2.2.0-SNAPSHOT
3.3. Schema
Previous
3. Command-Line Interface
Up
3.5. Validate-XHTML
Next

# 3.4. Validate

- 3.4.1. Name
- 3.4.2. Description
- 3.4.3. Examples

## 3.4.1. Name

1
validate - Validate input documents

## 3.4.2. Description

1
The validate command validates a given document against the Structural schema.

### 3.4.2.2. Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--sourceFile | Path | true | The path to the input document.
--typeFile | Path | true | The path to the type description file.

## 3.4.3. Examples

### 3.4.3.1. Example

    $ xstructural validate --sourceFile com.io7m.xstructural.documentation/target/documentation/main.xml
    xstructural: XSValidator: INFO: validate (xstructural) com.io7m.xstructural.documentation/target/documentation/main.xml

    $ echo $?
    0

    $ xstructural validate --sourceFile README-CHANGES.xml
    xstructural: XSValidator: INFO: validate (xstructural) README-CHANGES.xml
    xstructural: validation: ERROR: README-CHANGES.xml:2:82: cvc-elt.1.a: Cannot find the declaration of element 'c:changelog'.
    xstructural: XSValidator: ERROR: one or more validation errors occurred
    xstructural: Main: ERROR: com.io7m.xstructural.api.XSValidationException: Document README-CHANGES.xml is not a valid structural document

    $ echo $?
    1

3.3. Schema
Previous
3. Command-Line Interface
Up
3.5. Validate-XHTML
Next
io7m | single-page | multi-page | xstructural 2.2.0-SNAPSHOT