Login  Register

Re: [dev] Reorganization of the AsciidoctorJ AST data structures

Posted by mojavelinux on Aug 02, 2015; 6:14am
URL: https://discuss.asciidoctor.org/dev-Reorganization-of-the-AsciidoctorJ-AST-data-structures-tp2991p3601.html


On Sat, Aug 1, 2015 at 8:00 AM, Robert.Panzer [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am a bit unsure about FlowContent though, because in the HTML5 spec it is a superset of PhrasingContent.

Good point. I was stuck on that a bit as well.
 
Maybe FlowContent would be a good name for the root node.

Very reasonable. I think we should consider both FlowContent and FlowNode and see which one feels better "in the hand".
 
 HTML5 does not have this term, but what do you think about sth like StructuringContent for what today is the AbstractBlock?

I like where you are going with this! Perhaps the term you are looking for is "structural", which really feels right here. So how about StructureNode?

Those suggestions would leave us with:

FlowNode
 +- StructuralNode
 | +- Block
 | +- Section
 | +- Document
 | +- List
 | +- ListItem
 | +- Table
 +- PhrasingNode

I'd be happy with either "Node" or "Content" as the suffix, but I think that "Node" may be more familiar to newcomers. But then again, I'm not a newcomer, so I can only guess.

I do have a few alternatives to StructuralNode:

* CompositionNode
* CompositionalNode (seems too long)
* OutlineNode
* TreeNode
* TieredNode
* BlockNode (yes, a bit redundant to have BlockNode and Block, but hey, maybe)

...though I think I still like StructuralNode best.

Cheers,