mod decode;
mod error;
mod model;
mod parse;
mod scan;
mod sniff;
mod xml;
pub use decode::{DecodeOutcome, DecodedDocument, UnsupportedReason};
pub use error::{Error, ErrorCode};
pub use model::{
Document, Dossier, Limits, MimeType, ParseOptions, StructuralWarning, StructuralWarningCode,
};
pub use sniff::{DetectedType, sniff};
pub use xml::{XmlSource, id_map};
pub use roxmltree;
pub const ESZIGNO_NAMESPACE: &str = "https://www.microsec.hu/ds/e-szigno30#";
pub const XMLDSIG_NAMESPACE: &str = "http://www.w3.org/2000/09/xmldsig#";
pub const KNOWN_COMPATIBLE_NAMESPACES: &[&str] = &[
ESZIGNO_NAMESPACE,
"http://www.e-cegjegyzek.hu/2007/e-cegeljaras#",
"http://www.e-cegjegyzek.hu/2009/e-cegeljaras#",
"http://www.e-cegjegyzek.hu/2012/e-cegeljaras#",
"http://www.e-cegjegyzek.hu/2014/e-cegeljaras#",
];
pub fn parse(bytes: &[u8], limits: &Limits) -> Result<Dossier, Error> {
parse_with_options(bytes, &ParseOptions::with_limits(limits.clone()))
}
pub fn parse_with_options(bytes: &[u8], options: &ParseOptions) -> Result<Dossier, Error> {
parse::parse(bytes, options)
}