On Fri, May 16, 2003 at 03:04:45AM -0500, Lee Daniel Crocker wrote:
(Jens Frank JeLuF@gmx.de):
<div style="float: right"> [[Image:%%Image%%]]<BR> <center> ''%%Label%%'' </center> </div>
In an article, it can be used by its name:
{{ImageFloatingRight Image=Eiffel tower.jpg Label=The Eiffel Tower in Paris }}
That's about 10 times more complex than
{{floatright}}[[image:usa.png]]
Where is the label below the image? Sure it's easier to generate just an image to the left than also adding a label beneath it.
but I am intrigued by the idea of parameterized transclusions. Another, perhaps simpler, way to do it is to use existing link syntax with an "include" namespace:
[[include:snippet1 | val1 | val2 | namedvar1=val | namedvar2=val]]
Not sure about syntax yet. Just developing the idea of parameterization. I would prefer something spanning multiple lines. Some tables for example are rather long, having all fields in a single row would look
This is more flexible than just stylesheets:
Then you obviously don't know stylesheets well. Besides, they give a much better separation of content and style, and are a performance boost because the style code doesn't change among pages often, and so doesn't have to be reloaded by the client.
You've cut the reasons I provided. I know a little about stylesheets I think. You are right: Includes will cost CPU power. This probably is the biggest open issue. The flexibility we get by "parameterized transclusions" are more than we can reach by stylesheets alone.
- We are not limited to the options provided by the developers I do not believe it might be useful to have the style sheet editable. Looking at all the different colours used by the element table or the taxoboxes, I assume we would have a bottleneck: Developers adding colour by colour to the stylesheet. - Some time ago Karl proposed to use definition lists instead of tables. This for example would be rather hard to realize using stylesheets. Changing a few snippets is a little work, but manageable. - Some report generator languages have means to indicate that a block has to be repeated for every dataset:
Snippet:
<table> ... <TR><TH>Isotope</TH><TH>Decay Product</TH></TR> %#REPEAT#% <TR><TD>%%Isotope%%</TD><TD>%%Decay Product</TD></TR> %#END REPEAT#% </table>
The code inside of the %#REPEAT#% - %#END REPEAT#% block is repeated, e.g. by numbering the variables:
[[include:ElementBox ... Isotope1=Be^9 Decay1=C^7 Isotope2=Be^10 Decay2=Cl^6 ]]
This would solve the nested-tables-issue. The tables can be nested using all the power HTML provides. The details are hidden from the user of the table.
Those snippets should be supported by the stylesheet, e.g. to define table backgrounds depending on the skin used.
Possible later additions:
- Factsheet wizard that users without HTML-Skills can use to generate the normal factsheet tables used in so many variants
- Fill-in wizard that shows the rendered snippet and has input fields where the variables are.
I'm not opposed to the ideas of GUIs in general either; but there's a lot to be said for a content model and text-based interface simple and universal enough to not require one.
OK, the later should not be necessary when the syntax is done "right". The former might perhaps be interesting. On the other hand, the most needed tables would be created very fast. The REPEAT-Syntax would allow the creation of some simple tables covering a wide range of applications.
Regards,
JeLuF