Class Epub3NavDocumentReaderOptions
Various options to configure the behavior of the EPUB 3 navigation document reader.
Inherited Members
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class Epub3NavDocumentReaderOptions
Constructors
View SourceEpub3NavDocumentReaderOptions(EpubReaderOptionsPreset?)
Initializes a new instance of the Epub3NavDocumentReaderOptions class.
Declaration
public Epub3NavDocumentReaderOptions(EpubReaderOptionsPreset? preset = null)
Parameters
| Type | Name | Description |
|---|---|---|
| EpubReaderOptionsPreset? | preset | An optional preset to initialize the Epub3NavDocumentReaderOptions class with a predefined set of options. |
Properties
View SourceIgnoreMissingBodyElementError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the NAV file is missing the 'body' element.
If it's set to false and the 'body' element is not present,
then the "EPUB parsing error: navigation file does not contain body element." exception will be thrown.
This exception can be suppressed by setting this property to true. However, since 'body' is an essential element
in the navigation document, the reader will treat this case as if the EPUB file doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreMissingBodyElementError { get; set; }
Property type: bool
View SourceIgnoreMissingHtmlElementError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the NAV file is missing the 'html' element.
If it's set to false and the 'html' element is not present,
then the "EPUB parsing error: navigation file does not contain html element." exception will be thrown.
This exception can be suppressed by setting this property to true. However, since 'html' is the top-level element
in the navigation document, the reader will treat this case as if the EPUB file doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreMissingHtmlElementError { get; set; }
Property type: bool
View SourceIgnoreMissingNavFileError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the NAV file referenced by the NAV manifest item is missing in the EPUB file.
If it's set to false and the content file referenced by the NAV manifest item is not present,
then the "EPUB parsing error: navigation file ... not found in the EPUB file." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will treat the EPUB file
as if it doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreMissingNavFileError { get; set; }
Property type: bool
View SourceIgnoreMissingNavManifestItemError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the book doesn't have a manifest item with the 'nav' property.
If it's set to false and the NAV manifest item is missing in the EPUB manifest,
then the "EPUB parsing error: NAV item not found in EPUB manifest." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will treat the EPUB file
as if it doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreMissingNavManifestItemError { get; set; }
Property type: bool
View SourceIgnoreNavFileIsNotValidXmlError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the NAV file is not a valid XHTML file.
If it's set to false and an XML parsing error has occurred while trying to open the NAV file,
then the "EPUB parsing error: navigation file is not a valid XHTML file." exception will be thrown
with the original XmlException available through the InnerException property.
This exception can be suppressed by setting this property to true, in which case the reader will treat the EPUB file
as if it doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreNavFileIsNotValidXmlError { get; set; }
Property type: bool
View SourceIgnoreNavFileIsTooLargeError
Gets or sets a value indicating whether the EPUB 3 navigation document reader should ignore the error when the NAV file is larger than 2 GB.
If it's set to false and the content file referenced by the NAV manifest item is larger than 2 GB,
then the "EPUB parsing error: navigation file ... is larger than 2 GB." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will treat the EPUB file
as if it doesn't have a EPUB 3 navigation document.
Default value is false.
Declaration
public bool IgnoreNavFileIsTooLargeError { get; set; }
Property type: bool
View SourceSkipInvalidLiElements
Gets or sets a value indicating whether the EPUB 3 navigation document reader should skip 'li' elements that are missing required child elements.
If it's set to false and neither the 'a' element nor the 'span' element are present inside an 'li' element,
then the "EPUB parsing error: 'li' element in the navigation file must contain either an 'a' element or a 'span' element."
exception will be thrown.
This exception can be suppressed by setting this property to true, in which case those 'li' elements will be skipped.
Default value is false.
Declaration
public bool SkipInvalidLiElements { get; set; }
Property type: bool
View SourceSkipNavsWithMissingOlElements
Gets or sets a value indicating whether the EPUB 3 navigation document reader should skip 'nav' elements that are missing a child 'ol' element.
If it's set to false and the 'ol' element is not present inside a 'nav' element,
then the "EPUB parsing error: 'nav' element in the navigation file does not contain a required 'ol' element." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case those 'nav' elements will be skipped.
Default value is false.
Declaration
public bool SkipNavsWithMissingOlElements { get; set; }