sacmwg / draft-ietf-sacm-coswid

Concise Software Identifiers
Other
2 stars 5 forks source link

wrong CDDL in global-attributes group definition #25

Closed thomas-fossati closed 3 years ago

thomas-fossati commented 4 years ago

In section 2.5 global-attributes is defined as

   global-attributes = (
     ? lang,
     * any-attribute,
   )

Instead, it should be:

   global-attributes = (
     ? lang => text,
     * any-attribute,
   )

This kind of copy&paste error could be avoided by having one true CDDL source; an example here.

henkbirkholz commented 4 years ago

Breaking out CDDL should be automated - I absolute agree. There are mechanisms in place for younger I-Ds. I admit that I was too lazy to backport them here. And this is the consequence :-)

cabo commented 4 years ago

Please use {::include foo.cddl} and make sure these CDDL files build/validate (write a Makefile).

henkbirkholz commented 4 years ago

We currently use:

~~~ CDDL
<CODE BEGINS>
{::include concise-swid-tag.cddl}
<CODE ENDS>
~~~

But not for the exepositional CDDL fragments that are used to improve readability throughout the text. Using regexp here to extract fragments from the full CDDL usually helps. We did not do this here. The fragments used as examples are not intended to build/validate by their own.

henkbirkholz commented 3 years ago

Should be consistent now

cabo commented 3 years ago

The XPath expression //sourcecode[@type='cddl']/text() can be used on the XML form of this specification to extract the CDDL defined here.

You could make sure that this validates.

cabo commented 3 years ago

Oh, can you please commit the referenced cddl files?

henkbirkholz commented 3 years ago

done. check-cddl.sh can now be found in the repo