Skip to content

Conversation

@s-l-teichmann
Copy link
Contributor

Allow parsing of category fields in ROLIE entries.

@github-actions
Copy link

github-actions bot commented Nov 19, 2025

Modver result

This report was generated by Modver,
a Go package and command that helps you obey semantic versioning rules in your Go module.

This PR requires (at least) an increase in your module's minor version number.

checking *ROLIEFeed.EntryByID
  in results of func(id string) *github.com/gocsaf/csaf/v3/csaf.Entry
    struct field Base was added to github.com/gocsaf/csaf/v3/csaf.Entry
      Minor

@bernhardreiter
Copy link
Member

Comparision of allowed entry elements to what would the code accept with these changes applied:

https://www.rfc-editor.org/rfc/rfc4287

RELAX NG Schema

   atomCommonAttributes =
      attribute xml:base { atomUri }?,
      attribute xml:lang { atomLanguageTag }?,
      undefinedAttribute*
      
   undefinedAttribute =
     attribute * - (xml:base | xml:lang | local:*) { text }

https://www.rfc-editor.org/rfc/rfc8322.html#section-6.2

   atomEntry =
       element atom:entry {
-         atomCommonAttributes,
-		(atomAuthor*
x         & atomCategory*
x         & atomContent
-         & atomContributor*
x         & atomId
x         & atomLink*
x         & atomPublished?
-         & atomRights?
-         & atomSource?
x         & atomSummary?
x        & atomTitle
x         & atomUpdated
x         & rolieFormat?
-         & rolieProperty*
?         & extensionElement*)
     }
  • x == exists
  • - == missing

@bernhardreiter
Copy link
Member

bernhardreiter commented Nov 20, 2025

Given the open research question about undefinedAttribute* written down at the bottom if github.com//issues/702#issuecomment-3553564822, my suggestion is that we improve the implementation by adding everything, except undefinedAttribute* and extensionElement and document the open question to resolve.

@bernhardreiter bernhardreiter marked this pull request as ready for review November 27, 2025 14:29
Copy link
Member

@bernhardreiter bernhardreiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bernhardreiter
Copy link
Member

We could potentially mention in the docs somewhere that not support undefinedAttribute* and do not support extensionElement .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants