not quite minimalistic enough  

You had one job ...

To add UI controls to the host application in an Office COM add-in, you implement a callback function that returns an XML document describing your modifications. You can add tabs, groups, controls, remove existing ones, etc.

Writing this ribbon XML can be a bit difficult because the existing documentation is useless. It is spread over multiple (many!) MSDN and Docs pages, as well as MSDN blogs, few of which are consistent with each other. Additionally, most of them describe the Office 2007 situation, but it has changed since.

Luckily, there is one reliable reference for what is allowed, and where: The Office Fluent User Interface XML Schema. You can validate your XML against this schema, and if that works, there is a good chance that the Office applications will accept your extensions.

Except that Microsoft somehow managed to make the schema itself invalid. No idea how they produced such an astounding result; it must have cost extra effort to get it just slightly wrong.

The problem is “attribute multiple inheritance”, where an element’s type gets attribute declarations through multiple extension paths, such as one direct declaration and one in an <attributeGroup> it uses. It is a bit unfortunate that this is not allowed – IMO it should be possible to have multiple identical declarations of the same attribute (or child element, etc.).

It is possible, of course, that whatever Microsoft used to validate the schema does not implement the restriction on multiple inheritance of attributes. Anyway, removing one instance of the problematic attribute declarations makes the schema valid without – I think – causing validation errors in too many existing ribbon extensions.

Written on August 21, 2018