Schema Error : The attribute 'anchory' has invalid value 'line'. The Enumeration constraint failed.
See original GitHub issueIs this a:
- Issue with the OpenXml library
- Question on library usage
Description
Schema Error : The attribute ‘anchory’ has invalid value ‘line’. The Enumeration constraint failed. On 2 separate valid Office 365 Word documents.
Information
- .NET Target: NET 4.6.2
- DocumentFormat.OpenXml Version: 2.11.0
Repro
class Program
{
static void Main(string[] args)
{
OpenXmlPackage wordDocument1 = WordprocessingDocument.Open("BouwstenenAlle.docm", false);
List<ValidationErrorInfo> errorInfos1 = ValidateDocument(wordDocument1);
foreach (ValidationErrorInfo info in errorInfos1)
{
Console.WriteLine(string.Format("BouwstenenAlle.docm Error Occurred {0}", info.Description));
}
OpenXmlPackage wordDocument2 = WordprocessingDocument.Open("LettertypenAlle.docx", false);
List<ValidationErrorInfo> errorInfos2 = ValidateDocument(wordDocument2);
foreach (ValidationErrorInfo info in errorInfos2)
{
Console.WriteLine(string.Format("LettertypenAlle.docx Validaton Error Occurred {0}", info.Description));
}
Console.ReadKey();
}
static List<ValidationErrorInfo> ValidateDocument(OpenXmlPackage package)
{
OpenXmlValidator validator = new OpenXmlValidator(FileFormatVersions.Office2016);
List<ValidationErrorInfo> validationErrors = validator.Validate(package).ToList();
return validationErrors;
}
}
Observed
The following validation error was reported on both files.
Schema Error : The attribute ‘anchory’ has invalid value ‘line’. The Enumeration constraint failed.
Expected
Both files should have been validated successfully without the above error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Schema Error : The attribute 'anchory' has invalid value ' ...
The Enumeration constraint failed. On 2 separate valid Office 365 Word documents. ... The following validation error was reported on both files.
Read more >How can I fix "the Enumeration constraint failed"?
The following error messages appear in the Web.config file: The 'contract' attribute is invalid - The value 'SandwichServices.CostService' is ...
Read more >Enumeration constraint failed error occurs when creating a ...
Error occurs when you open a previously saved map: enumeration constraint failed.
Read more >Understanding schema errors
The schema is defined by the XSD. Schema errors occur where there is a problem with the structure or order of the file,...
Read more >Management agent run error codes
This error is returned by the management agents for LDAP and Windows NT 4.0 when the value for an attribute violates certain value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At this time no time is set. However, a number of API updates are on the docket, so probably within a month
Going to close this issue as I am satisfied with the responses. Feel free to reopen if necessary