The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>
      WebMake: Documentation: csvtable_tag.wmk
    </title>
    <meta name="generator" content="WebMake/2.2" />
    <style>
      body {
       background-color: #ffffff; 
       color: #000000; 
       font-size: medium;
       font-family: verdana,lucida,helvetica,sans-serif;
      }
      code, samp, pre {
       font-family: Courier New,courier,fixed-width,monospace;
      }
      H1 { font-size: x-large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFCC66; }
      H2 { font-size: large; font-family: Garamond,Book Antiqua,Times,serif; background: #FFDD77; }
      H3 { font-size: medium; font-family: Garamond,Book Antiqua,Times,serif; background: #FFEE88; }
      H4 { font-size: small; font-family: Garamond,Book Antiqua,Times,serif; }
      H5 { font-size: x-small; font-family: Garamond,Book Antiqua,Times,serif; }
      H6 { font-size: xx-small; font-family: Garamond,Book Antiqua,Times,serif; }
      A:link {
       font-weight: bold;
       color: #004000;
       text-decoration: underline; 
      }
      A:visited {
       font-weight: normal;
       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 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.2)
             
          </td>
          <td valign="top">
            <div align="right">
              
               [ <a href="index_10-perllib.html">Back</a> | <a href="download_tag.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>csvtable_tag.wmk</h1><!-- INDEX BEGIN -->
                        <ul>
                          <li>
                            <a href="#LOADING">LOADING</a><li>
                              <a href="#HTML_TAGS">HTML TAGS</a><li>
                                <a href="#DESCRIPTION">DESCRIPTION</a><li>
                                  <a href="#EXAMPLE">EXAMPLE</a><li>
                                    <a href="#THANKS">THANKS</a>
                                  </ul>
<!-- INDEX END -->
                                                                    <hr />
                                  <h1><a name="LOADING">LOADING</a></h1><p>
                                    <pre>
  &lt; use plugin=&quot;csvtable_tag&quot; /&gt;
                                  </pre>
                                  <hr />
                                  <h1><a name="HTML_TAGS">HTML TAGS</a></h1><p>
                                    <pre>
  &lt; csvtable [delimiter=&quot;char&quot;] [HTML table attributes] &gt;
  [...cells...]
  &lt; /csvtable &gt;
                                  </pre>
                                  <hr />
                                  <h1><a name="DESCRIPTION">DESCRIPTION</a></h1><p>
                                    
                                    This WebMake Perl library provides a tag to allow HTML tables to be
                                    constructed, quickly, using a tab-, comma-, or pipe-separated value table.
                                    <p>
                                      
                                      Firstly, pick a delimiter character, such as <code>|</code>. Set the <code>delimiter</code>
                                      attribute to this character.
                                      <p>
                                        
                                        Each line of the CSV table will become a &lt; TR &gt;; each
                                        delimiter-separated cell will be enclosed in a &lt; TD &gt; tag pair.
                                        <p>
                                          
                                          Attributes for the HTML table tag itself, can be provided as attributes to
                                          this tag; they will be passed through into the resulting &lt; TABLE &gt;
                                          tag.
                                          <p>
                                            
                                            By default, items inside the tables are represented as &lt; TD &gt; cells,
                                            with no attributes. Certain special line prefixes allow control over
                                            formatting of table items, as follows. These are all case-insensitive, and
                                            whitespace after them will be stripped; but they must start on the first
                                            character of the line (no leading spaces), and, despite how they're
                                            rendered here, should not contain any spaces between the angle brackets.
                                            <p>
                                              
                                              Blank lines are skipped.
                                              <dl>
                                                <dt>
                                                  <strong><a name="item__">&lt; !-- .... -- &gt;</a></strong>
                                                </dt>
                                                <dd>
                                                  <p>
                                                    
                                                    Comments, a la HTML.
                                                    
                                                  </dd>
                                                  <dt>
                                                    <strong>&lt; csvfmt &gt;</strong>
                                                  </dt>
                                                  <dd>
                                                    <p>
                                                      
                                                      The rest of the line is used to specify the format to be used for each line
                                                      afterwards, until the end of the &lt; csvtable &gt;, or until the next &lt;
                                                      csvfmt &gt; line.
                                                      <p>
                                                        
                                                        The line should end in a &lt; /csvfmt &gt; closing tag.
                                                        <p>
                                                          
                                                          Specify a &lt; tr &gt;...&lt; /tr &gt; block, with $1, $2, $3, etc. for the
                                                          numbered cells (counting from 1). For example:
                                                          <p>
                                                            <pre>
  &lt; csvfmt &gt;&lt; tr &gt;&lt; td &gt;$1&lt; /td &gt;&lt; td &gt;$2&lt; /td &gt;&lt; td &gt;$3&lt; /td &gt;&lt; /tr &gt;&lt; /csvfmt &gt;
                                                          </pre>
                                                        </dd>
                                                      </dl>
                                                      <hr />
                                                      <h1><a name="EXAMPLE">EXAMPLE</a></h1><p>
                                                        <pre>
  &lt; csvtable delimiter=&quot;|&quot; &gt;
  &lt; !-- heading -- &gt;
  &lt; csvfmt &gt;&lt; tr &gt;&lt; th &gt;$1&lt; /th &gt;&lt; th &gt;$2&lt; /th &gt;&lt; th &gt;$3&lt; /th &gt;&lt; /tr &gt;&lt;/ csvfmt &gt;
  First Name|Surname|Title
  &lt; !-- contents -- &gt;
  &lt; csvfmt &gt;&lt; tr &gt;&lt; td &gt;$1&lt; /td &gt;&lt; td &gt;$2&lt; /td &gt;&lt; td &gt;$3&lt; /td &gt;&lt; /tr &gt;&lt;/ csvfmt &gt;
  Justin|Mason|JAPH
  Foo|Bar|Baz
  &lt; /csvtable &gt;
                                                      </pre>
                                                      <hr />
                                                      <h1><a name="THANKS">THANKS</a></h1><p>
                                                        
                                                        Thanks to Chris Barrett; he suggested this tag.
                                                      </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.2)
                                             
                                          </td>
                                          <td valign="top">
                                            <div align="right">
                                              
                                               [ <a href="index_10-perllib.html">Back</a> | <a href="download_tag.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>