You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not into the details of the SPDX 2.1 file format, so I can only guess <text> values need XML entity encoding, like replacing <https://foundata.com></text> with <https://foundata.com<</text>
Counterpoint: And as far as I can tell, the copyrightText in 3.0.1 allows the Range xs-string which does not need encoding? Is this correct?
2) If no encoding is needed: At least strip </text>?
Even if no entity encoding is needed, I can also put </text> into the values (e.g. SPDX-PackageSupplier = "foundata GmbH</text> <https://foundata.com>"
This results in FileCopyrightText: <text>foundata GmbH</text> <https://foundata.com></text> (as expected) which leads to validation errors at least to pyspdxtools_parser --file reuse.spdx v0.7.1) (also some kind of expected):
$ pyspdxtools_parser --file reuse.spdx
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 30
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 37
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 44
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 51
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 58
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 65
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 72
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 79
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 86
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 93
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 100
FileCopyrightText must be one of NOASSERTION, NONE, free form text or single line of text,line: 107
Errors while parsing: True
3) What is the recommendation?
We are used to put plain URLs into <URI> like it was recommended for plaintext Emails and Markdown since decades. But as it seems, this might be a bit problematic for SPDX-PackageSupplier. What do you recommend? Should this be mentioned in the docs?
The text was updated successfully, but these errors were encountered:
andreashaerter
changed the title
Clarfifcation: reuse spdx and FileCopyrightText values containing XML entities
Clarification: reuse spdx and FileCopyrightText values containing XML entities
Jan 6, 2025
Hi,
Small questions about
FileCopyrightText: <text>...</text>
and values containing<
and>
:1) Do they need encoding? If so, there is a bug.
Example:
REUSE.toml
, which includesSPDX-FileCopyrightText = "foundata GmbH <https://foundata.com>"
. (The repository adheres to the latest REUSE specification.)When generating an SPDX SBOM file, there are
<text>
tags whose values are not escaped or lack entity encoding:I am not into the details of the SPDX 2.1 file format, so I can only guess
<text>
values need XML entity encoding, like replacing<https://foundata.com></text>
with<https://foundata.com<</text>
Counterpoint: And as far as I can tell, the copyrightText in 3.0.1 allows the Range
xs-string
which does not need encoding? Is this correct?2) If no encoding is needed: At least strip
</text>
?Even if no entity encoding is needed, I can also put
</text>
into the values (e.g.SPDX-PackageSupplier = "foundata GmbH</text> <https://foundata.com>"
This results in
FileCopyrightText: <text>foundata GmbH</text> <https://foundata.com></text>
(as expected) which leads to validation errors at least topyspdxtools_parser --file reuse.spdx
v0.7.1) (also some kind of expected):3) What is the recommendation?
We are used to put plain URLs into
<URI>
like it was recommended for plaintext Emails and Markdown since decades. But as it seems, this might be a bit problematic forSPDX-PackageSupplier
. What do you recommend? Should this be mentioned in the docs?The text was updated successfully, but these errors were encountered: