Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The <id/> description uses terms incorrectly #440

Closed
van-de-bugger opened this issue Oct 22, 2022 · 0 comments
Closed

The <id/> description uses terms incorrectly #440

van-de-bugger opened this issue Oct 22, 2022 · 0 comments

Comments

@van-de-bugger
Copy link

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

The <id/> description is rather bad:

The <id> tag is a unique identifier for this component. It must contain only ASCII characters, dots, hyphens and numbers. Spaces are not allowed. While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such as D-Bus (and thereby making the ID more generic and useful).

The first sentence:

The <id> tag is a unique identifier for this component.

The term "tag" is used incorrectly. In XML terminology, the <id> start-tag is just <id> string which denotes the beginning of the id element; in turn, id element starts with the <id> start-tag and ends with </id> end-tag. See XML terminology either in Wikipedia or in XML Specification.

(It seems all AppStream documentation uses the term "tag" incorrectly.)

The second sentence:

It must contain only ASCII characters, dots, hyphens and numbers.

!, @, #, $, %, ^, &, * — all these characters are ASCII characters, but they are not allowed in ID.

I guess the second sentence should look like: "It must contain only ASCII letters, dots, underscores, hyphens and digits."

Just for example, look how D-Bus Specification describes the valid bus names:

<...> Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_-", with "-" discouraged in new bus names. <...>

They explicitly list the allowed ASCII characters.

@ximion ximion closed this as completed in a460926 Jan 24, 2023
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

No branches or pull requests

1 participant