Well, I'm not sure exactly what you are trying to do, but the first thing that should be made clear is that the sample tbx file I created was meant to be a proof of concept, or at the most a starting point for someone to work from. I never meant it to be a complete book authoring package; it merely demonstrates a single prototype with a couple of templates. The sparsity of the design should mean you can fit it into a more complete tbx system.
These principles might help you out: remember that prototypes can have prototypes. The generic book component prototype that builds out MMD syntax can become the prototype parent of a dozen more practical prototypes, like "POV: Sarah", or whatever you are using them for. So dozens of prototypes can be chained together into a hierarchy where the bottom level only changes attribute defaults to differentiate themselves from the others. As long as you don't trample the stuff that lets the original, top level prototype generate MMD syntax, you're okay.
That said, I put the header definition stuff into the Rule. That is just for simplicity. That's probably not a good place to put it. For one it's a bunch of code execution going on all of the time for something that is essentially static (unless you turn scenes into chapters a lot or something). This would probably better be accomplished as a Macro which is called from the template upon export or right in the template code itself.
Here is an example file using the macro method. I just moved the code from the Rule to a Macro and changed the template to call the Macro instead of using the user attribute. Easy as pie, and should make the top-level component even better for top-level prototype use.
.:. Ioa Petra'ka “Whole sight, or all the rest is desolation.” —John Fowles
AmberV, I'm late to the party on this one, I know, but I just wanted to say Thank You for all your work on this.
Your HTML 'proof of concept' seems to do exactly what I want.
I'm still noobing it up as far as Tinderbox is concerned, but the knowledge that I'm going to be able to get my musings out of TB into Scrivener quickly, easily, and in a very convenient structure, is helping me a lot right now.