Table of Contents

Class OdfValidator

Namespace
OdfKit.Compliance
Assembly
OdfKit.dll

Provides a unified public entry point for ODF document validation. 提供統一的公開 ODF 文件驗證入口。

public static class OdfValidator
Inheritance
OdfValidator
Inherited Members

Methods

Validate(OdfPackage)

Validates an already-open ODF package. 驗證已開啟的 ODF 封裝。

public static OdfValidationReport Validate(OdfPackage package)

Parameters

package OdfPackage

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(OdfPackage, OdfComplianceProfile?)

Short overload of Validate that accepts package and profile; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 package 與 profile;其餘可選參數使用預設值並轉呼叫最長 Validate 多載。

public static OdfValidationReport Validate(OdfPackage package, OdfComplianceProfile? profile)

Parameters

package OdfPackage
profile OdfComplianceProfile

Returns

OdfValidationReport

Validate(OdfPackage, OdfComplianceProfile?, string?)

Short overload of Validate that accepts package, profile, and fileName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 package、profile 與 fileName;其餘可選參數使用預設值並轉呼叫最長 Validate 多載。

public static OdfValidationReport Validate(OdfPackage package, OdfComplianceProfile? profile, string? fileName)

Parameters

package OdfPackage
profile OdfComplianceProfile
fileName string

Returns

OdfValidationReport

Validate(OdfPackage, OdfValidationOptions?)

Validates an already-open ODF package using the specified options. 使用指定選項驗證已開啟的 ODF 封裝。

public static OdfValidationReport Validate(OdfPackage package, OdfValidationOptions? options)

Parameters

package OdfPackage

The ODF package to validate. / 要驗證的 ODF 封裝。

options OdfValidationOptions

The validation options. / 驗證選項。

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(Stream)

Validates the ODF document in the specified stream. 驗證指定串流中的 ODF 文件。

public static OdfValidationReport Validate(Stream stream)

Parameters

stream Stream

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(Stream, OdfValidationOptions?)

Validates the ODF document in the specified stream using the specified options. 使用指定選項驗證指定串流中的 ODF 文件。

public static OdfValidationReport Validate(Stream stream, OdfValidationOptions? options)

Parameters

stream Stream

The ODF document stream to validate. / 要驗證的 ODF 文件串流。

options OdfValidationOptions

The validation options. / 驗證選項。

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(Stream, string?)

Short overload of Validate that accepts stream and fileName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 stream 與 fileName;其餘可選參數使用預設值並轉呼叫最長 Validate 多載。

public static OdfValidationReport Validate(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

OdfValidationReport

Validate(Stream, string?, OdfComplianceProfile?)

Short overload of Validate that accepts stream, fileName, and profile; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 stream、fileName 與 profile;其餘可選參數使用預設值並轉呼叫最長 Validate 多載。

public static OdfValidationReport Validate(Stream stream, string? fileName, OdfComplianceProfile? profile)

Parameters

stream Stream
fileName string
profile OdfComplianceProfile

Returns

OdfValidationReport

Validate(string)

Validates the ODF document at the specified path. 驗證指定路徑的 ODF 文件。

public static OdfValidationReport Validate(string path)

Parameters

path string

The ODF document path to validate. / 要驗證的 ODF 文件路徑。

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(string, OdfComplianceProfile?)

Validates the ODF document at the specified path using the specified compliance profile. 使用指定設定檔驗證指定路徑的 ODF 文件。

public static OdfValidationReport Validate(string path, OdfComplianceProfile? profile)

Parameters

path string

The ODF document path to validate. / 要驗證的 ODF 文件路徑。

profile OdfComplianceProfile

The compliance profile. / 相容性設定檔。

Returns

OdfValidationReport

The validation report. / 驗證結果報告。

Validate(string, OdfValidationOptions?)

Validates the ODF document at the specified path using the specified options. 使用指定選項驗證指定路徑的 ODF 文件。

public static OdfValidationReport Validate(string path, OdfValidationOptions? options)

Parameters

path string

The ODF document path to validate. / 要驗證的 ODF 文件路徑。

options OdfValidationOptions

The validation options. / 驗證選項。

Returns

OdfValidationReport

The validation report. / 驗證結果報告。