full-text-rss/libraries/html5php/HTML5/Serializer
2019-04-04 23:15:15 +02:00
..
HTML5Entities.php Full-Text RSS 3.4 2015-06-14 02:03:20 +02:00
OutputRules.php Full-Text RSS 3.6 2019-04-04 23:15:15 +02:00
README.md Full-Text RSS 3.3 2014-09-15 22:24:06 +02:00
RulesInterface.php Full-Text RSS 3.4 2015-06-14 02:03:20 +02:00
Traverser.php Full-Text RSS 3.5 2017-02-18 16:06:19 +01:00

The Serializer (Writer) Model

The serializer roughly follows sections 8.1 Writing HTML documents and section 8.3 Serializing HTML fragments by converting DOMDocument, DOMDocumentFragment, and DOMNodeList into HTML5.

   [ HTML5 ]   // Interface for saving.
      ||
 [ Traverser ]   // Walk the DOM
      ||
   [ Rules ]     // Convert DOM elements into strings.
      ||
   [ HTML5 ]     // HTML5 document or fragment in text.

HTML5 Class

Provides the top level interface for saving.

The Traverser

Walks the DOM finding each element and passing it off to the output rules to convert to HTML5.

Output Rules

The output rules are defined in the RulesInterface which can have multiple implementations. Currently, the OutputRules is the default implementation that converts a DOM as is into HTML5.

HTML5 String

The output of the process it HTML5 as a string or saved to a file.