Re: [dev] Reorganization of the AsciidoctorJ AST data structures
Posted by
Robert.Panzer on
Aug 01, 2015; 2:00pm
URL: https://discuss.asciidoctor.org/dev-Reorganization-of-the-AsciidoctorJ-AST-data-structures-tp2991p3598.html
I like the relation to the HTML5 specification! I didn't make that link yet but I think it's a great idea.
The W3C really puts some energy into content structure etc and it shows that our class names are not born of necessity (as today with ListNode but Table;-) ) and plays nicely with adjacent specs.
I am a bit unsure about FlowContent though, because in the HTML5 spec it is a superset of PhrasingContent.
Maybe FlowContent would be a good name for the root node.
(There are only some MetadataContent elements that are not part of FlowContent. Apart from that FlowContent comprises everything.)
HTML5 does not have this term, but what do you think about sth like StructuringContent for what today is the AbstractBlock?
All subclassed like Block, Section, List, Table etc. give the document a structure, whereas PhrasingContent does not.
FlowContent
+- StructuringContent
| +- Block
| +- Section
| +- Document
| +- List
| +- ListItem
| +- Table
+- PhrasingNode (or PhrasingContent)
Looking at the HTML5 spec the elements td, th and tr are not mentioned with respect to any of these categories, so naming it FlowContent should be also ok:)
What do you think?
But I also like your idea and could provide a PR for that in the next days.
Best regards
Robert