Show / Hide Table of Contents

Class SmilReaderOptions

Various options to configure the behavior of the SMIL (EPUB media overlay) document reader.

Inheritance
object
SmilReaderOptions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class SmilReaderOptions

Constructors

View Source

SmilReaderOptions(EpubReaderOptionsPreset?)

Initializes a new instance of the SmilReaderOptions class.

Declaration
public SmilReaderOptions(EpubReaderOptionsPreset? preset = null)
Parameters
Type Name Description
EpubReaderOptionsPreset? preset

An optional preset to initialize the SmilReaderOptions class with a predefined set of options.

Properties

View Source

IgnoreBodyMissingSeqOrParElementsError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when the 'body' XML element is missing a child 'seq' / 'par' XML element.

If it's set to false and the 'body' XML element has neither a 'seq' XML element nor a 'par' XML element, then the "SMIL parsing error: body XML element must contain at least one seq or par XML element." exception will be thrown. This exception can be suppressed by setting this property to true. However, since 'seq' and 'par' are the only container elements for the text and audio data in the SMIL file, the resulting parsed document will have no usable content.

Default value is false.

Declaration
public bool IgnoreBodyMissingSeqOrParElementsError { get; set; }
Property type: bool
View Source

IgnoreMissingBodyElementError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when a SMIL file is missing the 'body' XML element.

If it's set to false and the 'body' XML element is not present, then the "SMIL parsing error: body XML element is missing in the file." exception will be thrown. This exception can be suppressed by setting this property to true. However, since 'body' is an essential XML element in the SMIL document, the reader will will skip this SMIL file in this case.

Default value is false.

Declaration
public bool IgnoreMissingBodyElementError { get; set; }
Property type: bool
View Source

IgnoreMissingSmilElementError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when a SMIL file is missing the 'smil' XML element.

If it's set to false and the 'smil' XML element is not present, then the "SMIL parsing error: smil XML element is missing in the file." exception will be thrown. This exception can be suppressed by setting this property to true. However, since 'smil' is the top-level XML element in the SMIL document, the reader will will skip this SMIL file in this case.

Default value is false.

Declaration
public bool IgnoreMissingSmilElementError { get; set; }
Property type: bool
View Source

IgnoreMissingSmilFileError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when the SMIL file referenced by a SMIL manifest item is missing in the EPUB file.

If it's set to false and the content file referenced by a SMIL manifest item is not present, then the "EPUB parsing error: SMIL 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 skip this SMIL file.

Default value is false.

Declaration
public bool IgnoreMissingSmilFileError { get; set; }
Property type: bool
View Source

IgnoreMissingSmilVersionError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when the SMIL version is missing in the SMIL file.

If it's set to false and the 'smil' XML element is missing the 'version' attribute, then the "SMIL parsing error: SMIL version is missing." exception will be thrown. This exception can be suppressed by setting this property to true, in which case the reader will ignore this error and use SMIL 3.0 specification to parse the rest of the SMIL document.

Default value is false.

Declaration
public bool IgnoreMissingSmilVersionError { get; set; }
Property type: bool
View Source

IgnoreSeqMissingSeqOrParElementsError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when a 'seq' XML element is missing a child 'seq' / 'par' XML element.

If it's set to false and a 'seq' XML element has neither a nested 'seq' XML element nor a 'par' XML element, then the "SMIL parsing error: seq XML element must contain at least one nested seq or par XML element." exception will be thrown. This exception can be suppressed by setting this property to true. However, since 'seq' and 'par' are the only container elements for the text and audio data in the SMIL file, the resulting parsed SMIL sequence object will have no usable content.

Default value is false.

Declaration
public bool IgnoreSeqMissingSeqOrParElementsError { get; set; }
Property type: bool
View Source

IgnoreSmilFileIsNotValidXmlError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when a SMIL file is not a valid XML file.

If it's set to false and an XML parsing error has occurred while trying to open a SMIL file, then the "EPUB parsing error: SMIL 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 skip this SMIL file.

Default value is false.

Declaration
public bool IgnoreSmilFileIsNotValidXmlError { get; set; }
Property type: bool
View Source

IgnoreSmilFileIsTooLargeError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when a SMIL file is larger than 2 GB.

If it's set to false and the content file referenced by a SMIL manifest item is larger than 2 GB, then the "EPUB parsing error: SMIL 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 skip this SMIL file.

Default value is false.

Declaration
public bool IgnoreSmilFileIsTooLargeError { get; set; }
Property type: bool
View Source

IgnoreUnsupportedSmilVersionError

Gets or sets a value indicating whether the SMIL document reader should ignore the error when SMIL version declared in the SMIL file is not supported by the reader.

If it's set to false and the 'smil' XML element's 'version' attribute contains a version other than supported by the reader (currently, only '3.0'), then the "SMIL parsing error: unsupported SMIL version: ... ." exception will be thrown. This exception can be suppressed by setting this property to true, in which case the reader will ignore this error and use SMIL 3.0 specification to parse the rest of the SMIL document.

Default value is false.

Declaration
public bool IgnoreUnsupportedSmilVersionError { get; set; }
Property type: bool
View Source

SkipAudiosWithoutSrcAttributes

Gets or sets a value indicating whether the SMIL document reader should skip 'audio' XML elements that are missing the 'src' attribute.

If it's set to false and an 'audio' XML element is missing the 'src' attribute, then the "SMIL parsing error: audio XML element must have an src attribute." exception will be thrown. This exception can be suppressed by setting this property to true, in which case those 'audio' XML elements will be skipped.

Default value is false.

Declaration
public bool SkipAudiosWithoutSrcAttributes { get; set; }
Property type: bool
View Source

SkipParsWithoutTextElements

Gets or sets a value indicating whether the SMIL document reader should skip 'par' XML elements that are missing a child 'text' XML element.

If it's set to false and the 'text' XML element is not present inside a 'par' XML element, then the "SMIL parsing error: par XML element must contain one text XML element." exception will be thrown. This exception can be suppressed by setting this property to true, in which case those 'par' XML elements will be skipped.

Default value is false.

Declaration
public bool SkipParsWithoutTextElements { get; set; }
Property type: bool
View Source

SkipTextsWithoutSrcAttributes

Gets or sets a value indicating whether the SMIL document reader should skip 'text' XML elements that are missing the 'src' attribute.

If it's set to false and a 'text' XML element is missing the 'src' attribute, then the "SMIL parsing error: text XML element must have an src attribute." exception will be thrown. This exception can be suppressed by setting this property to true, in which case those 'text' XML elements will be skipped.

Default value is false.

Declaration
public bool SkipTextsWithoutSrcAttributes { get; set; }
Property type: bool
  • View Source
In this article
Back to top Generated by DocFX