(nw) the software list device is identified by its tag, the name is tells you which list it will load

XML attributes are order-insensitive - compliant validators (e.g. libxml2's
xmllint) accepted the XML how it was before.  It would be better if parsers
didn't enforce rules that don't exist.
This commit is contained in:
Vas Crabb 2019-12-31 11:57:50 +11:00
parent 563a2b2095
commit 56282074cb

View File

@ -239,8 +239,8 @@ static const char s_dtd_string[] =
"\t\t\t\t<!ATTLIST slotoption devname CDATA #REQUIRED>\n"
"\t\t\t\t<!ATTLIST slotoption default (yes|no) \"no\">\n"
"\t\t<!ELEMENT softwarelist EMPTY>\n"
"\t\t\t<!ATTLIST softwarelist name CDATA #REQUIRED>\n"
"\t\t\t<!ATTLIST softwarelist tag CDATA #REQUIRED>\n"
"\t\t\t<!ATTLIST softwarelist name CDATA #REQUIRED>\n"
"\t\t\t<!ATTLIST softwarelist status (original|compatible) #REQUIRED>\n"
"\t\t\t<!ATTLIST softwarelist filter CDATA #IMPLIED>\n"
"\t\t<!ELEMENT ramoption (#PCDATA)>\n"
@ -1950,7 +1950,7 @@ void output_software_lists(std::ostream &out, device_t &root, const char *root_t
std::string newtag(swlist.tag()), oldtag(":");
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
out << util::string_format("\t\t<softwarelist name=\"%s\" tag=\"%s\" status=\"%s\"", normalize_string(swlist.list_name().c_str()), normalize_string(newtag.c_str()), swlist.is_original() ? "original" : "compatible");
out << util::string_format("\t\t<softwarelist tag=\"%s\" name=\"%s\" status=\"%s\"", normalize_string(newtag.c_str()), normalize_string(swlist.list_name().c_str()), swlist.is_original() ? "original" : "compatible");
if (swlist.filter())
out << util::string_format(" filter=\"%s\"", normalize_string(swlist.filter()));