Skip to content
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
19 changes: 15 additions & 4 deletions schemas/oval/5.11.3/independent-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@
</xsd:choice>
<xsd:element name="yamlpath" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. This YAML Path expression must evaluate to a list of zero or more scalar values which will be accessible in OVAL via instances of the value_of entity. Any results from evaluating the YAML Path expression other than a list of scalar values (e.g., a hash or list of lists) is considered an error. The intention is that the scalar values be drawn from instances of a single, uniquely named element. However, an OVAL interpreter is not required to verify this, so the author should define the YAML Path expression carefully. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. This YAML Path expression must evaluate to a sequence or a map (part of a map) of scalar values which will be accessible in OVAL via instances of the value entity. Any results from evaluating the YAML Path expression other than a sequence (or a map) of scalar values (e.g. sequence of sequences, sequence of maps, map of maps etc.) are considered as incorrect, so the author should define the YAML Path expression carefully. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="ind-def_yamlobjyamlpath">
<sch:rule context="ind-def:yamlfilecontent_object/ind-def:yamlpath">
Expand Down Expand Up @@ -2158,13 +2158,24 @@
</xsd:element>
<xsd:element name="yamlpath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. This YAML Path expression must evaluate to a list of zero or more text values which will be accessible in OVAL via instances of the value_of entity. Any results from evaluating the YAML Path expression other than a list of text strings (e.g., a nodes set) is considered an error. The intention is that the text values be drawn from instances of a single, uniquely named element or attribute. However, an OVAL interpreter is not required to verify this, so the author should define the YAML Path expression carefully. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="value_of" type="oval-def:EntityStateAnySimpleType" minOccurs="0" maxOccurs="1">
<xsd:element name="value" type="oval-def:EntityStateRecordType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The value_of element checks the value(s) of the text node(s) or attribute(s) found.</xsd:documentation>
<xsd:documentation>The value entity specifies how to test objects in the value set of the specified YAML Path. To define tests for a single scalar value or a list of scalar values (where there is no key to associate), set the name attribute of the field element to '#'. Due to the limitation of the record type field names could not contain uppercase letters, they should be converted to the lowercase and escaped using the '^' symbol (the '^' symbol should be escaped as well). For example, to check a value associated with 'myCamelCase^Key' set the name attribute of the field to 'my^camel^case^^^key'. The check is entirely controlled by operator attributes of the field element.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="ind-def_yamlfilestevalue">
<sch:rule context="ind-def:yamlfile_state/ind-def:value">
<sch:assert test="@datatype='record'"><sch:value-of select="../@id"/> - datatype attribute for the value entity of a yamlfile_state must be 'record'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:unique name="UniqueYamlFileValueFieldName">
<xsd:selector xpath="./oval-def:field"/>
<xsd:field xpath="@name"/>
</xsd:unique>
</xsd:element>
<xsd:element name="windows_view" type="ind-def:EntityStateWindowsViewType" minOccurs="0">
<xsd:annotation>
Expand Down
13 changes: 10 additions & 3 deletions schemas/oval/5.11.3/independent-system-characteristics-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,19 @@
</xsd:element>
<xsd:element name="yamlpath" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. This YAML Path expression must evaluate to a list of zero or more scalar values which will be accessible in OVAL via instances of the value_of entity. Any results from evaluating the YAML Path expression other than a list of scalar values (e.g., a hash or list of lists) is considered an error. The intention is that the scalar values be drawn from instances of a single, uniquely named element. However, an OVAL interpreter is not required to verify this, so the author should define the YAML Path expression carefully. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
<xsd:documentation>Specifies an YAML Path expression to evaluate against the YAML file specified by the filename entity. Note that "equals" is the only valid operator for the yamlpath entity.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="value_of" type="oval-sc:EntityItemAnySimpleType" minOccurs="0" maxOccurs="unbounded">
<xsd:element name="value" type="oval-sc:EntityItemRecordType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The value_of element checks the value(s) of the text node(s) or attribute(s) found. How this is used is entirely controlled by operator attributes.</xsd:documentation>
<xsd:documentation>The value entity holds the target(s) of the specified YAML Path. A single scalar value or a list of scalar values (where there is no key to associate) would have the name attribute of the field element set to '#'. Due to the limitation of the record type field names could not contain uppercase letters, they will be converted to the lowercase and escaped using the '^' symbol (the '^' symbol would be escaped as well). For example 'myCamelCase^Key' would be collected as 'my^camel^case^^^key'.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="ind-sc_yamlfile_itemvalue">
<sch:rule context="ind-sc:yamlfile_item/ind-sc:value">
<sch:assert test="@datatype='record'"><sch:value-of select="../@id"/> - datatype attribute for the value entity of a yamlfile_item must be 'record'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="windows_view" type="ind-sc:EntityItemWindowsViewType" minOccurs="0">
Expand Down
20 changes: 10 additions & 10 deletions src/OVAL/oval_recordField.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void oval_record_field_set_mask(struct oval_record_field *rf, int mask)
void oval_record_field_set_operation(struct oval_record_field *rf, oval_operation_t operation)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (set operation): %d.", rf->record_field_type);
return;
}

Expand All @@ -218,7 +218,7 @@ void oval_record_field_set_operation(struct oval_record_field *rf, oval_operatio
void oval_record_field_set_variable(struct oval_record_field *rf, struct oval_variable *var)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (set variable): %d.", rf->record_field_type);
return;
}

Expand All @@ -228,7 +228,7 @@ void oval_record_field_set_variable(struct oval_record_field *rf, struct oval_va
void oval_record_field_set_var_check(struct oval_record_field *rf, oval_check_t var_check)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (set var_check): %d.", rf->record_field_type);
return;
}

Expand All @@ -238,7 +238,7 @@ void oval_record_field_set_var_check(struct oval_record_field *rf, oval_check_t
void oval_record_field_set_ent_check(struct oval_record_field *rf, oval_check_t ent_check)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (set ent_check): %d.", rf->record_field_type);
return;
}

Expand All @@ -248,7 +248,7 @@ void oval_record_field_set_ent_check(struct oval_record_field *rf, oval_check_t
void oval_record_field_set_status(struct oval_record_field *rf, oval_syschar_status_t status)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_ITEM) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (set status): %d.", rf->record_field_type);
return;
}

Expand Down Expand Up @@ -283,7 +283,7 @@ int oval_record_field_get_mask(struct oval_record_field *rf)
oval_operation_t oval_record_field_get_operation(struct oval_record_field *rf)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (get operation): %d.", rf->record_field_type);
return OVAL_OPERATION_UNKNOWN;
}

Expand All @@ -293,7 +293,7 @@ oval_operation_t oval_record_field_get_operation(struct oval_record_field *rf)
struct oval_variable *oval_record_field_get_variable(struct oval_record_field *rf)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (get variable): %d.", rf->record_field_type);
return NULL;
}

Expand All @@ -303,7 +303,7 @@ struct oval_variable *oval_record_field_get_variable(struct oval_record_field *r
oval_check_t oval_record_field_get_var_check(struct oval_record_field *rf)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (get var_check): %d.", rf->record_field_type);
return OVAL_CHECK_UNKNOWN;
}

Expand All @@ -313,7 +313,7 @@ oval_check_t oval_record_field_get_var_check(struct oval_record_field *rf)
oval_check_t oval_record_field_get_ent_check(struct oval_record_field *rf)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_STATE) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (get ent_check): %d.", rf->record_field_type);
return OVAL_CHECK_UNKNOWN;
}

Expand All @@ -323,7 +323,7 @@ oval_check_t oval_record_field_get_ent_check(struct oval_record_field *rf)
oval_syschar_status_t oval_record_field_get_status(struct oval_record_field *rf)
{
if (rf->record_field_type != OVAL_RECORD_FIELD_ITEM) {
dE("Wrong record field type: %d.", rf->record_field_type);
dE("Wrong record field type (get status): %d.", rf->record_field_type);
return SYSCHAR_STATUS_UNKNOWN;
}

Expand Down
Loading