DocumentUrlContext.ResolveFromDocumentationRoot Method

Namespace
Kampute.DocToolkit.Routing
Assembly
  • Kampute.DocToolkit.dll

Definition

Resolves a documentation-root-relative URL into an absolute or document-relative URL.
public abstract string ResolveFromDocumentationRoot(string urlString)

Parameters

urlString string
A URL string relative to the documentation root (without the ~/ marker). The URL consists of a normalized path component and may optionally include a query string and/or fragment.

Returns

string
An absolute or document-relative URL string that correctly navigates from the current document's location to the target.

Exceptions

ArgumentNullException
Thrown when urlString is null.

Remarks

This method performs the core URL resolution logic based on the current document context. The input URL must be relative to the documentation root with its path component already normalized (no .. segments that escape the root).

Query strings and fragments in the URL are preserved in the resolved result.