Unescaped <generic> brackets inside attribute value in D-Bus XML
I was looking for examples of D-Bus interfaces, and I came across this file. Thanks to the syntax highlighting magic, I quickly spotted that something wasn't quite right with one of the annotations.
I guess it was supposed to be written this way:
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/>
https://www.w3.org/TR/xml/#NT-AttValue
The lxml library supports my theory:
>>> from lxml import etree
>>> a = etree.Element('annotation', name="org.qtproject.QtDBus.QtTypeName", value="QList<NamedSessionPath>")
>>> print(etree.tostring(a).decode('utf-8'))
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/>
The file is clearly not something a human would've written from scratch. Whatever generated them, should be fixed upstream.
CC @davidedmundson who originally introduced these XMLs to this repo.