I am trying to build an extension that will scan the source on change (or maybe
just save) and generate some source based on what it finds. It won't
necessarily be represented by a tag in the code, and it won't use any
server-side stuff to render in a browser. I want it to be able to render in
Design view (but not editable by the user). I am fine with it being editable in
code view. The built-in Date Object (<!-- #BeginDate ...) appears to do exactly
what I need, but after looking through lots of documentation, I can't figure
out how to replicate its functionality. Can anyone tell me how to make
something that behaves like the Date Object? Thanks a bunch.

What I am trying to make is something that will automatically generate a table
of contents. My restriction is it has to be completely static. It cannot rely
on client-side script in the browser or any server-side processing.