1#![deny(unsafe_code)]
30#![deny(clippy::unwrap_used)]
31#![warn(missing_docs)]
32
33extern crate alloc;
34#[cfg(feature = "xmldsig")]
35#[macro_use]
36extern crate peresil;
37
38#[cfg(not(any(feature = "xml-backend-xmloxide", feature = "xml-backend-roxmltree")))]
39compile_error!(
40 "compile at least one XML backend: `xml-backend-xmloxide` or `xml-backend-roxmltree`"
41);
42
43pub mod c14n;
44pub mod document;
45pub mod encoding;
46pub mod error;
47mod hard_limits;
48#[cfg(feature = "xmldsig")]
49#[doc(hidden)]
52#[allow(dead_code, unused_imports, missing_docs)]
53#[cfg_attr(test, allow(clippy::unwrap_used))]
54#[path = "sxd_document/lib.rs"]
55mod sxd_document;
56#[cfg(feature = "xmldsig")]
57#[doc(hidden)]
58#[allow(dead_code, unused_imports, missing_docs)]
59#[cfg_attr(test, allow(clippy::unwrap_used))]
60#[path = "sxd_xpath/lib.rs"]
61mod sxd_xpath;
62#[path = "xml_input/shared.rs"]
63#[allow(dead_code)]
65mod xml_input_shared;
66pub mod xml_input {
75 pub use crate::xml_input_shared::{Error, decode_xml_bounded, lexical};
76}
77#[cfg(all(test, feature = "xmldsig"))]
78pub(crate) use sxd_document::{Package, QName, dom};
79#[cfg(feature = "xmldsig")]
80pub(crate) use sxd_document::{StorageRequirements, XML_NS_PREFIX, XML_NS_URI, str, string_pool};
81#[cfg(all(test, feature = "xmldsig"))]
82pub(crate) use sxd_xpath::{Context, Factory};
83#[cfg(feature = "xmldsig")]
84pub(crate) use sxd_xpath::{
85 LiteralValue, OwnedPrefixedName, OwnedQName, ParseBudget, Value, axis, context, expression,
86 function, node_test, node_to_num_with_context, nodeset, parser, str_to_num, token, tokenizer,
87};
88#[cfg(any(feature = "xmldsig", feature = "xmlenc"))]
89mod operation;
90#[cfg(any(feature = "xmldsig", feature = "xmlenc"))]
91pub mod policy;
92#[cfg(any(feature = "xmldsig", feature = "xmlenc"))]
93pub mod provider;
94mod xml;
95
96pub use xml::IdAttributeRegistration;
97pub use xml::dom::{
98 Ancestors, Attribute, Attributes, Children, Descendants, Document, Document as XmlDomDocument,
99 ExpandedName, Namespace, Namespaces, Node, Node as XmlDomNode, NodeId, NodeId as XmlDomNodeId,
100 NodeType, PI, ParseError, ParseError as XmlDomParseError, ParsingOptions,
101 ParsingOptions as XmlDomParsingOptions, XmlBackend,
102};
103
104#[cfg(feature = "xmldsig")]
105pub mod xmldsig;
106
107#[cfg(feature = "xmlenc")]
108pub mod xmlenc;
109
110#[cfg(any(feature = "xmldsig", feature = "xmlenc"))]
111pub use document::XmlDocumentPolicy;
112pub use document::{
113 AttributeIdentity, DocumentIdentity, DocumentView, NamespaceIdentity, NodeIdentity,
114 SemanticOrder, XmlDocument, XmlDocumentError,
115};
116pub use error::XmlSecError;