Elsewhere I have suggested that Kari Kraus's musings on accidentals and substantives led me to contemplate using an ID/IDREF mechanism to assist an XSLT transformtion in selecting which of two different characters would appear at a specific spot. The Text Encoding Initiative Guidelines provide the author with the possibility of using the value of the "exclude" attribute on the <c> element (the attribute is also available for other elements). A fine mechanism for exclusive alteration. Great for providing a use case for the teaching a module of XSLT relating to the application of the xsl:if element using a test on an attribute value.
When I encountered another use case, it became interesting to consider inclusive alternation as again, the appearance (or not) of the content of an element in a specific spot. I was rather pleased to be able to consider inclusive alternation in relation to position. Again the ID/IDREF mechanism assists in expressing a relation in XML markup that can then be transformed in XSLT.
<title> <w next="MetaM" id="HyperM">HyperMnemonics</w> ... <w prev="HyperM" id="MetaM">MetaMimetics</w> </title>
The Text Encoding Initiative Guidelines also provide for the markup of morphemes for the hypermimetic. And for the metamnemonic there is some XSLT that concatenates the content of a <num> element of type "accession" with the content of a <label> element of type "category" to create an HTML anchor element in the output (i.e. <a name="#label_num"></a>).
The memory part is about getting the correct label attached to the correct spot. Imitation, like acting, is about threading labels and spots into dismantle-able chains.