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 idelement; in turn, idelement 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.
The text was updated successfully, but these errors were encountered:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic
The
<id/>description is rather bad:The first sentence:
The term "tag" is used incorrectly. In XML terminology, the
<id>start-tag is just<id>string which denotes the beginning of theidelement; in turn,idelement 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:
!,@,#,$,%,^,&,*— 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:
They explicitly list the allowed ASCII characters.
The text was updated successfully, but these errors were encountered: