Mercurial > hg > isophonics-drupal-site
annotate vendor/masterminds/html5/src/HTML5/Serializer/README.md @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 # The Serializer (Writer) Model |
Chris@0 | 2 |
Chris@0 | 3 The serializer roughly follows sections _8.1 Writing HTML documents_ and section |
Chris@0 | 4 _8.3 Serializing HTML fragments_ by converting DOMDocument, DOMDocumentFragment, |
Chris@0 | 5 and DOMNodeList into HTML5. |
Chris@0 | 6 |
Chris@0 | 7 [ HTML5 ] // Interface for saving. |
Chris@0 | 8 || |
Chris@0 | 9 [ Traverser ] // Walk the DOM |
Chris@0 | 10 || |
Chris@0 | 11 [ Rules ] // Convert DOM elements into strings. |
Chris@0 | 12 || |
Chris@0 | 13 [ HTML5 ] // HTML5 document or fragment in text. |
Chris@0 | 14 |
Chris@0 | 15 |
Chris@0 | 16 ## HTML5 Class |
Chris@0 | 17 |
Chris@0 | 18 Provides the top level interface for saving. |
Chris@0 | 19 |
Chris@0 | 20 ## The Traverser |
Chris@0 | 21 |
Chris@0 | 22 Walks the DOM finding each element and passing it off to the output rules to |
Chris@0 | 23 convert to HTML5. |
Chris@0 | 24 |
Chris@0 | 25 ## Output Rules |
Chris@0 | 26 |
Chris@0 | 27 The output rules are defined in the RulesInterface which can have multiple |
Chris@0 | 28 implementations. Currently, the OutputRules is the default implementation that |
Chris@0 | 29 converts a DOM as is into HTML5. |
Chris@0 | 30 |
Chris@0 | 31 ## HTML5 String |
Chris@0 | 32 |
Chris@0 | 33 The output of the process it HTML5 as a string or saved to a file. |