| 58 |
|
|
| 59 |
let fun load_include (String -> [Any*]) |
let fun load_include (String -> [Any*]) |
| 60 |
name -> |
name -> |
| 61 |
let _ = print [ 'Loading ' !name '... \n' ] in |
(* let _ = print [ 'Loading ' !name '... \n' ] in *) |
| 62 |
xtransform [ (load_xml name) ] with |
xtransform [ (load_xml name) ] with |
| 63 |
| <include file=(s & String)>[] -> load_include s |
| <include file=(s & String)>[] -> load_include s |
| 64 |
| <include-verbatim file=(s & String)>[] -> load_file s;; |
| <include-verbatim file=(s & String)>[] -> load_file s;; |
| 167 |
| <code>x -> <b>[ <tt>(highlight x) ] |
| <code>x -> <b>[ <tt>(highlight x) ] |
| 168 |
| <local href=l>txt -> local_link (sitemap,l,txt) |
| <local href=l>txt -> local_link (sitemap,l,txt) |
| 169 |
| <(tag & (`b|`i|`tt|`em))>x -> <(tag)>(text x) |
| <(tag & (`b|`i|`tt|`em))>x -> <(tag)>(text x) |
| 170 |
| <a href=url>_ & z -> let [] = print [ 'External link: ' !url '\n'] in z |
(* | <a href=url>_ & z -> let [] = print [ 'Link: ' !url '\n'] in z *) |
| 171 |
| z -> z |
| z -> z |
| 172 |
in |
in |
| 173 |
|
|
| 278 |
|
|
| 279 |
(* Entry point *) |
(* Entry point *) |
| 280 |
|
|
| 281 |
match load_include "site.xml" with |
match argv with |
| 282 |
|
| [ s ] -> |
| 283 |
|
(match load_include s with |
| 284 |
| [ Page & p ] -> gen_page ([],p,[], [], compute_sitemap p) |
| [ Page & p ] -> gen_page ([],p,[], [], compute_sitemap p) |
| 285 |
| _ -> raise "Invalid site.xml";; |
| _ -> raise ("Invalid input document " @ s)) |
| 286 |
|
| _ -> raise "Please specify an input file on the command line";; |