dotnet / dotnet/Open-XML-SDK

This document is missing a relationship

Open
#863 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
4.6k
Forks
605
PR merge metrics
No merged PRs in 30d

Description

**Description**
This document is missing a relationship,say "数据包中不存在指定部件", how to skip error or provide callback function ?
Please provide a simple description of the issue encountered.

**Information**

- .NET Target: (net461)
- DocumentFormat.OpenXml Version: (2.11.3)

**Repro**
#858
```csharp
// Please add a self-contained, minimum viable repro of the issue.
// If you require external resources, please provide a gist or GitHub repro
// An Xunit style test is preferred, but a console application would work too.
```

When I unzip the docx file, on the path " word\_rels\document.xml.rels", I found "Target="../NULL"/"
Are there any where to skip error relationship or delete error relationship ?
I use RemoveMalformedHyperlinksRelationshipErrorHandler to solve, but It not work.
![image](https://user-images.githubusercontent.com/17868266/105802835-f3a13300-5fd6-11eb-8dd8-f8c6662d7e9d.png)

**Observed**

Please add your observed behavior here

**Expected**

Please add your expected behavior here.
Skip error or fix document.

Or use code do like this:

https://docs.microsoft.com/en-us/office/troubleshoot/word/image-part-relationship-rld8-not-found-error-microsoft-word

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.