--- web/site.cd 2007/07/10 17:19:32 253 +++ web/site.cd 2007/07/10 17:19:36 254 @@ -35,8 +35,9 @@ type InlineText = Char | <(`b|`i) {||}>[InlineText*] + | [InlineText*] | Xa - | Ximg + | Ximg | Xbr ;; type Box = Content @@ -48,6 +49,13 @@ | [ a1 a2 ] -> a1 @ ", and " @ a2 | [ a; rem ] -> a @ ", " @ authors rem;; +let fun text (t : [InlineText*]) : Inlines = + map t with + x -> [ (text x) ] + | x -> (text x) + | x -> (text x) + | z -> z;; + let fun content (t : Content) : Flow = transform t with |
c -> [

title !(content c) ] @@ -58,15 +66,17 @@ | _ -> tit ) '. ' !(authors aut) '. ' - !com + !(text com)
[ 'Abstract:' !(content ab) ] ] | [ tit aut::Author* <comment>com ] -> - [ <a href=f>tit '. ' !(authors aut) '. ' !com ] + [ <a href=f>tit '. ' !(authors aut) '. ' !(text com) ] | <link url=url; title=title>com -> - [ <a href=url>title '. ' !com ] + [ <a href=url>title '. ' !(text com) ] | <ul>lis -> [ <ul>(map lis with <li>x -> <li>(content x)) ] - | x -> [ x ];; + | <p>x -> [ <p>(text x) ] + | <ul>x -> [ <ul>(text x) ] + | x -> text [ x ];; let fun main2html (Box -> Flow) <box (r)>c -> @@ -94,7 +104,7 @@ <link rel="stylesheet"; href="cduce.css"; type="text/css"> [] ] <body>[ - <div class="title">[ <h1>banner ] + <div class="title">[ <h1>(text banner) ] <div id="Sidelog">navig <div id="Content">(transform main with b -> main2html b) ] @@ -105,7 +115,7 @@ let _ = print [ 'Loading ' !inf '... ' ] in let page = match load_xml inf with | Page & p -> p - | _ -> raise ("Invalid input document" @ inf) in + | _ -> raise ("Invalid input document: " @ inf) in let _ = print [ 'Generating html ... ' ] in let html : String = [ '<?xml version="1.0" encoding="iso-8859-1"?>'