I had the pleasure a few weeks ago to encounter an extraordinarily large web application, hosted on Lotus Domino. Without divulging company confidential information (and getting my sorry ass sued off), this application is huge and these techniques are used to solve a number of different development issues. (So full credit to the chaps at this unnamed company - you know who you are. Beers are on me. And any mistakes in this text are obviously my own..). In my many years of code auditing, its now very infrequently that I go "ooooh!" at some technique. This is one of those techniques.
Assuming our repository was called "repository.nsf", our look-up view was called "lookup" and each document in that (sorted) view was referenced by type, Form and workflow status (separated with exclamation marks). Our "html" text field is exposed in the second column. Your HTML Head form directive might look like:
html := @DbLookup("":""; "":"repository.nsf"; "lookup"; "html"&"!"&form&"!"&status; 2);
CSS := @DbLookup("":""; "":"repository.nsf"; "lookup"; "css"&"!"&form&"!"&status; 2);
html & @newline &
"<Style>" & @newline &
CSS & @newline &
"</style>" & @newline &
So far, so good.
(Bear in mind that we can use normal Domino trickery to make this repository view work for us in terms of information sharing. So a common html meta tag might be exposed to ALL forms, etc, etc)