projection.cd 1.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
(* The projection  e/t   is translated to:
   transform e with [ (x::t|_)* ]  -> x *)

type Biblio  = <bibliography>[Heading Paper*];;
type Heading = <heading>[ PCDATA ];;
type Paper   = <paper>[ Author+ Title Conference File ];;
type Author  = <author>[ PCDATA ];;
type Title   = <title>[ PCDATA ];;
type Conference = <conference>[ PCDATA ];;
type File    = <file>[ PCDATA ];;

let bib : Biblio = 
  <bibliography>[
    <heading>"Alain Frisch's bibliography"
    <paper>[
      <author>"Alain Frisch"
      <author>"Giuseppe Castagna"
      <author>"Vronique Benzaken"
      <title>"Semantic subtyping"
      <conference>"LICS 02"
      <file>"semsub.ps.gz"
    ]
    <paper>[
      <author>"Mariangiola Dezani-Ciancaglini"
      <author>"Alain Frisch"
      <author>"Elio Giovannetti"
      <author>"Yoko Motohama"
      <title>"The Relevance of Semantic Subtyping"
      <conference>"ITRS'02"
      <file>"itrs02.ps.gz"
    ]
    <paper>[
      <author>"Vronique Benzaken"
      <author>"Giuseppe Castagna"
      <author>"Alain Frisch"
      <title>"CDuce: a white-paper"
      <conference>"PLANX-02"
      <file>"planx.ps.gz"
    ]
 ];;

let titles = [bib]/<paper>_/<title>_;;
let authors = [bib]/<paper>_/<author>_;;
let titles_concat = [bib]/<paper>_/<title>_/Char;;