# $Id$ @load http-request @load http-reply module XML; export { # XML types type string_table: table[string] of string; type rss_channel_data: record { title: string; uri: string; num_items: count; }; type rss_channels: set[rss_channel_data]; # XML events global anonymized_xml: event(c: connection, doc_elt: string, namesp: string, doc: string); global basic_xml: event(c: connection, elt: string, namesp: string, namespaces: string_table, add_info: string_table); global rss_event: event(c: connection, vers: double, chans: rss_channels); # Following are the switches for the xerces parser features # (see http://xml.apache.org/xerces-c/program-dom.html). # Make sure you know what you are doing when changing these. const parser_DoNamespaces = T &redef; # caution: analyzer doesn't work properly without namespaces const parser_ExitOnFirstFatalError = T &redef; # caution: F can lead to incorrect parser behavior const parser_LoadExternalDTD = F &redef; const parser_DoSchema = F &redef; const parser_cacheGrammarFromParse = F &redef; const parser_useCachedGrammarInParse = F &redef; const parser_useScanner = "DGXMLScanner" &redef; # Scanner names given as string const parser_ValidationScheme = F &redef; # ValidationScheme: T => Val_Auto, F => Val_Never # determines the size of the fragments of documents that are passed # as strings when a parse error occurs const error_doc_frag_size = 256; # add a signature to recognize xml documents redef signature_files += "xml.sig"; # used for the addition of query file names to the query_files string function add_query_file(qold: string, qnew: string): string { if ( qold == "" ) return qnew; else return cat(qold, " ", qnew); } # specifies the query files to use for querying global query_files = "" &add_func = add_query_file; }