1 /* ifiction.h declarations for the babel ifiction API
\r
2 * (c) 2006 By L. Ross Raszewski
\r
4 * This code is freely usable for all purposes.
\r
6 * This work is licensed under the Creative Commons Attribution2.5 License.
\r
7 * To view a copy of this license, visit
\r
8 * http://creativecommons.org/licenses/by/2.5/ or send a letter to
\r
10 * 543 Howard Street, 5th Floor,
\r
11 * San Francisco, California, 94105, USA.
\r
20 /* Babel's notion of an XML tag */
\r
23 int32 beginl; /* Beginning line number */
\r
24 char tag[256]; /* name of the tag */
\r
25 char fulltag[256]; /* Full text of the opening tag */
\r
26 char *begin; /* Points to the beginning of the tag's content */
\r
27 char *end; /* Points to the end of the tag's content.
\r
28 setting *end=0 will turn begin into a string
\r
29 containing the tag's content (But if you do this, you
\r
30 should restore the original value of *end before
\r
31 allowing control to return to the ifiction parser) */
\r
32 char occurences[256]; /* Tables used internally to find missing required tags */
\r
33 char rocurrences[256];
\r
34 struct XMLTag *next; /* The tag's parent */
\r
38 typedef void (*IFCloseTag)(struct XMLTag *, void *);
\r
39 typedef void (*IFErrorHandler)(char *, void *);
\r
42 void ifiction_parse(char *md, IFCloseTag close_tag, void *close_ctx, IFErrorHandler error_handler, void *error_ctx);
\r
43 int32 ifiction_get_IFID(char *metadata, char *output, int32 output_extent);
\r
44 char *ifiction_get_tag(char *md, char *p, char *t, char *from);
\r