The cmacc data model has some strong similarities with CSS.  They both have a (i) recursive @import notion, (ii) overriding based on the last statement and (iii) use of abbreviated URLs.  CSS is considerably more complicated (allocation of importance, weights, and the like).  But the inheritance mechanism is similar, the software has lots of miles on it, and the power of a declarative approach is proven.

One could express cmacc in CSS notation:
p
{
font-family:”Times New Roman”;
font-size:20px;
}
fields
{
Agt.Body:”{Agt.Prologue}<ol><li>{Agt.Sections}</li><ol>{Agt.Signature}<br/>{Agt.Attachment}”;
Agt.Sections=”<ol><li>{Def._Sec}</li><li>{Deal._Sec}</li><li>{BackEnd._Sec}</li></ol>”;
}

One could use the @import function to create inheritance, and my understanding is that it has recursion.  A major disadvantage is that the @import (as I understand it) boils the ocean — e.g., finds every @import recursively.  A very minor disadvantage is that all @import statements must come before the list in the current page.  This seems an unnecessary rigidity, but does not impede any important use.

There is no prefixing, to my knowledge.

Since CSS is very successful and deeply integrated, certainly there is much to learn from it and perhaps code to leverage.  Some references are Simon St. Laurent, and flattening.

Advertisements