<?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: The <metatable> Tag </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="wmmeta.html">Back</a> | <a href="metadefault.html">Forward</a> | <a href="index.html">Index</a> | <a href="allinone.html">All In 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>The <metatable> Tag</h1><p> Metadata is usually embedded inside a content item using the <wmmeta> tag. However, sometimes you may want to tag a content item with <a href="metadata.html">metadata</a> from outside, if the text of the content is not under your control; or you may want to tag <a href="metadata.html">metadata</a> to an object that is not text-based, such as an image. </p> <p> The <a href="metatable.html">metatable</a> tag allows you to do this, and in bulk. You list a table of content names and the <a href="metadata.html">metadata</a> you want to attach to each content item, in tab-, comma-, pipe-separated-value, or XML format. </p> <p> By default, the table is read from between the <<a href="metatable.html">metatable</a>> and </metatable> tags. However, if you set the <em>src</em> attribute, the table will be read from the location specified, instead. </p> <p> Use the <em>format</em> attribute to specify whether the <a href="metatable.html">metatable</a> is in XML (<strong>xml</strong>) or Delimiter-Separated-Value (<strong>csv</strong>) format. </p> <a name="Delimiter_Separated_Value_Format" id="Delimiter_Separated_Value_Format"><h1>Delimiter-Separated-Value Format</h1></a><p> Firstly, pick a delimiter character, such as <code>|</code>. Set the <em>delimiter</em> attribute to this character. </p> <p> Next, the first line of the <a href="metatable.html">metatable</a> lists the <a href="metadata.html">metadata</a> you wish to set; it must start with the value <code>.</code>. This indicates to WebMake that it's defining the <a href="metadata.html">metadata</a> to be set. </p> <p> Finally, list as many lines of <a href="metadata.html">metadata</a> as you like; the first value on the line is the name of the content item you wish to attach the <a href="metadata.html">metadata</a> to. From then on, the other values on the line are the values of the <a href="metadata.html">metadata</a>. </p> <p> So, for example, consider this table, from the WebMake documentation: </p> <pre><<a href="metatable.html">metatable</a> delimiter="|"> .|title|abstract Main.pm|HTML::WebMake::Main|module documentation PerlCodeLibrary.pm|HTML::WebMake::PerlCodeLibrary|module documentation Content.pm|HTML::WebMake::Content|module documentation EtText2HTML.pm|Text::EtText::EtText2HTML|module documentation HTML2EtText.pm|Text::EtText::HTML2EtText|module documentation webmake|webmake(1)|script documentation ettext2html|ettext2html(1)|script documentation ethtml2text|ethtml2text(1)|script documentation </metatable> </pre><p> This will set <strong>Main.pm.title</strong> to <strong>HTML::WebMake::Main</strong>, <strong>Main.pm.abstract</strong> to <strong>module documentation</strong>, etc. </p> <a name="XML_Format" id="XML_Format"><h1>XML Format</h1></a><p> The XML block is surrounded with a <metaset> tag, and contains <target> blocks naming the content items the enclosed <a href="metadata.html">metadata</a> items are associated with. </p> <p> Inside the <target> blocks, <meta> tags name each metadatum, and enclose the metadatum's value. </p> <p> <!--etsafe--> <pre> <metaset> <target id="foo.txt"> <meta name="title"> This is Foo.txt's title. </meta> </target> </metaset> </pre><!--/etsafe--> </p> <a name="Using_lt_a_href_metatable_metatable_a_gt_To_Tag_Non_Content_Items" id="Using_lt_a_href_metatable_metatable_a_gt_To_Tag_Non_Content_Items"><h1>Using <<a href="metatable.html">metatable</a>> To Tag Non-Content Items</h1></a><p> Previously, WebMake required you to create phoney content items, in order to tag <a href="metadata.html">metadata</a> onto images or other non-content items. This is no longer required. Just load the URLs of the items using a <a href="media.html"><media></a> tag, and each one will have a "phoney" content item created with the same name automatically. </p> <p> Then use a <a href="metatable.html">metatable</a>, as above, to set the <a href="metadata.html">metadata</a> you wish to use. </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="wmmeta.html">Back</a> | <a href="metadefault.html">Forward</a> | <a href="index.html">Index</a> | <a href="allinone.html">All In 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>