Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
28508d6b
Commit
28508d6b
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-01-15 09:22:14 by cvscast] Empty log message
Original author: cvscast Date: 2003-01-15 09:22:14+00:00
parent
ac71889e
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/macros2.cd
View file @
28508d6b
type XML_elem = <(_)>XML;;
type XML = [ (XML_elem | Char)* ];;
let fun banner (title : Any, subtitle : Any) : XML =
[<div class="title">[
!(match title with t & XML \ [] -> [<p>[] <h1>t] | _ -> [])
...
...
@@ -16,7 +17,7 @@ let fun box (title : Any, subtitle : Any, name : Any, content : XML) : XML =
!content
]];;
let fun convert (XML_elem | Char | XML -> XML)
let fun convert (XML_elem | Char | XML
-> XML)
| <box ({ title=t }
& ({ subtitle=st } | (st := `nil))
& ({ link=name } | (name := `nil)) )>x ->
...
...
@@ -44,5 +45,5 @@ let out : String =
@
(transform convert src with x -> print_xml x);;
dump_to_file "index
2.html
" out;;
dump_to_file "index
.php
" out;;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment