Printing recipes
In an earlier paper [Flynn 2020] I described the implementation of an XML/XSLT system (now named ℞, pronounced ‘recipe’: see http://xml.silmaril.ie/recipes/recipe/) for checking and reproducing cookery recipes where the ingredients were stored as disaggregated data in attributes rather than as plain-text phrases in unmarked element CDATA content. Since then, work has proceeded on three key aspects: a) the refinement of the categories for recipe ingredients; b) the implementation of the formatting algorithm in XSLT; and c) the implementation in CSS. This paper describes the third of these, recreating in CSS (for XML) the grammar of expressing the disaggregated data which the XSLT (for HTML) algorithms use to create the lists of ingredients and references to them. The categorization task is out of scope for markup conferences, and is best discussed over a good dinner. In recipes written in English, the syntax of the List of Ingredients is a commonly-accepted format expressing quantity, units, item, and various modifiers. In the earlier paper I showed how XSLT can be used to manipulate the ingredient data to achieve the required format. I indicated that the original (pre-℞) site used XML as the print format with CSS, and that this raised challenges when the disaggregated data was in attributes. This problem has now largely been overcome, and I also give details of how to XSLT has been used to overcome some of the things CSS cannot do for the same tasks. Note: The names used for the attributes discussed here are still experimental and subject to change. In particular the item categorization is a work-in-progress, and should not be taken as a statement of intent.