Re: Quickbook block element

Joel de Guzman <[email protected]>
Newsgroups gmane.comp.lib.boost.documentation
Message-ID <[email protected]>
On 10/22/2011 2:56 AM, Daniel James wrote:
> On 21 October 2011 16:52, Steven Watanabe <[email protected]> wrote:
>> AMDG
>>
>> On 10/21/2011 08:40 AM, John Maddock wrote:
>>>
>>> How about a "block-template" as well as a "template" ?
>>>
>>> I.e. templates are always expanded as phrases, and block-templates as
>>> blocks?
>>>
>>
>> The current rule is that a block template
>> has a new line after the argument list.
> 
> Confusingly, the 'block' element is different from a block template, a
> block template contains blocks and used to be treated as a phrase
> element while a 'block' element is contains a phrase but is treated as
> a block element. So they're sort of the opposite.
> 
> In quickbook, there are blocks containing blocks (eg. note), blocks
> containing a phrase (eg. headers), a phrase element containing blocks
> (footnote) and the normal phrase elements (such as bold). There's also
> the more complicated elements such as table, sect etc. So when
> implementing elements as templates, something a bit more sophisticated
> is needed.
> 
> I also don't want to have named 'block templates' for a few reasons.
> As I mentioned above, they're not what you expect block templates to
> be. I also want this to be usable outside of templates and I think
> it's a good idea to strongly associate it with its content. Also, I
> think that if we have alternative targets for quickbook, that'll
> probably require having different types of templates, so I don't want
> to get into that area just yet.
> 
> I thought of calling the element something like 'escapedblock' but
> that isn't strictly speaking correct, although I'm pretty sure escaped
> markup is its only use. Maybe it should be an error to use it without
> escaped markup?

Nod. This concept of blocks and phrases is all historical. The
need arose (IIRC) from constraining the grammar to not allow
HTML 'phrase' markups (Qbk started as a tool that generated html)
such as <EM> contain 'block' markups such as <P>. I somehow agree
with Steven that the distinction is quite fragile and should be
reviewed.

Regards,
-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.