Class Epub2NcxReaderOptions
Various options to configure the behavior of the EPUB 2 NCX navigation document reader.
Inherited Members
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class Epub2NcxReaderOptions
Constructors
View SourceEpub2NcxReaderOptions(EpubReaderOptionsPreset?)
Initializes a new instance of the Epub2NcxReaderOptions class.
Declaration
public Epub2NcxReaderOptions(EpubReaderOptionsPreset? preset = null)
Parameters
| Type | Name | Description |
|---|---|---|
| EpubReaderOptionsPreset? | preset | An optional preset to initialize the Epub2NcxReaderOptions class with a predefined set of options. |
Properties
View SourceAllowNavigationListsWithoutLabels
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when a navigation list doesn't have any labels.
If it's set to false and a navigation list without any labels is found,
then the "Incorrect EPUB navigation list: at least one navLabel element is required." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will skip the label count validation.
Default value is false.
Declaration
public bool AllowNavigationListsWithoutLabels { get; set; }
Property type: bool
View SourceAllowNavigationPageTargetsWithoutLabels
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when a navigation page target doesn't have any labels.
If it's set to false and a navigation page target without any labels is found,
then the "Incorrect EPUB navigation page target: at least one navLabel element is required." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will skip the label count validation.
Default value is false.
Declaration
public bool AllowNavigationPageTargetsWithoutLabels { get; set; }
Property type: bool
View SourceAllowNavigationPointsWithoutLabels
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when a navigation point doesn't have any labels.
If it's set to false and a navigation point without any labels is found,
then the "EPUB parsing error: navigation point ... should contain at least one navigation label." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will skip the label count validation.
Default value is false.
Declaration
public bool AllowNavigationPointsWithoutLabels { get; set; }
Property type: bool
View SourceAllowNavigationTargetsWithoutLabels
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when a navigation target doesn't have any labels.
If it's set to false and a navigation target without any labels is found,
then the "Incorrect EPUB navigation target: at least one navLabel element is required." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will skip the label count validation.
Default value is false.
Declaration
public bool AllowNavigationTargetsWithoutLabels { get; set; }
Property type: bool
View SourceIgnoreMissingContentForNavigationPoints
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip navigation points that are missing the 'content' XML element.
If it's set to false and the 'content' element is not present,
then the "EPUB parsing error: navigation point ... should contain content." exception will be thrown.
This exception can be suppressed by setting this property to true,
in which case the navigation points with the missing content will be skipped.
Default value is false.
Declaration
public bool IgnoreMissingContentForNavigationPoints { get; set; }
Property type: bool
View SourceIgnoreMissingDocTitleElementError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is missing the 'docTitle' XML element.
If it's set to false and the 'docTitle' XML element is not present,
then the "EPUB parsing error: TOC file does not contain docTitle element." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will set
the DocTitle property to null.
Default value is false.
Declaration
public bool IgnoreMissingDocTitleElementError { get; set; }
Property type: bool
View SourceIgnoreMissingHeadElementError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is missing the 'head' XML element.
If it's set to false and the 'head' XML element is not present,
then the "EPUB parsing error: TOC file does not contain head element." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will create an empty
Epub2NcxHead object for the Head property.
Default value is false.
Declaration
public bool IgnoreMissingHeadElementError { get; set; }
Property type: bool
View SourceIgnoreMissingNavMapElementError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is missing the 'navMap' XML element.
If it's set to false and the 'navMap' XML element is not present,
then the "EPUB parsing error: TOC file does not contain navMap element." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will create an empty
Epub2NcxNavigationMap object for the NavMap property.
Default value is false.
Declaration
public bool IgnoreMissingNavMapElementError { get; set; }
Property type: bool
View SourceIgnoreMissingNcxElementError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is missing the 'ncx' XML element.
If it's set to false and the 'ncx' XML element is not present,
then the "EPUB parsing error: TOC file does not contain ncx element." exception will be thrown.
This exception can be suppressed by setting this property to true. However, since 'ncx' is the top-level XML element
in the EPUB 2 NCX file, the reader will treat this case as if the EPUB file doesn't have a EPUB 2 NCX document.
Default value is false.
Declaration
public bool IgnoreMissingNcxElementError { get; set; }
Property type: bool
View SourceIgnoreMissingTocFileError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file referenced by the TOC manifest item is missing in the EPUB file.
If it's set to false and the content file referenced by the TOC manifest item is not present,
then the "EPUB parsing error: TOC 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 2 NCX document.
Default value is false.
Declaration
public bool IgnoreMissingTocFileError { get; set; }
Property type: bool
View SourceIgnoreMissingTocManifestItemError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the manifest item referenced by the EPUB spine's 'toc' attribute is missing.
If it's set to false and the TOC manifest item is missing in the EPUB manifest,
then the "EPUB parsing error: TOC 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 2 NCX document.
Default value is false.
Declaration
public bool IgnoreMissingTocManifestItemError { get; set; }
Property type: bool
View SourceIgnoreTocFileIsNotValidXmlError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is not a valid XML file.
If it's set to false and an XML parsing error has occurred while trying to open the TOC file,
then the "EPUB parsing error: TOC file is not a valid XML 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 2 NCX document.
Default value is false.
Declaration
public bool IgnoreTocFileIsNotValidXmlError { get; set; }
Property type: bool
View SourceIgnoreTocFileIsTooLargeError
Gets or sets a value indicating whether the EPUB 2 NCX reader should ignore the error when the TOC file is larger than 2 GB.
If it's set to false and the content file referenced by the TOC manifest item is larger than 2 GB,
then the "EPUB parsing error: TOC 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 2 NCX document.
Default value is false.
Declaration
public bool IgnoreTocFileIsTooLargeError { get; set; }
Property type: bool
View SourceReplaceMissingPageTargetTypesWithUnknown
Gets or sets a value indicating whether the EPUB 2 NCX reader should replace missing navigation page target types with unknown types.
If it's set to false and the 'type' attribute is not present on a 'pageTarget' XML node,
then the "Incorrect EPUB navigation page target: page target type is missing." exception will be thrown.
This exception can be suppressed by setting this property to true, in which case the reader will ignore the error
and will set the Type property to UNKNOWN.
Default value is false.
Declaration
public bool ReplaceMissingPageTargetTypesWithUnknown { get; set; }
Property type: bool
View SourceSkipInvalidMetaElements
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip 'meta' XML elements that are missing required attributes ('name' and 'content').
If it's set to false and one of the required attributes is not present,
then one of the "Incorrect EPUB navigation meta: meta ... is missing." exceptions will be thrown.
This exception can be suppressed by setting this property to true, in which case the items with the missing attributes will be skipped.
Default value is false.
Declaration
public bool SkipInvalidMetaElements { get; set; }
Property type: bool
View SourceSkipInvalidNavigationContent
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip navigation content elements that are missing the 'src' attribute.
If it's set to false and the 'src' attribute is not present,
then the "Incorrect EPUB navigation content: content source is missing." exception will be thrown.
This exception can be suppressed by setting this property to true,
in which case both the navigation content with the missing attribute and the element it belongs to
(navigation point, navigation target, or navigation page target) will be skipped.
Default value is false.
Declaration
public bool SkipInvalidNavigationContent { get; set; }
Property type: bool
View SourceSkipInvalidNavigationLabels
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip navigation labels that are missing the 'text' XML element.
If it's set to false and the 'text' element is not present,
then the "Incorrect EPUB navigation label: label text element is missing." exception will be thrown.
This exception can be suppressed by setting this property to true,
in which case the navigation labels with the missing text will be skipped.
Default value is false.
Declaration
public bool SkipInvalidNavigationLabels { get; set; }
Property type: bool
View SourceSkipInvalidNavigationTargets
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip navigation targets that are missing the 'id' attribute.
If it's set to false and the 'id' attribute is not present,
then the "Incorrect EPUB navigation target: navigation target ID is missing." exception will be thrown.
This exception can be suppressed by setting this property to true,
in which case the navigation targets with the missing attribute will be skipped.
Default value is false.
Declaration
public bool SkipInvalidNavigationTargets { get; set; }
Property type: bool
View SourceSkipNavigationPointsWithMissingIds
Gets or sets a value indicating whether the EPUB 2 NCX reader should skip navigation points that are missing the 'id' attribute.
If it's set to false and the 'id' attribute is not present,
then the "Incorrect EPUB navigation point: point ID is missing." exception will be thrown.
This exception can be suppressed by setting this property to true,
in which case the navigation points with the missing attribute will be skipped.
Default value is false.
Declaration
public bool SkipNavigationPointsWithMissingIds { get; set; }