--- web/site.cd 2007/07/10 17:19:53 257 +++ web/site.cd 2007/07/10 17:19:59 258 @@ -1,48 +1,49 @@ -include "xhtml-strict.cd";; -include "xhtml-categ.cd";; +include "xhtml-strict.cd";; (* XHTML 1 Strict DTD *) +include "xhtml-categ.cd";; (* Categories (Inline, ...) from this DTD *) type SitePage = [] | [];; type Site = [ SitePage* ];; -type Page = [ - String - <banner>[InlineText*] - <navig>[ NavigBox* ] <main>[ Box* ] ];; +type Page = + <page>[ + <title>String + <banner>[InlineText*] + <navig>[ NavigBox* ] <main>[ Box* ] ];; type Author = <author>String;; type Paper = - <paper file=?String>[ - <title>String - Author+ - <comment>[InlineText*] - <abstract>Content ];; + <paper file=?String>[ + <title>String + Author+ + <comment>[InlineText*] + <abstract>Content ];; + type Slides = - <slides file=String>[ - <title>String - Author+ - <comment>[InlineText*] - ];; + <slides file=String>[ + <title>String + Author+ + <comment>[InlineText*] ];; type Link = - <link url=String; title=String>[InlineText*];; - + <link url=String; title=String>[ InlineText* ];; type Content = [ ( <p {||}>[InlineText*] | <ul {||}>[<li {||}>Content +] | <section title=String>Content | Xtable - | Paper | Slides | Link | InlineText )* ];; + | Paper | Slides | Link + | <include-verbatim file=String>[] + | InlineText )* ];; type InlineText = Char | <(`b|`i) {||}>[InlineText*] | <duce>[InlineText*] | Xa - | Ximg | Xbr - ;; + | Ximg | Xbr ;; type Box = <box title=String; subtitle=?String; link=String>Content | <meta>Content;; @@ -75,8 +76,16 @@ ] | <slides file=f>[ <title>tit aut::Author* <comment>com ] -> [ <a href=f>tit '. ' !(authors aut) '. ' !(text com) ] - | <link url=url; title=title>com -> - [ <a href=url>title '. ' !(text com) ] + | <include-verbatim file=f>[] -> + let code = load_file f in +(* let code = transform code with + | '\n' -> [ '\n' <br>[] ] + | ' ' -> "\160" + | c -> [c] in *) + [ + <div class="code">[ <pre>code ] + ] + | <link url=url; title=title>com -> [ <a href=url>title '. ' !(text com) ] | <ul>lis -> [ <ul>(map lis with <li>x -> <li>(content x)) ] | Xtable & x -> [ x ] | <p>x -> [ <p>(text x) ]