mbakeranalecta / sam

Semantic Authoring Markdown
Other
79 stars 8 forks source link

Shortcut semantic list entries #58

Closed mbakeranalecta closed 8 years ago

mbakeranalecta commented 8 years ago

Suppose you have a semantically labeled list:

 filmography:
     film: Rio Bravo
     film: The Shootist

It would be a handy shortcut if the author could use regular list markup instead of repeating "film:":

 filmography:
     * Rio Bravo
     * The Shootist

If the schema knows that only film elements are allowed under filmography, there should be no ambiguity here. Alternatives would be to allow it generally for any list-like structure (any parent with only one child type, and one that is allowed to repeat), or to specify it specifically in the schema. The former seems at first blush to be the more attractive option.

Doing something to support this without a schema does not seem worth while. It would introduce non-intuitive syntax.

mbakeranalecta commented 8 years ago

We should note the similarity of this to the record structure

filmography:: film
    Rio Bravo
    The Shootish

Do we really need to support the first form as well?

mbakeranalecta commented 8 years ago

We should note that the form in the previous comment does not have an equivalent output:

 <filmography>
 <film>Rio Bravo</film>
 <film>The Shootist</film>
 </filmography>

vs.

 <filmography>
 <row>
 <film>Rio Bravo</film>
 </row>
 <row>
 <film>The Shootist</film>
 </row>
 </filmography>
mbakeranalecta commented 8 years ago

On reflection, I don't like this enhancement, since it hides structure from the reader. The recordset shortcut is equally brief while not hiding structure and can be rectified in post processing if desired. Doc this an an alternative.

mbakeranalecta commented 8 years ago

Documented.