brain-affairs

Home

Lehrtätigkeit

Partner

Kontakt

Zurück

.

Arbeitsergebnisse der Arbeitsgruppe Template-Sprache und -Parser, Skript-Schnittstelle
Parser-Regeln

  
  1)Eingabe -> ANDERES  
                   | ANDERES CMTEINGABE | 
                   |$
  
  2)CMTEINGABE -> '<CMT' Anweisung '>' Eingabe '</CMT>' Eingabe 
                   | /*leer*/
  
  2)Anweisung -> 'Textinsert'  '=' Textwert
                   | 'Linkinsert'  '=' Linkwert
                   | 'include' '=' Includewert 
                   | 'list' '=' Listwert
                   | 'if' Bedingung 
                   | /* leer*/
   
  4)TextWert -> BEZEICHNER
  5)Linkwert -> BEZEICHNER
                   | INTERN 
  6)Includewert -> BEZEICHNER'.tmpl'
  7)Listwert -> BEZEICHNER
  
  8)Bedingung -> BEZEICHNER '==' BEZEICHNER  *
                   | BEZEICHNER '!=' BEZEICHNER
  
        


Beispiel-Templates

templ_std_publ.tmpl

    
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  <html>
  <head>
    <title><CMT Textinsert = "Titel"></CMT></title>
    <CMT include = "templ_header.tmpl"></CMT>
  </head>
  <body>
    <!-- Linkliste am oberen Rand der Seite -->
    <table border="0" cellpadding="3" cellspacing="0">
      <tr>
        <td>[ <CMT Linkinsert = "root">ROOT</CMT> ]</td>
        <td>[ <CMT Linkinsert = "http://www.brain-affairs.biz">brain-affairs</CMT> ]</td>
        <td>[ <CMT Linkinsert = "mailto:tml@brain-affairs.biz">E-Mail</CMT> ]</td>
      </tr>
      <tr>
        <CMT list = "toclist">
          <!-- verlinke alle Unterobjekte der aktuellen Publikation,
            wenn sie nicht leer sind
           -->
          <CMT if Text != "">
            <td>
              [ 
              <CMT Linkinsert = "self">
                <CMT Textinsert = "Titel"></CMT>
              </CMT> 
              ]
            </td>
          </CMT>
        </CMT>
      </tr>
    </table>
    <!-- Inhalt darunter einfügen -->
    <CMT Textinsert = "Text"></CMT>
  </body>
  </html>
  
      

templ_std_doc.tmpl

    
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  <html>
  <head>
    <title><CMT Textinsert = "Titel"></CMT></title>
    <CMT include = "templ_header.tmpl"></CMT>
  </head>
  <body>
    <!-- Linkliste am oberen Rand der Seite, hier nur
      die Standardlinks, da keine Unterobjekte vorhanden
     -->
    <table border="0" cellpadding="3" cellspacing="0">
      <tr>
        <td>[ <CMT Linkinsert = "root">ROOT</CMT> ]</td>
        <td>[ <CMT Linkinsert = "http://www.brain-affairs.biz">brain-affairs</CMT> ]</td>
        <td>[ <CMT Linkinsert = "mailto:tml@brain-affairs.biz">E-Mail</CMT> ]</td>
      </tr>
    </table>
    <!-- Inhalt darunter einfügen -->
    <CMT Textinsert = "Text"></CMT>
  </body>
  </html>

      

templ_header.tmpl

    
  <meta http-equiv="Keywords" content="cms, content, management, wcms, web" />
  <meta http-equiv="Description" content="Template-Parser des Praktikums 'Entwicklung eines Web Content Management Systems' im SS03 an der FH Gießen-Friedberg" />
  <style type="text/css">
    BODY {
      font-family:      Arial, Geneva, sans-serif;
      font-size:                             12pt;
      margin:                                 0px;
      color:                              #000000;
      background-color:                   #FFFFFF;
    }
    P {
      font-family:      Arial, Geneva, sans-serif;
      font-size:                             12pt;
      margin-top:                             3pt;
      margin-bottom:                         20pt;
      color:                              #000000;
      background-color:                   #FFFFFF;
    }
    TD {
      font-family:      Arial, Geneva, sans-serif;
      font-size:                             12pt;
      padding:                                3px;
      margin:                                 0px;
      text-align:                            left;
      vertical-align:                         top;
      color:                              #000000;
      background-color:                   #FFFFFF;
    }
  </style>