#! /bin/sh

# Copyright © 2004 Brendt Wohlberg <photoml@wohlberg.net>
# Please see the PhotoML distribution LICENCE file for licence information

cat <<EOF 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>XSLExample Index</title>
    <style type="text/css">
      body  {
       margin-left: 3%;
       margin-right: 3%;
       font-family: sans-serif;
       color: black;
       background: white;
      }
      div.center {
       text-align : center;
      }
      table { 
       margin-left: auto;
       margin-right: auto;
       border: solid black 1px;
       border-spacing: 5px;
       border-collapse: collapse;
      }
      tr, td {
       background-color: rgb(235,235,235);
       border: solid black 1px;
       padding: 4px;
      }
      th { 
       background-color: rgb(220,220,220);
       border: solid black 1px;
       padding: 4px;
      }
    </style>
  </head>

  <body>
    <div class="center"><h1>XSL Example Index</h1></div>

    <div class="center"><h2>PhotoML</h2></div>

    <table>
      <tr>
	<th></th>
	<th colspan="2">XSL</th>
      </tr>
      <tr>
        <th>source</th>
	<th>summary</th>
	<th>detailed</th>
      </tr>
EOF

for pml in photoml??.xml; do
  pmlbase=`basename $pml .xml`
  shtml="${pmlbase}s.html"
  dhtml="${pmlbase}d.html"
  cat <<EOF
    	<tr>
	  <td><a href="$pml">$pmlbase.xml</a></td>
	  <td><a href="$shtml">$shtml</a></td>
	  <td><a href="$dhtml">$dhtml</a></td>
	</tr>
EOF

done

cat <<EOF
    </table>

  </body>
</html>
EOF

