Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 1596aa0c95b4ccf7adfa8febc56cc15c > files > 222

webmake-2.4-2mdk.noarch.rpm

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    <title>
      WebMake: Documentation: wwwtable_tag.wmk
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="generator" content="WebMake/2.3" />
    <style type="text/css">
      body {
       background-color: #ffffff; 
       color: #000000; 
       line-height: 110%;
       margin-left: 10px;
       margin-right: 10px;
      }
      p, table, td, th {
       font-family: verdana,lucida,helvetica,sans-serif;
       font-size: 11px;
       line-height: 110%;
      }
      pre {
       margin-left: 3%;
       white-space: pre;
      }
      code, samp, pre, p pre {
       font-family: "lucida console", "Courier New", courier, "fixed-width", monospace;
       font-weight: bold;
      }
      H1 {
       font-size: 150%; font-family: Garamond, "Book Antiqua",Times,serif;
       background: #FFCC66; text-align: center;
       padding: 0.5em 1em 0.5em 1em; border-width: 1px;
       border-color: black; border-style: solid; line-height: 120%;
      }
      H2 {
       font-size: 125%; font-family: Garamond, "Book Antiqua",Times,serif;
       background: #FFDD77; text-align: center;
       padding: 0.5em 1em 0.5em 1em; border-width: 1px;
       border-color: black; border-style: solid; line-height: 100%;
      }
      H3 {
       font-size: 100%; font-family: Garamond, "Book Antiqua",Times,serif;
       background: #FFEE88; text-align: center;
       padding: 0.5em 1em 0.5em 1em; border-width: 1px;
       border-color: black; border-style: solid;
      }
      H4 { font-size: 75%; font-family: Garamond, "Book Antiqua",Times,serif; }
      H5 { font-size: 50%; font-family: Garamond, "Book Antiqua",Times,serif; }
      H6 { font-size: 25%; font-family: Garamond, "Book Antiqua",Times,serif; }
      A:link {
       font-weight: bold;
       color: #004000;
       text-decoration: underline; 
      }
      A:visited {
       font-weight: bold;
       color: #008000;
       text-decoration: underline; 
      }
      A:active {
       font-weight: bold;
       color: #800000;
       text-decoration: underline; 
      }
      dt {
       font-size: medium;
       font-weight: bold;
       padding-top: 8px; padding-bottom: 8px;
      }
      dd {
       padding-top: 8px; padding-bottom: 8px;
      }
    </style>
  </head>
  <body bgcolor="#ffffff" text="#000000" link="#3300cc" vlink="#660066">
    <!-- font tag for compat with non-CSS browsers -->
    <font face="lucida,verdana,sans-serif">
      <div align="center">
         <img src="images/WebMakeTitle.png" alt="WebMake" width="500" height="122" />
      </div>
      <table width="100%">
        <tr>
          <td valign="top">
             <strong><a href="http://webmake.taint.org/">WebMake</a>
             Documentation</strong> (version 2.3)
             
          </td>
          <td valign="top">
            <div align="right">
              
               [ <a href="thumbnail_tag.wmk.html">Back</a> | <a href="xsl.wmk.html">Forward</a> | <a href="index.html">Index</a>
               | <a href="allinone.html">All&nbsp;In&nbsp;One</a> ]
               
            </div>
          </td>
        </tr>
      </table>
<!-- yes, it's that Mozilla black-border code again ;) -->
      <!-- stolen from www.mozilla.org via rc3.org -->
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td bgcolor="#aaaaaa">
            <table border="0" cellspacing="4" cellpadding="4" width="100%">
              <tr>
                <td bgcolor="#ffffff">
                  <table border="0" cellspacing="4" cellpadding="4" width="100%">
                    <tr>
                      <td>
                         <h1>wwwtable_tag.wmk</h1><a name="__index__"></a><!-- INDEX BEGIN -->
                        <ul>
                          <li>
                            <a href="#loading">LOADING</a>
                          </li>
                          <li>
                            <a href="#html tags">HTML TAGS</a>
                          </li>
                          <li>
                            <a href="#description">DESCRIPTION</a>
                          </li>
                          <li>
                            <a href="#freetable description">FREETABLE DESCRIPTION</a>
                          </li>
                          <li>
                            <a href="#table syntax">TABLE SYNTAX</a>
                          </li>
                          <li>
                            <a href="#alternative cell address syntax">ALTERNATIVE CELL ADDRESS SYNTAX</a>
                          </li>
                          <ul>
                            <li>
                              <a href="#explicit ranges">EXPLICIT RANGES</a>
                            </li>
                            <li>
                              <a href="#arbitrary perl code">ARBITRARY PERL CODE</a>
                            </li>
                          </ul>
                          <li>
                            <a href="#incompatibilities with wwwtable">INCOMPATIBILITIES WITH WWWTABLE</a>
                          </li>
                          <li>
                            <a href="#bugs">BUGS</a>
                          </li>
                          <li>
                            <a href="#see also">SEE ALSO</a>
                          </li>
                          <li>
                            <a href="#author">AUTHOR</a>
                          </li>
                        </ul>
<!-- INDEX END -->
                                                <hr />
                         <h1><a name="loading">LOADING</a></h1><pre>
  &lt; use plugin=&quot;wwwtable_tag&quot; /&gt;</pre><hr />
                         <h1><a name="html tags">HTML TAGS</a></h1><pre>
  &lt; wwwtable [...table options...] [freetableargs=&quot;string&quot;] &gt;
  ...randomly-addressed table...
  &lt; /wwwtable&gt;</pre><hr />
                         <h1><a name="description">DESCRIPTION</a></h1><p>
                          This WebMake Perl library provides the <code>wwwtable</code> tag. This is a useful way
                          to lay out HTML tables, using an more intuitive addressing system: instead of
                          listing all table entries, one by one, left to right and top to bottom, it
                          allows you to randomly, and flexibly, pick cells and define what goes into
                          them.
                        </p>
                        <p>
                          It's currently implemented using Tomasz Wegrzanowski's <strong>freetable</strong> package.
                          This package must be installed for this tag to be used; it can be downloaded
                          from
                        </p>
                        <pre>
        <a href="http://sourceforge.net/projects/freetable/">http://sourceforge.net/projects/freetable/</A></pre><p>
                          The remainder of this documentation is quoted (more or less verbatim)
                          from Tomasz' package.
                        </p>
                        <p>
                          Note that command-line options to <strong>freetable</strong> can be provided using the
                          attribute <code>freetableargs</code>.
                        </p>
                        <hr />
                         <h1><a name="freetable description">FREETABLE DESCRIPTION</a></h1><p>
                          This is free replacement of <strong>wwwtable</strong>.
                        </p>
                        <p>
                          HTML is great language, but have one horrible flaw :
                          tables. I spent many hours looking at HTML source I just written
                          and trying to guess which cell in source is which in browser.
                        </p>
                        <p>
                          If this also describes you, then read this manpage and your
                          pain will stop.
                        </p>
                        <p>
                          Program read HTML source from either <em>stdin</em> or file (WebMake note: the HTML
                          source is read from between the <em>&lt;wwwtable&gt;</em> tags in the WebMake
                          content). Then it searches for line starting table:
                        </p>
                        <pre>
    &lt;wwwtable [options]&gt;</pre><p>
                          Then it analyzes table, put correct HTML table in this place and
                          continue searching for the next table.
                        </p>
                        <hr />
                         <h1><a name="table syntax">TABLE SYNTAX</a></h1><p>
                          It is very easy:
                        </p>
                        <pre>
    wwwtable :
    &lt;wwwtable [wwwtable_options]&gt;
    [preamble]
    [cell]
    [cell]
    ...
    &lt;/wwwtable&gt;</pre><p>
                          wwwtable_options will be passed to <em>&lt;table&gt;</em> tags. There is
                          no magic inside preamble. It can be any HTML text. It will be simply
                          put in front of table.
                        </p>
                        <p>
                          cell is either normal_cell (<em>&lt;td&gt;</em> tag) or
                          header_cell (<em>&lt;th&gt;</em> tag).
                          At least it was this way in freetable 1.x.
                          See the next section for alternative cell address syntax.
                        </p>
                        <pre>
    normal_cell :
    (row,col) cell_options
    cell_content</pre><pre>
    header_cell :
    ((row,col)) cell_options  
    cell_content</pre><p>
                          cell_options will be passed to cell tag. There is magic inside
                          <em>colspan</em> and <em>rowspan</em> keys are parsed to make correct table.
                        </p>
                        <p>
                          cell_content can be anything. It may contain text, tags, and
                          even nested wwwtables.
                        </p>
                        <p>
                          row and col are either numbers locating cells, expressions relative to previous
                          cell or regular expresions to match few of them. Unlike <strong>wwwtable</strong>,
                          <strong>freetable</strong> can use regular expresions for header cells. Also <em>*</em> can be
                          used, and it mean <em>.*</em> really.
                        </p>
                        <p>
                          Relative expressions are :
                        </p>
                        <p>
                          <em>=</em> or empty means : the same as previous
                        </p>
                        <p>
                          <em>+</em> or <em>+X</em> means : one and X more than previous
                        </p>
                        <p>
                          <em>-</em> or <em>-X</em> means : one and X less than previous
                        </p>
                        <p>
                          If many definisions adress the same cell all options and contents are
                          concatenated in order of apperance.
                        </p>
                        <p>
                          If you want to use only regular expresions you must tell
                          program about the last cell :
                        </p>
                        <pre>
    &lt;wwwtable&gt;
    (*,1)
    these are colums 1
    (1,*)
    these are rows 1
    (4,4)
    &lt;/wwwtable&gt;</pre><hr />
                         <h1><a name="alternative cell address syntax">ALTERNATIVE CELL ADDRESS SYNTAX</a></h1><p>
                          It is inconvenient to specify cell address as regular expression.
                          So in <strong>freetable</strong> 2.0 two new methods were introduced.
                          Both can be used to either normal or header cells.
                        </p>
                        <p>
                          Full bakward compatibility is preserved.
                          To preserve it, new syntax had to be introduced.
                          Unfortunatelly, you can't specify row
                          address using one method, and column address using another.
                          To come around this, both new methods are very liberal
                          and allow you to use <em>=</em>, <em>+</em>, <em>-</em>, <em>+X</em> <em>-X</em> and null
                          string with the same meaning as they have in old addressing
                          method.
                        </p>
                        <p>
                          Unlike regular expression method,
                          new methods will find out the last cell automatically.
                        </p>
                        <p>
                           <h2><a name="explicit ranges">EXPLICIT RANGES</a></h2><pre>
    (rowrange;colrange) cell_options
    cell_content</pre><p>
                            Syntax for both rowrange and colrange is like: 1-2,4-7,9,12.
                            Duplicates will be eliminated. For purpose of relative addresses
                            last given number is used. So if you write
                          </p>
                          <pre>
    (1-100,32;1)
    foo
    (+,)
    bar</pre><p>
                            Cell (33,1) will contain `foobar' and all others only `foo'.
                          </p>
                          <p>
                             <h2><a name="arbitrary perl code">ARBITRARY PERL CODE</a></h2><pre>
    ({code for rows},{code for tables}) cell_options
    cell_content</pre><p>
                              You can use arbitrary Perl one-liner as long as it matches our
                              not very intelligent regular expressions and evaluates to list.
                              Unfortunatelly there isn't any regular expression for Perl code,
                              but as long as it doesn't contain <em>},{</em> and <em>})</em> it should work.
                              Example:
                            </p>
                            <pre>
    &lt;wwwtable&gt;
    ({grep {$_%3 == 1} 1..100},{1..2,4})
    foo
    &lt;/wwwtable&gt;</pre><p>
                              Will evaluate to 100 rows x 4 columns table with `foo' in
                              every 1st, 2nd and 4th column of every row with number equal 1 modulo 3.
                            </p>
                            <p>
                              If you want to use ``arbitrary code'' in one part of address and
                              explicit range in the other, change <em>-</em> into <em>..</em> in defenition of
                              range, and put in between <em>{</em> and <em>}</em>.
                            </p>
                            <p>
                              If you want to use ``arbitrary code'' in one part of address and
                              regular expression in the other, you have to write
                              <em>{grep {/expression/} from..to}</em>.
                              Unfortunatelly, in this case you have to specify size of the table explicitely.
                            </p>
                            <hr />
                             <h1><a name="incompatibilities with wwwtable">INCOMPATIBILITIES WITH WWWTABLE</a></h1><p>
                              If you was formerly user of <strong>wwwtable</strong> and want to change your tool, you
                              should read this. Most of this is about regexps handling.
                              Notice also that <strong>wwwtable</strong> couldnt do location tags substitution nor macroprocesing.
                            </p>
                            <p>
                              Option <em>-w</em> has completely oposite meaning. We dont print warnings by default,
                              and <em>-w</em> or <em>--warning</em> is used to force warnings.
                            </p>
                            <p>
                              Table header fields can be specified by regexps ex :
                            </p>
                            <pre>
    ((1,*))</pre><p>
                              It was impossible in <strong>wwwtable</strong>.
                            </p>
                            <p>
                              Axis counters are 100% orthogonal. This mean that code :
                            </p>
                            <pre>
    (*,1) width=30
    (*,2) width=35
    (*,3) width=40
    (=,=)
    Foo</pre><p>
                              Foo will appear in 3rd column. If you wanted it to be in 1st
                              you should write :
                            </p>
                            <pre>
    (*,1) width=30
    (*,2) width=35
    (*,3) width=40
    (=,1)
    Foo</pre><p>
                              or
                            </p>
                            <pre>
    (*,) width=30
    (*,+) width=35
    (*,+) width=40
    (=,1)
    Foo</pre><p>
                              In <strong>freetable</strong> 2.0 two new methods o specifying cell address
                              were introduced. They are completely incompatible with <strong>wwwtable</strong>.
                            </p>
                            <hr />
                             <h1><a name="bugs">BUGS</a></h1><p>
                              ``Arbitrary Perl Code'' cell address will fail on very complex Perl code.
                            </p>
                            <hr />
                             <h1><a name="see also">SEE ALSO</a></h1><p>
                              <strong>freetable(1)</strong>
                            </p>
                            <hr />
                             <h1><a name="author">AUTHOR</a></h1><p>
                              Tomasz Wegrzanowski &lt;<a href="mailto:taw@users.sourceforge.net">taw@users.sourceforge.net</a>&gt;
                            </p>
                            <p>
                              WebMake plugin interface by Justin Mason
                            </p>
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
          <table width="100%">
            <tr>
              <td valign="top">
                 <strong><a href="http://webmake.taint.org/">WebMake</a>
                 Documentation</strong> (version 2.3)
                 
              </td>
              <td valign="top">
                <div align="right">
                  
                   [ <a href="thumbnail_tag.wmk.html">Back</a> | <a href="xsl.wmk.html">Forward</a> | <a href="index.html">Index</a>
                   | <a href="allinone.html">All&nbsp;In&nbsp;One</a> ]
                   
                </div>
              </td>
            </tr>
          </table>
          <div align="right">
             <a href="http://webmake.taint.org/"> <img src="images/BuiltWithWebMake.png" alt="Built With WebMake" border="0" width="88" height="31" /></a>
          </div>
        </font>
      </body>
    </html>