From: Florent R. <f.r...@fr...> - 2017-12-11 09:00:43
|
James Turner <jam...@kd...> wrote: > There’s supposed to be a concept in XML that no additional parsing of text > data is needed, but plenty of places violate that (JSBSim, SVG, for > starters). I was mainly thinking about whether the long description text should be line-wrapped or not. If I follow the principle you gave, that would mean no line wrapping, only use \n for hard newlines and new paragraphs. > I’m fine with ‘authors’ being free form, I accepted that for aircraft. Knowing > who is the active maintainer would be good, although knowing a contact / > support URL is probably more important there. > > License should definitely just be a token - I think all relevant licenses > exist at stable URLs. (So indeed, maybe just another URL type…) > > For keywords, I’d prefer they were separate, and called ‘tags’ to match the > aircraft metadata. So far I've locally added: - authors (plain string, stripped) - maintainers (plain string, stripped) - license (plain string, stripped) - keywords: comma-separated, then each element stripped, see below. I can add license-url (optional as all of these) if you think that would be good. I can rename 'keywords' to 'tags', no problem. The parsing of this field is: std::vector<std::string> addonKeywords; SGPropertyNode *keywordsNode = addonNode->getChild("keywords"); if (keywordsNode != nullptr) { // Use comma separator between keywords auto l = strutils::split(keywordsNode->getStringValue(), ","); for (const string& keyword: l) { addonKeywords.emplace_back(strutils::strip(keyword)); } } (maybe the result should be sorted before being stored) Regards -- Florent |