# EpubReference

Represents an EPUB URL reference resolved against a container document path.

Class 

`OfficeIMO.Epub`

**Namespace**

`OfficeIMO.Epub`

**Assembly**

`OfficeIMO.Epub`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[EpubReference.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L104)

**Modifiers**

sealed

Represents an EPUB URL reference resolved against a container document path.

## Inheritance

- object
- EpubReference

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [EpubManifestItem.Reference](/api/epub/officeimo-epub-epubmanifestitem/#property-reference)
- Method [EpubReference.Resolve](/api/epub/officeimo-epub-epubreference/#method-resolve-string-string)

Filter members 

Show inherited

## Methods

Resolve 2 overloads

`public static EpubReference Resolve(string basePath, string reference)` [#](#method-resolve-string-string)

[EpubReference.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L104)

Resolves a reference against an EPUB container document path.

Parameters

**basePath string required**

Case-sensitive archive path of the containing document.

**reference string required**

URL reference to resolve.

Returns

`EpubReference` A typed result. Invalid and unsafe values do not throw.

`public static EpubReference Resolve(string documentPath, string? baseHref, string reference)` [#](#method-resolve-string-string-string)

[EpubReference.cs:243](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L243)

Resolves a content reference using an optional HTML base element value.

Parameters

**documentPath string required**

Case-sensitive archive path of the content document.

**baseHref string? required**

Optional HTML base URL.

**reference string required**

URL reference to resolve.

Returns

`EpubReference` A typed result. Invalid and unsafe values do not throw.

`public override string ToString()` [#](#method-tostring)

[EpubReference.cs:298](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L298)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

## Properties

`public string Original { get; }` [#](#property-original)

[EpubReference.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L36)

The original trimmed reference value.

`public EpubReferenceKind Kind { get; }` [#](#property-kind)

[EpubReference.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L39)

The resolved reference kind.

`public EpubReferenceError Error { get; }` [#](#property-error)

[EpubReference.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L42)

The resolution error, or [EpubReferenceError.None](/api/epub/officeimo-epub-epubreferenceerror/) on success.

`public string? ContainerPath { get; }` [#](#property-containerpath)

[EpubReference.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L45)

Case-sensitive normalized archive path for a container reference.

`public string? ContainerUrlPath { get; }` [#](#property-containerurlpath)

[EpubReference.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L50)

URL-encoded form of [EpubReference.ContainerPath](/api/epub/officeimo-epub-epubreference/) for serialization in links and media references.

`public string? ExternalUri { get; }` [#](#property-externaluri)

[EpubReference.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L53)

External or data URL, including its query and fragment when present.

`public string? Query { get; }` [#](#property-query)

[EpubReference.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L56)

Raw query value without the leading question mark.

`public string? Fragment { get; }` [#](#property-fragment)

[EpubReference.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L59)

Decoded fragment value without the leading number sign.

`public bool IsContainerRootRelative { get; }` [#](#property-iscontainerrootrelative)

[EpubReference.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L62)

Whether a container reference began at the virtual container root.

`public bool IsConforming { get; }` [#](#property-isconforming)

[EpubReference.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L69)

Whether the reference conforms to EPUB OCF URL restrictions. Safely resolved root-relative or backslash-separated container references are exposed with this value set to false.

`public bool IsValid { get; }` [#](#property-isvalid)

[EpubReference.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L72)

Whether the reference resolved successfully.

`public string? Target { get; }` [#](#property-target)

[EpubReference.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L79)

Resolved target without a fragment. Container targets include any original query.

`public string? ResolvedValue { get; }` [#](#property-resolvedvalue)

[EpubReference.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Epub/EpubReference.cs#L92)

Fully resolved container path or preserved external/data URL.

<!-- PowerForge markdown artifact sha256:7AB5B2F1002188848BF458BAE3E0EF73D59071B110C16770610C99FE5629202E -->
