diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /appl/ebook/oebpackage.m | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/ebook/oebpackage.m')
| -rw-r--r-- | appl/ebook/oebpackage.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/appl/ebook/oebpackage.m b/appl/ebook/oebpackage.m new file mode 100644 index 00000000..891a67b1 --- /dev/null +++ b/appl/ebook/oebpackage.m @@ -0,0 +1,34 @@ +OEBpackage: module { + PATH: con "/dis/ebook/oebpackage.dis"; + + Package: adt { + file: string; + uniqueid: string; + meta: list of (string, Xml->Attributes, string); # dublin-core metadata + manifest: list of ref Item; # all items in the ebook + spine: list of ref Item; # reading order + guide: list of ref Reference; + + getmeta: fn(p: self ref Package, n: string): list of (Xml->Attributes, string); + locate: fn(p: self ref Package): int; + }; + + Item: adt { + id: string; + # can we assume that the href doesn't end in #idref? + href: string; + mediatype: string; + fallback: cyclic ref Item; + file: string; # local file name + missing: string; # if it's missing, why + }; + + Reference: adt { + sort: string; # XXX what's this? + title: string; + href: string; + }; + + init: fn(xml: Xml); + open: fn(f: string, warnings: chan of (Xml->Locator,string)): (ref Package, string); +}; |
