Code Search for Developers
 
 
  

catart.wml from gzz at Krugle


Show catart.wml syntax highlighted

#include "common.wml"

<define-tag doctitle endtag=required>
  {#TITLE#: %body :##} <H1>%body</H1>
</define-tag>
<:
  @sectcounter = (0,0,0,0,0);
  sub sectcounter_reset {
    my $level = $_[0];
    while ($level <= $#sectcounter) {
      $sectcounter[$level++] = 0;    
    }
  }
  sub sectnum {
    my $level = $_[0];
    my $rv = "";
    while ($level >= 0) {
      $rv = "$sectcounter[$level--]." . $rv;
    }
    return $rv;
  }  
:>
<define-tag section  endtag=required>
  <: $sectcounter[%0]++; sectcounter_reset(%0+1); 
     $num = sectnum(%0); :>
  {#MYTOC#: <a href="#SEC<:= $num :>"><:= $num :> %body</a><br> :##}
  <h<:= %0 + 2 :>><a name="SEC<:= $num :>"><:= $num :> %body</a></h<:= %0 + 1 :>>
  <if <string-neq "%1" ""> <group
    {#REF%1#:<a href="#SEC<:= $num :>"><perl>print $num;</perl></a>:##} 
  /> />
</define-tag>
<define-tag ref>{#REF%0#}</define-tag>
<define-tag s1 endtag=required>
  <section 0 %0>%body</section>
</define-tag>
<define-tag s2 endtag=required>
  <section 1 %0>%body</section>
</define-tag>
<define-tag s3 endtag=required>
  <section 2 %0>%body</section>
</define-tag>
<define-tag s4 endtag=required>
  <section 3 %0>%body</section>
</define-tag>
<define-tag s5 endtag=required>
  <section 4 %0>%body</section>
</define-tag>

<html>
<head>
<title>{#TITLE#}</title>
<style type="text/css">
#include "art.css"
</style>
</head>





See more files for this project here

gzz

An implementation of Ted Nelson's ZZstructure. ZZstructure is a new type of programming platform for structured data.

Project homepage: http://savannah.nongnu.org/projects/gzz
Programming language(s): C++,Java,Python
License: lgpl21

  art.css
  article.wml
  catart.wml
  common.wml