Stuart Rackham <[email protected]> writes:
>> Basically, I think it would be much cleaner to have a single file (like
>> now), with "h1" and "h2" functions. Someone asked about the cascading
>> system that exists now, and how this would be replicated; you could now
>> achieve this with straight forward object inheritance. So, you would
>> have a class called "HTML4" and then another called "Wordpress" which
>> would just inherit from HTML4. 
>
> I think you are right about a single template file. The functions are not
> backend specific though, asciidoc generates parses the source to a set of
> predefined elements each of which has a (backend specific) .conf file template
> (or tag). So the set of functions would be identical for all backends, just as
> it is now e.g. instead of an 'h2' function there would be 'sect1' function
> corresponding to the [sect1] template in the backend .conf file. My previous
> post made the point that this scheme fits the existing model, requiring no
> change to the way asciidoc parses the source. The rendering of node XXX
> becomes: "if backend template function XXX exits then use it, else use the
> existing .conf file XXX template (or tag)" -- there are only a couple of
> functions in asciidoc.py that would need to be injected with this code.
>
> I don't think cascading template files would be to difficult, but it's
> probably not necessary.


All makes sense to me. 

It should be nice to support re-ordering of the asciidoc tree, at least
with the python templates. I'm guessing asciidoc has an "output as you
parse" model at the moment? With python, you could hold everything in
memory till "end document" was signalled, then output the sections in
any order you desired. 

It all sounds good to me. 

Phil

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to