Commit 3a7566f0 authored by Pietro Abate's avatar Pietro Abate

[r2005-03-29 01:03:23 by beppe] Function cleaning

Original author: beppe
Date: 2005-03-29 01:03:23+00:00
parent f859c7a6
(* Input Types *)
include "../../web/siteTypes.cd";;
(* Output Types *)
include "fo_dtd.cd";;
(*include "typeFO.cd";;*)
(** Command line **)
......@@ -193,7 +195,7 @@ let highlight (String -> [ (Char| inline)* ] )
let lireItem (it : [Item+]): [block*] =
let readItem (it : [Item+]): [block*] =
transform it with
| <box title=t link=x>c ->
[<fo:block id=x>[
......@@ -213,7 +215,7 @@ let lireItem (it : [Item+]): [block*] =
space-after="40pt"
space-before="85pt"
color="black" >[!title1]
] !(lireItem litem)
] !(readItem litem)
]]
| _ -> raise "ERROR"
......@@ -227,28 +229,22 @@ let gen_page (page : Page, cduce_version : Latin1) : [block+] =
|<page ..>[(<title>title1 (<banner>_)? litem::Item+)] ->(
let sortie : [block+]=
[
<fo:block text-align="center" space-before="130pt">[
<fo:block font-size="35pt" font-weight="bold">"CDuce Programming Language"
<fo:block font-size="35pt" font-weight="bold" space-after="20pt">[!title1]
<fo:block font-size="18pt" font-weight="bold">("Language Version "@cduce_version)
]
!(lireItem litem)]
<fo:block font-size="35pt" font-weight="bold">"CDuce Programming Language"
<fo:block font-size="35pt" font-weight="bold" space-after="20pt">[!title1]
<fo:block font-size="18pt" font-weight="bold">("Language Version "@cduce_version)
]
!(readItem litem)]
in sortie)
let load_include (Latin1 -> [Any*])
name ->
(* let _ = print [ 'Loading ' !name '... \n' ] in *)
xtransform [ (load_xml name) ] with
| <include file=(s & Latin1)>[] -> load_include s
| <include-verbatim file=(s & Latin1)>[] -> load_file s
in
match argv [] with
| [ (inp_file & Latin1) (out_file & Latin1) (cduce_version & Latin1) ]
-> (try let ([ main_page ]) = (load_include inp_file :? [ Page ]) in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment