Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schematron Updates #78

Merged
merged 1 commit into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions oval-schemas/independent-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1480,9 +1480,9 @@
<xsd:annotation>
<xsd:documentation>The instance entity calls out a specific match of the pattern. This can only be a positive integer.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="win-def_tfc54_i">
<sch:rule context="win-def:textfilecontent54_state/win-def:instance">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 1"><sch:value-of select="../@id"/> - the value of instance must be greater than one</sch:assert>
<sch:pattern id="ind-def_tfc54_i">
<sch:rule context="ind-def:textfilecontent54_state/ind-def:instance">
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 1)"><sch:value-of select="../@id"/> - the value of instance must be greater than or equal to one, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down
6 changes: 3 additions & 3 deletions oval-schemas/independent-system-characteristics-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@
<xsd:annotation>
<xsd:documentation>The instance entity calls out which match of the pattern is being represented by this item. The first match is given an instance value of 1, the second match is given an instance value of 2, and so on. The main purpose of this entity is too provide uniqueness for different textfilecontent_items that results from multiple matches of a given pattern against the same file.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="win-sc_tfc_i">
<sch:rule context="win-sc:textfilecontent_item/win-sc:instance">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 1"><sch:value-of select="../@id"/> - the value of instance must be greater than one</sch:assert>
<sch:pattern id="ind-sc_tfc_i">
<sch:rule context="ind-sc:textfilecontent_item/ind-sc:instance">
<sch:assert test="number(.) &gt;= 1"><sch:value-of select="../@id"/> - the value of instance must be greater than or equal to one</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down
4 changes: 2 additions & 2 deletions oval-schemas/unix-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
<xsd:appinfo>
<sch:pattern id="unix-def_file_gid">
<sch:rule context="unix-def:file_state/unix-def:group_id">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of group_id must be greater than zero</sch:assert>
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 0)"><sch:value-of select="../@id"/> - the value of group_id must be greater than or equal to zero, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand All @@ -302,7 +302,7 @@
<xsd:appinfo>
<sch:pattern id="unix-def_file_uid">
<sch:rule context="unix-def:file_state/unix-def:user_id">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of user_id must be greater than zero</sch:assert>
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 0)"><sch:value-of select="../@id"/> - the value of user_id must be greater than or equal to zero, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down
4 changes: 2 additions & 2 deletions oval-schemas/unix-system-characteristics-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<xsd:appinfo>
<sch:pattern id="unix-sc_file_gid">
<sch:rule context="unix-sc:file_item/unix-sc:group_id">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of group_id must be greater than zero</sch:assert>
<sch:assert test="number(.) &gt;= 0"><sch:value-of select="../@id"/> - the value of group_id must be greater than or equal to zero</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand All @@ -116,7 +116,7 @@
<xsd:appinfo>
<sch:pattern id="unix-sc_file_uid">
<sch:rule context="unix-sc:file_item/unix-sc:user_id">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of user_id must be greater than zero</sch:assert>
<sch:assert test="number(.) &gt;= 0"><sch:value-of select="../@id"/> - the value of user_id must be greater than or equal to zero</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down
6 changes: 3 additions & 3 deletions oval-schemas/windows-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3688,7 +3688,7 @@
<xsd:appinfo>
<sch:pattern id="win-def_lps_fl">
<sch:rule context="win-def:lockoutpolicy_state/win-def:force_logoff">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of force_logoff must be greater than or equal to zero</sch:assert>
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 0)"><sch:value-of select="../@id"/> - the value of force_logoff must be greater than or equal to zero, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand All @@ -3700,7 +3700,7 @@
<xsd:appinfo>
<sch:pattern id="win-def_lps_ld">
<sch:rule context="win-def:lockoutpolicy_state/win-def:lockout_duration">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of lockout_duration must be greater than or equal to zero</sch:assert>
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 0)"><sch:value-of select="../@id"/> - the value of lockout_duration must be greater than or equal to zero, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down Expand Up @@ -4161,7 +4161,7 @@
<xsd:appinfo>
<sch:pattern id="win-def_pwp_mpa">
<sch:rule context="win-def:passwordpolicy_state/win-def:max_passwd_age">
<sch:assert test="number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of max_passwd_age must be greater than or equal to zero</sch:assert>
<sch:assert test="(@var_ref and string-length(.)=0) or (number(.) &gt;= 0)"><sch:value-of select="../@id"/> - the value of max_passwd_age must be greater than or equal to zero, or empty if var_ref is used.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down
6 changes: 3 additions & 3 deletions oval-schemas/windows-system-characteristics-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@
<xsd:appinfo>
<sch:pattern id="win-sc_lpi_fl">
<sch:rule context="win-sc:lockoutpolicy_item/win-sc:force_logoff">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of force_logoff must be greater than or equal to zero</sch:assert>
<sch:assert test="number(.) &gt;= 0"><sch:value-of select="../@id"/> - the value of force_logoff must be greater than or equal to zero</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand All @@ -1564,7 +1564,7 @@
<xsd:appinfo>
<sch:pattern id="win-sc_lpi_ld">
<sch:rule context="win-sc:lockoutpolicy_item/win-sc:lockout_duration">
<sch:assert test="string-length(.) = 0 or number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of lockout_duration must be greater than or equal to zero</sch:assert>
<sch:assert test="number(.) &gt;= 0"><sch:value-of select="../@id"/> - the value of lockout_duration must be greater than or equal to zero</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down Expand Up @@ -1748,7 +1748,7 @@
<xsd:appinfo>
<sch:pattern id="win-sc_pwp_mpa">
<sch:rule context="win-sc:passwordpolicy_item/win-sc:max_passwd_age">
<sch:assert test="number(.) &lt; 0"><sch:value-of select="../@id"/> - the value of max_passwd_age must be greater than or equal to zero</sch:assert>
<sch:assert test="number(.) &gt;= 0"><sch:value-of select="../@id"/> - the value of max_passwd_age must be greater than or equal to zero</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
Expand Down