[Boost-docs] [Gaea] Named optional attributes

Subject: [Boost-docs] [Gaea] Named optional attributes
From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2011-10-30 13:39:33


I was trying to see how some of the current Quickbook constructs will
look in the IR Joel is proposing based on Gaea (
http://pastebin.com/FBdpSsS8 ).
There are some things that are not possible with that definition and
seems to be necessary to represent complete documents.
>From Quickbook docs: "From version 1.5, you can also use DocBook
imagedata attributes"

  [$image.jpg [width 200in] [height 200in]]

I think it will be a good idea to support this kind of named optional
attributes directly in Gaea. If we augment the definition of templates

  [def [$ path [.width] [.height]]
  ... [path]
  ... [if [defined [width]] [ ...[width]... ] [ ... ]] // Or something
like this...

We can then use them like:

  [$image.jpg [.width 200in][.height 200in]]

This is very close to the current [$ ...] and even the main argument
can remain unwrapped in []s, following current practice.

Examples in other constructs:

  [document The Document Title
    [.quickbook 1.5]
    [.version 1.0]
    [.id the_document_name]
    [.dirname the_document_dir]
    [.copyright 2000 2002 2003 Joe Blow, Jane Doe]
    [.purpose The document's reason for being]
    [.category The document's category]
    [.authors [Blow, Joe] [Doe, Jane]]
    [.license The document's license]
    [.source_mode source-type]

  [section Title [.id section_id]



Best regards

This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC