Skip to content

Commit

Permalink
s1kd-validate: Add -x (--xml) option
Browse files Browse the repository at this point in the history
Added a new -x (--xml) option, which outputs an XML report of any
errors found.

This replaces the old short option for --exclude, which is now -X instead.
  • Loading branch information
kibook committed Dec 18, 2024
1 parent 225d841 commit 510b9cb
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 62 deletions.
7 changes: 5 additions & 2 deletions tools/s1kd-validate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ s1kd-validate - Validate S1000D CSDB objects against their schemas

# SYNOPSIS

s1kd-validate [-s <path>] [-x <URI>] [-F|-f] [-eloqv^h?]
s1kd-validate [-s <path>] [-X <URI>] [-F|-f] [-o|-x] [-elqv^h?]
[<object>...]

# DESCRIPTION
Expand Down Expand Up @@ -46,10 +46,13 @@ schemas.
Verbose mode. Success/failure will be explicitly reported on top of
any errors.

- \-x, --exclude \<URI\>
- \-X, --exclude \<URI\>
Exclude an XML namespace from the validation. Elements in the
namespace specified by \<URI\> are ignored.

- \-x, --xml
Output an XML report.

- \-^, --remove-deleted
Validate with elements that have a change type of "delete" removed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<dmIdent>
<dmCode modelIdentCode="S1KDTOOLS" systemDiffCode="A" systemCode="02" subSystemCode="0" subSubSystemCode="0" assyCode="00" disassyCode="00" disassyCodeVariant="A" infoCode="040" infoCodeVariant="A" itemLocationCode="D"/>
<language languageIsoCode="en" countryIsoCode="CA"/>
<issueInfo issueNumber="027" inWork="00"/>
<issueInfo issueNumber="027" inWork="01"/>
</dmIdent>
<dmAddressItems>
<issueDate year="2021" month="04" day="16"/>
<issueDate year="2024" month="12" day="18"/>
<dmTitle>
<techName>s1kd-validate(1) | s1kd-tools</techName>
</dmTitle>
Expand Down Expand Up @@ -38,8 +38,11 @@
<qualityAssurance>
<unverified/>
</qualityAssurance>
<reasonForUpdate>
<simplePara>Upissued</simplePara>
<reasonForUpdate id="rfu-xml-report" updateHighlight="1" updateReasonType="urt02">
<simplePara>Add -x (--xml) option.</simplePara>
</reasonForUpdate>
<reasonForUpdate id="rfu-change-exclude" updateHighlight="1" updateReasonType="urt02">
<simplePara>Change --exclude short option to -X.</simplePara>
</reasonForUpdate>
</dmStatus>
</identAndStatusSection>
Expand All @@ -52,7 +55,7 @@
<levelledPara>
<title>SYNOPSIS</title>
<para>
<verbatimText verbatimStyle="vs24"><![CDATA[s1kd-validate [-s <path>] [-x <URI>] [-F|-f] [-eloqv^h?]
<verbatimText verbatimStyle="vs24" changeMark="1" changeType="modify" reasonForUpdateRefIds="rfu-xml-report rfu-change-exclude"><![CDATA[s1kd-validate [-s <path>] [-X <URI>] [-F|-f] [-o|-x] [-elqv^h?]
[<object>...]]]></verbatimText>
</para>
</levelledPara>
Expand Down Expand Up @@ -118,12 +121,18 @@
<para>Verbose mode. Success/failure will be explicitly reported on top of any errors.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem>
<listItemTerm>-x, --exclude &lt;URI&gt;</listItemTerm>
<definitionListItem changeMark="1" changeType="modify" reasonForUpdateRefIds="rfu-change-exclude">
<listItemTerm>-X, --exclude &lt;URI&gt;</listItemTerm>
<listItemDefinition>
<para>Exclude an XML namespace from the validation. Elements in the namespace specified by &lt;URI&gt; are ignored.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem changeMark="1" changeType="add" reasonForUpdateRefIds="rfu-xml-report">
<listItemTerm>-x, --xml</listItemTerm>
<listItemDefinition>
<para>Output an XML report.</para>
</listItemDefinition>
</definitionListItem>
<definitionListItem>
<listItemTerm>-^, --remove-deleted</listItemTerm>
<listItemDefinition>
Expand Down
11 changes: 8 additions & 3 deletions tools/s1kd-validate/doc/s1kd-validate.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.0.6
.\"
.TH "s1kd\-validate" "1" "2021\-04\-16" "" "s1kd\-tools"
.TH "s1kd\-validate" "1" "2024\-12\-18" "" "s1kd\-tools"
.hy
.SH NAME
.PP
Expand All @@ -9,7 +9,7 @@ s1kd\-validate \- Validate S1000D CSDB objects against their schemas
.IP
.nf
\f[C]
s1kd\-validate\ [\-s\ <path>]\ [\-x\ <URI>]\ [\-F|\-f]\ [\-eloqv^h?]
s1kd\-validate\ [\-s\ <path>]\ [\-X\ <URI>]\ [\-F|\-f]\ [\-o|\-x]\ [\-elqv^h?]
\ \ \ \ \ \ \ \ \ \ \ \ \ \ [<object>...]
\f[]
.fi
Expand Down Expand Up @@ -70,12 +70,17 @@ Success/failure will be explicitly reported on top of any errors.
.RS
.RE
.TP
.B \-x, \-\-exclude <URI>
.B \-X, \-\-exclude <URI>
Exclude an XML namespace from the validation.
Elements in the namespace specified by <URI> are ignored.
.RS
.RE
.TP
.B \-x, \-\-xml
Output an XML report.
.RS
.RE
.TP
.B \-^, \-\-remove\-deleted
Validate with elements that have a change type of "delete" removed.
.RS
Expand Down
Loading

0 comments on commit 510b9cb

Please sign in to comment.