Skip to content

Spdx.Expressions 1.1.0

Choose a tag to compare

@DmitryGaravsky DmitryGaravsky released this 21 Nov 13:50
7be85c3

Spdx.Expressions 1.1.0

  • Resolve license references offline. Use SpdxReferenceContext.Resolve with the parsed expression and its source document. LicenseRef-X looks up X in that document. DocumentRef-V:LicenseRef-X looks up X in the target that the source document calls V. The application supplies the documents, bindings and definitions. Each occurrence retains its source span and returns the extracted license text on success. Separate outcomes identify unknown aliases, unavailable documents, missing definitions and duplicate declarations.
  • Read license fields without losing the original input. SpdxLicenseFieldReader.Read distinguishes a missing value, an empty string, NONE, NOASSERTION, a parsed expression, invalid syntax and a parse limit being exceeded. It preserves the original text and offsets. Reading a padded expression now scans the leading whitespace once. Existing calls to Parse and Validate keep their behavior.
  • Display names and links for licenses and exceptions. Catalogue entries expose Name, Reference and SeeAlso. Existing external catalogues remain supported, including those that omit these fields.
  • Build a diagnostic report. A runnable example shows a syntax error, a deprecated ID warning, an unknown ID, a LicenseRef occurrence and how to tell when the diagnostic list was truncated.