Commit 707b6bc0 authored by gerd's avatar gerd

New elements: c, picture, nameref, numref


git-svn-id: https://godirepo.camlcity.org/svn/app-presentation/trunk@2 50e5f3cf-a9f2-0310-83d8-d11ec64cb5ab
parent 21975630
(* $Id: main.ml,v 1.1 2001/01/13 23:10:31 gerd Exp $
(* $Id: main.ml,v 1.2 2001/04/26 20:47:47 gerd Exp $
* ----------------------------------------------------------------------
*
*)
......@@ -34,6 +34,7 @@ let convert_to_html filename no_gifs remove_prefix =
let store = new To_html.store remove_prefix in
if no_gifs then store # no_gifs;
root # extension # enumerate_pages 0;
ignore(root # extension # enumerate_pictures 1);
let hier = root # extension # collect_hierarchy idx in
store # set_hierarchy hier;
root # extension # print_pages store idx
......@@ -50,7 +51,7 @@ let main() =
"-remove", Arg.String (fun s -> remove := s),
" remove this prefix from all URLs";
]
(fun s ->
(fun s ->
match !filename with
None -> filename := Some s
| Some _ ->
......@@ -58,7 +59,7 @@ let main() =
"usage: presentation [ -nogifs ] [ -remove <prefix> ] input.xml";
let fn =
match !filename with
None ->
None ->
prerr_endline "presentation: no input";
exit 1
| Some s -> s
......@@ -72,6 +73,9 @@ main();;
* History:
*
* $Log: main.ml,v $
* Revision 1.2 2001/04/26 20:47:47 gerd
* New elements: c, picture, nameref, numref
*
* Revision 1.1 2001/01/13 23:10:31 gerd
* Initial revision.
*
......
<!-- $Id: presentation.dtd,v 1.1 2001/01/13 23:10:31 gerd Exp $ -->
<!-- $Id: presentation.dtd,v 1.2 2001/04/26 20:47:47 gerd Exp $ -->
<!ENTITY % p.like "p|ul">
<!ENTITY % text "br|code|em|footnote|a">
<!ENTITY % p.like "p|ul|picture">
<!ENTITY % text "br|code|c|em|footnote|a|numref|nameref">
<!ENTITY % layout "layout|headline-layout">
<!ELEMENT presentation ((%layout;)*,hierarchy,page+)>
<!ELEMENT layout (#PCDATA)>
<!ATTLIST layout
<!ATTLIST layout
name NMTOKEN #REQUIRED>
<!ELEMENT headline-layout EMPTY>
......@@ -28,16 +28,16 @@
>
<!ELEMENT plevel (related*,plevel*)>
<!ATTLIST plevel
<!ATTLIST plevel
idref IDREF #REQUIRED
>
<!ELEMENT related (#PCDATA)>
<!ATTLIST related
<!ATTLIST related
href CDATA #IMPLIED
idref CDATA #IMPLIED
>
<!ELEMENT page (sect1+)>
<!ATTLIST page
......@@ -45,33 +45,105 @@
id ID #IMPLIED
file CDATA #IMPLIED
>
<!-- Layout customizable:
"page":
CHILDREN, TITLE, UPURL, UPTITLE, LEVEL, RELATED, FOOTER
"navigator.topurl":
-
"navigator.toptitle":
-
"navigator.child":
LEVELTITLE, LEVELURL
"navigator.current", "navigator.level":
LEVELTITLE, LEVELURL, SUBLEVELS
"related.link":
TEXT, HREF
"related":
LINK
-->
<!ELEMENT sect1 (title,(sect2|%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL -->
<!ELEMENT sect2 (title,(sect3|%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL -->
<!ELEMENT sect3 (title,(%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL -->
<!ELEMENT title (#PCDATA|br)*>
<!ELEMENT p (#PCDATA|%text;)*>
<!-- Layout customizable: CHILDREN -->
<!ELEMENT br EMPTY>
<!-- Layout customizable -->
<!ELEMENT code (#PCDATA)>
<!-- Formatted as a new block -->
<!ELEMENT c (#PCDATA)>
<!-- Inline -->
<!ELEMENT em (#PCDATA|%text;)*>
<!-- Layout customizable: CHILDREN -->
<!ELEMENT ul (li+)>
<!-- Layout customizable: CHILDREN -->
<!ELEMENT li (%p.like;)*>
<!-- Layout customizable: CHILDREN -->
<!ELEMENT footnote (#PCDATA|%text;)*>
<!-- Two customizable layouts:
"footnote.text": SYMBOL, TEXTANCHOR, FOOTANCHOR
"footnote.foot": SYMBOL, TEXTANCHOR, FOOTANCHOR, CHILDREN
-->
<!ELEMENT picture EMPTY>
<!ATTLIST picture
src CDATA #REQUIRED
id ID #IMPLIED
caption CDATA #REQUIRED
>
<!-- Layout customizable: SRC, ANCHOR, CAPTION, NUMBER -->
<!ELEMENT a (#PCDATA)*>
<!ATTLIST a
<!ATTLIST a
href CDATA #IMPLIED
idref IDREF #IMPLIED
>
<!-- Generic hyperlink. Either href or idref must be specified.
The name "a" (anchor) is historical; you cannot define anchors
with this element.
-->
<!ELEMENT numref EMPTY>
<!ATTLIST numref
idref IDREF #REQUIRED
>
<!-- Expands to a hyperlink containing the number of the picture
(or page).
-->
<!ELEMENT nameref EMPTY>
<!ATTLIST nameref
idref IDREF #REQUIRED
>
<!-- Expands to a hyperlink containing the name of the object.
For pages: The title of the page.
For pictures: The caption of the picture.
-->
This diff is collapsed.
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