Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Syndic.Opml1
: compliant with OPML 1.0.
The purpose of the Outline Processor Markup Language, or OPML, is to provide a way to exchange information between outliners and Internet services that can be browsed or controlled through an outliner. Outlines can be used for specifications, legal briefs, product plans, presentations, screenplays, directories, diaries, discussion groups, chat systems and stories.
module Error : module type of Syndic_error
The common signature that all error modules must (at least) satisfy.
type head = {
title : string;
Title of the document.
*)date_created : Syndic_date.t option;
A date-time indicating when the document was created.
*)date_modified : Syndic_date.t;
A date-time indicating when the document was last modified.
*)owner_name : string;
Owner of the document.
*)owner_email : string;
Email address of the owner of the document.
*)expansion_state : int list;
A comma-separated list of line numbers that are expanded. The line numbers in the list tell you which headlines to expand. The order is important. For each element in the list, X, starting at the first summit, navigate flatdown X times and expand. Repeat for each element in the list.
*)vert_scroll_state : int option;
A number saying which line of the outline is displayed on the top line of the window. This number is calculated with the expansion state already applied.
*)window_top : int option;
Pixel location of the top edge of the window.
*)window_left : int option;
Pixel location of the left edge of the window.
*)window_bottom : int option;
Pixel location of the bottom edge of the window.
*)window_right : int option;
Pixel location of the right edge of the window.
*)}
val head :
?date_created:Syndic_date.t ->
?expansion_state:int list ->
?vert_scroll_state:int ->
?window_top:int ->
?window_left:int ->
?window_bottom:int ->
?window_right:int ->
date_modified:Syndic_date.t ->
owner_name:string ->
owner_email:string ->
string ->
head
head ~date_modified ~owner_name ~owner_email title
returns a head. By default, all optional arguments leave the corresponding fields empty.
type outline = {
text : string;
String that's displayed when the outline is being browsed or edited. There is no specific limit on the length of the text attribute.
*)typ : string option;
"Type" of outline. Says how other attributes of the outline
are interpreted. This is application dependent. For example, for news feed, it is common to have "rss" as the value of this field.
is_comment : bool;
Indicates whether the outline is commented or not. By convention if an outline is commented, all subordinate outlines are considered to be commented as well.
*)is_breakpoint : bool;
Indicates whether a breakpoint is set on this outline. This attribute is mainly necessary for outlines used to edit scripts that execute.
*)xml_url : Uri.t option;
Link to the XML data associated to this outline, typically the RSS feed.
*)html_url : Uri.t option;
Link to the HTML data associated to this outline, typically the HTML pages rendering the news feed.
*)attrs : Xmlm.attribute list;
Association list of additional attributes in the outline.
*)outlines : outline list;
List of outline
elements that are considered sub-items of the current outline.
}
val outline :
?typ:string ->
?is_comment:bool ->
?is_breakpoint:bool ->
?xml_url:Uri.t ->
?html_url:Uri.t ->
?attrs:Xmlm.attribute list ->
?outlines:outline list ->
string ->
outline
outline text
returns an outline.
type body = outline list
List of outline elements.
val parse : ?xmlbase:Uri.t -> Xmlm.input -> opml
parse i
takes i
and returns an opml record which is the OCaml representation of the OPML document.
val to_xml : opml -> Syndic_xml.t
to_xml opml
converts the OPML document opml
to an XML tree.
val output : opml -> Xmlm.dest -> unit
output opml dest
writes the XML tree of the OPML document opml
to dest
.