# OfficeHtmlSemanticEnvelope

Owns the versioned OfficeIMO semantic HTML envelope contract.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OfficeHtmlSemanticEnvelope.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L33)

**Modifiers**

static

Owns the versioned OfficeIMO semantic HTML envelope contract.

## Inheritance

- object
- OfficeHtmlSemanticEnvelope

Filter members 

Show inherited

## Methods

`public static void AppendRootAttributes(StringBuilder builder, string source, string profile)` [#](#method-appendrootattributes-text-stringbuilder-string-string)

[OfficeHtmlSemanticEnvelope.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L33)

Appends canonical source, profile, and schema attributes to an open start tag.

Parameters

**builder System.Text.StringBuilder required**

**source string required**

**profile string required**

`public static OfficeHtmlSemanticEnvelopeInfo Inspect(HtmlDocument document, string expectedSource)` [#](#method-inspect-officeimo-html-dom-htmldocument-string)

[OfficeHtmlSemanticEnvelope.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L58)

Inspects a parsed document using the shared compatibility rules.

Parameters

**document OfficeIMO.Html.Dom.HtmlDocument required**

**expectedSource string required**

Returns

`OfficeHtmlSemanticEnvelopeInfo`

`public static bool IsSupportedVersion(string? version)` [#](#method-issupportedversion-string)

[OfficeHtmlSemanticEnvelope.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L92)

Returns whether an explicit envelope schema version is accepted.

Parameters

**version string? required**

Returns

`bool`

## 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`

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

Inherited from object

Returns

`string?`

## Fields

`public const string CurrentSchemaVersion` [#](#field-currentschemaversion)

[OfficeHtmlSemanticEnvelope.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L8)

Current semantic-envelope schema version emitted by OfficeIMO adapters.

Value: `2`

`public const string PreviousSchemaVersion` [#](#field-previousschemaversion)

[OfficeHtmlSemanticEnvelope.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L11)

Previous explicit schema version accepted for backward-compatible imports.

Value: `1`

`public const string SchemaVersionAttribute` [#](#field-schemaversionattribute)

[OfficeHtmlSemanticEnvelope.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L14)

HTML attribute carrying the semantic-envelope schema version.

Value: `data-officeimo-schema-version`

`public const string RestorationAttribute` [#](#field-restorationattribute)

[OfficeHtmlSemanticEnvelope.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L17)

HTML attribute declaring whether restoration metadata is public-safe or caller-trusted.

Value: `data-officeimo-restoration`

`public const string PublicSemanticsAttribute` [#](#field-publicsemanticsattribute)

[OfficeHtmlSemanticEnvelope.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L20)

HTML attribute declaring the validation state of public semantic metadata.

Value: `data-officeimo-public-semantics`

`public const string PublicSemanticsSafe` [#](#field-publicsemanticssafe)

[OfficeHtmlSemanticEnvelope.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L23)

Validated public semantic metadata marker emitted by schema version 2.

Value: `safe`

`public const string PublicSafeRestoration` [#](#field-publicsaferestoration)

[OfficeHtmlSemanticEnvelope.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L26)

Restoration mode that may be used at an untrusted input boundary.

Value: `public-safe`

`public const string TrustedTargetRestoration` [#](#field-trustedtargetrestoration)

[OfficeHtmlSemanticEnvelope.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/OfficeHtmlSemanticEnvelope.cs#L29)

Restoration mode that requires an explicitly trusted input boundary.

Value: `trusted-target`

<!-- PowerForge markdown artifact sha256:71BD4ADA2596BA2CBB2E4D3DC7C9BF3CA68AE700CA95D7DE8A065126481526AD -->
