-
Notifications
You must be signed in to change notification settings - Fork 572
Open
Description
Is your feature request related to a problem? Please describe.
The current Uri usage in the System.IO.Packaging is very strict to the official RFC, but appears to be too strict for what Office documents can have
Describe the solution you'd like
We should have a generalized type (i.e. OpenXmlUri) that will easily convert to System.Uri or string representations.
Describe alternatives you've considered
There are a few attempts at handling this, most recently, this:
Open-XML-SDK/src/DocumentFormat.OpenXml.Framework/Packaging/PackageUriHandlingExtensions.cs
Lines 228 to 241 in 307fa23
| private sealed class RewrittenUri : Uri | |
| { | |
| public RewrittenUri(string uriString, string original) | |
| : base(uriString) | |
| { | |
| Target = original; | |
| } | |
| public string Target { get; } | |
| public string Rewritten => OriginalString; | |
| public override string ToString() => Target; | |
| } |
It may be useful to start with.
TODO:
- Find where in the spec the Uri type is defined for the packaging spec
Faibbus
Metadata
Metadata
Assignees
Labels
No labels