C# Class CalDavSynchronizer.Conversions.Msft.HtmlSchema

HtmlSchema class maintains static information about HTML structure can be used by HtmlParser to check conditions under which an element starts or ends, etc.
Datei anzeigen Open project: aluxnimm/outlookcaldavsynchronizer

Private Methods

Method Description
ClosesOnNextElementStart ( string currentElementName, string nextElementName ) : bool

returns true if the current element closes when the new element, whose name has just been read, starts

ClosesOnParentElementEnd ( string xmlElementName ) : bool

returns true when xmlElementName closes when the outer element closes this is true of elements with optional start tags

EntityCharacterValue ( string entityName ) : char

returns the character represented by the entity name string which is passed as an argument, if the string is an entity name as specified in _htmlCharacterEntities, returns the character value of 0 otherwise

HtmlSchema ( ) : System.Collections

static constructor, initializes the ArrayLists that hold the elements in various sub-components of the schema e.g _htmlEmptyElements, etc.

InitializeBlockElements ( ) : void
InitializeElementsClosingOnNewElementStart ( ) : void
InitializeElementsClosingOnParentElementEnd ( ) : void

initializes _htmlElementsClosingOnParentElementEnd with the list of HTML 4 elements for which closing tags are optional we assume that for any element for which closing tags are optional, the element closes when it's outer element (in which it is nested) does

InitializeEmptyElements ( ) : void

initializes _htmlEmptyElements with empty elements in HTML 4 spec at http://www.w3.org/TR/REC-html40/index/elements.html

InitializeHtmlCharacterEntities ( ) : void

initializes _htmlCharacterEntities hashtable with the character corresponding to entity names

InitializeInlineElements ( ) : void
InitializeOtherOpenableElements ( ) : void
IsBlockElement ( string xmlElementName ) : bool

returns true if xmlElementName represents a block formattinng element. It used in an algorithm of transferring inline elements over block elements in HtmlParser

IsEmptyElement ( string xmlElementName ) : bool

returns true when xmlElementName corresponds to empty element

IsEntity ( string entityName ) : bool

returns true if the string passed as argument is an Html entity name

IsInlineElement ( string xmlElementName ) : bool

returns true if the xmlElementName represents an inline formatting element

IsKnownOpenableElement ( string xmlElementName ) : bool

It is a list of known html elements which we want to allow to produce bt HTML parser, but don'tt want to act as inline, block or no-scope. Presence in this list will allow to open elements during html parsing, and adding the to a tree produced by html parser.