Should the minOccurs and maxOccurs values for ConcatFunctionType be updated in the HTML version of the OVAL Core Definition Schema Element Dictionary be updated?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Should the minOccurs and maxOccurs values for ConcatFunctionType be updated in the HTML version of the OVAL Core Definition Schema Element Dictionary be updated?

Jan Lieskovsky
Hello folks,

  yesterday when experimenting (read as commenting out selected
children to find the proper regex pattern) with OVAL's concat function
noticed the following.

The HTML version of the ConcatFunctionType:
  [1] https://oval.mitre.org/language/version5.11/ovaldefinition/documentation/oval-definitions-schema.html#ConcatFunctionType

mentions minOccurs=1 and maxOccurs=1 as the expected bounds (for the
oval-def:ComponentGroup)

While the XSD form of the ConcatFunctionType specifies the correct values
(minOccurs=2, maxOccurs=unbounded):
  [2] https://github.com/OVALProject/Language/blob/master/schemas/oval-definitions-schema.xsd#L766

Following the HTML guidance would / could result into error like the following one
(for brevity selected just the relevant bits):

<quote>
File '..../rpmbuild/BUILD/scap-security-guide-0.1.21/RHEL/7/output/ssg-rhel7-ds.xml' line 3940: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}concat': Missing child element(s). Expected is one of ( {http://oval.mitre.org/XMLSchema/oval-definitions-5}arithmetic, {http://oval.mitre.org/XMLSchema/oval-definitions-5}begin, {http://oval.mitre.org/XMLSchema/oval-definitions-5}concat, {http://oval.mitre.org/XMLSchema/oval-definitions-5}end, {http://oval.mitre.org/XMLSchema/oval-definitions-5}escape_regex, {http://oval.mitre.org/XMLSchema/oval-definitions-5}split, {http://oval.mitre.org/XMLSchema/oval-definitions-5}substring, {http://oval.mitre.org/XMLSchema/oval-definitions-5}time_difference, {http://oval.mitre.org/XMLSchema/oval-definitions-5}regex_capture, {http://oval.mitre.org/XMLSchema/oval-definitions-5}unique ).
Invalid SCAP Source Datastream content(1.2) in ..../rpmbuild/BUILD/scap-security-guide-0.1.21/RHEL/7/output/ssg-rhel7-ds.xml.
make[1]: *** [content] Error 1
</quote>

for a <local_variable> containing <concat> function specification containing
exactly one <literal_component> child element.

This error is easily fixable for someone aware of the fact that <concat>
function requires two child elements at least.

But wondering about the way how corresponding HTML guidance is generated?
And if it should be updated to reflect the fact that for ConcatFunctionType
the correct minOccurs value is 'minOccurs=2' and correct maxOccurs value is
'maxOccurs=unbounded'?

Of course this isn't an issue if someone checks the *.xsd form of the standard.
But shouldn't those two formats (*.xsd and *.html) be identical? (for case
someone using just the HTML form as guidance [which IMHO has a higher
chance to be referenced since being more easily accessible for view]
not to get easily confused)?

Thank you for your comments.

Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team

To unsubscribe, send an email message to [hidden email] with
SIGNOFF OVAL-DEVELOPER-LIST
in the BODY of the message.  If you have difficulties, write to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Should the minOccurs and maxOccurs values for ConcatFunctionType be updated in the HTML version of the OVAL Core Definition Schema Element Dictionary be updated?

joval
They should be identical; the documentation is clearly incorrect.  There appears to be the same problem with the documentation for the ArithmeticFunctionType.

David Solin
[hidden email]


> On Mar 24, 2015, at 1:27 PM, Jan Lieskovsky <[hidden email]> wrote:
>
> Hello folks,
>
>  yesterday when experimenting (read as commenting out selected
> children to find the proper regex pattern) with OVAL's concat function
> noticed the following.
>
> The HTML version of the ConcatFunctionType:
>  [1] https://oval.mitre.org/language/version5.11/ovaldefinition/documentation/oval-definitions-schema.html#ConcatFunctionType
>
> mentions minOccurs=1 and maxOccurs=1 as the expected bounds (for the
> oval-def:ComponentGroup)
>
> While the XSD form of the ConcatFunctionType specifies the correct values
> (minOccurs=2, maxOccurs=unbounded):
>  [2] https://github.com/OVALProject/Language/blob/master/schemas/oval-definitions-schema.xsd#L766
>
> Following the HTML guidance would / could result into error like the following one
> (for brevity selected just the relevant bits):
>
> <quote>
> File '..../rpmbuild/BUILD/scap-security-guide-0.1.21/RHEL/7/output/ssg-rhel7-ds.xml' line 3940: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}concat': Missing child element(s). Expected is one of ( {http://oval.mitre.org/XMLSchema/oval-definitions-5}arithmetic, {http://oval.mitre.org/XMLSchema/oval-definitions-5}begin, {http://oval.mitre.org/XMLSchema/oval-definitions-5}concat, {http://oval.mitre.org/XMLSchema/oval-definitions-5}end, {http://oval.mitre.org/XMLSchema/oval-definitions-5}escape_regex, {http://oval.mitre.org/XMLSchema/oval-definitions-5}split, {http://oval.mitre.org/XMLSchema/oval-definitions-5}substring, {http://oval.mitre.org/XMLSchema/oval-definitions-5}time_difference, {http://oval.mitre.org/XMLSchema/oval-definitions-5}regex_capture, {http://oval.mitre.org/XMLSchema/oval-definitions-5}unique ).
> Invalid SCAP Source Datastream content(1.2) in ..../rpmbuild/BUILD/scap-security-guide-0.1.21/RHEL/7/output/ssg-rhel7-ds.xml.
> make[1]: *** [content] Error 1
> </quote>
>
> for a <local_variable> containing <concat> function specification containing
> exactly one <literal_component> child element.
>
> This error is easily fixable for someone aware of the fact that <concat>
> function requires two child elements at least.
>
> But wondering about the way how corresponding HTML guidance is generated?
> And if it should be updated to reflect the fact that for ConcatFunctionType
> the correct minOccurs value is 'minOccurs=2' and correct maxOccurs value is
> 'maxOccurs=unbounded'?
>
> Of course this isn't an issue if someone checks the *.xsd form of the standard.
> But shouldn't those two formats (*.xsd and *.html) be identical? (for case
> someone using just the HTML form as guidance [which IMHO has a higher
> chance to be referenced since being more easily accessible for view]
> not to get easily confused)?
>
> Thank you for your comments.
>
> Regards, Jan.
> --
> Jan iankko Lieskovsky / Red Hat Security Technologies Team
>
> To unsubscribe, send an email message to [hidden email] with
> SIGNOFF OVAL-DEVELOPER-LIST
> in the BODY of the message.  If you have difficulties, write to [hidden email].

To unsubscribe, send an email message to [hidden email] with
SIGNOFF OVAL-DEVELOPER-LIST
in the BODY of the message.  If you have difficulties, write to [hidden email].

jOVAL.org: OVAL implemented in Java.
Scan any machine from any machine. For free!
Learn More | Features | Download