OpenXmlValidator.Validate() returns error for valid presentation
- Dominant language
- C#
- Stars
- 4.6k
- Forks
- 605
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
`OpenXmlValidator.Validate()` finds errors in valid presentation.
When I say **valid** presentation, I mean PowerPoint app doesn't complain.
**Repro**
[test.pptx](https://github.com/OfficeDev/Open-XML-SDK/files/9852881/test.pptx)
```c#
var pres = PresentationDocument.Open("test.pptx", false);
var validator = new OpenXmlValidator(FileFormatVersions.Microsoft365);
var errors = validator.Validate(pres);
foreach (var error in errors)
{
Console.WriteLine(error.Description);
}
pres.Close();
```
> The element has unexpected child element 'http://schemas.openxmlformats.org/drawingml/2006/chart:showDLblsOverMax'.
> The 'uri' attribute is not declared.
> The element has invalid child element 'http://schemas.microsoft.com/office/drawing/2017/03/chart:dataDisplayOptions16'. List of possible elements expected: lank>.
**Observed behavior**
`errors` collection is not empty.
**Expected behavior**
`errors` should be empty.
**Desktop**
- OS: Windows
- Office version: Microsoft 365 MSO (Version 2202 Build 16.0.14931.20718) 32-bit
- .NET Target: .NET 6
- DocumentFormat.OpenXml Version: 2.18.0
Contributor guide
Assessment
This issue has not been assessed yet.