#[cfg(feature = "dtd-validation")]
use oxixml_dtd::MemoryResolver;
#[cfg(feature = "dtd-validation")]
macro_rules! dtd_entry {
($path:literal) => {
include_str!(concat!(
"../../../dtd-files/thymeleaf-2.1.6/org/thymeleaf/dtd/",
$path
))
};
}
#[cfg(feature = "dtd-validation")]
pub fn build_xhtml_resolver() -> MemoryResolver {
let mut resolver = MemoryResolver::new();
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-1.dtd",
dtd_entry!("thymeleaf/xhtml1-strict-thymeleaf-1.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-2.dtd",
dtd_entry!("thymeleaf/xhtml1-strict-thymeleaf-2.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-3.dtd",
dtd_entry!("thymeleaf/xhtml1-strict-thymeleaf-3.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd",
dtd_entry!("thymeleaf/xhtml1-strict-thymeleaf-4.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitional-thymeleaf-1.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-1.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitional-thymeleaf-2.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-2.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitional-thymeleaf-3.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-3.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitional-thymeleaf-4.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-4.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-frameset-thymeleaf-1.dtd",
dtd_entry!("thymeleaf/xhtml1-frameset-thymeleaf-1.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-frameset-thymeleaf-2.dtd",
dtd_entry!("thymeleaf/xhtml1-frameset-thymeleaf-2.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-frameset-thymeleaf-3.dtd",
dtd_entry!("thymeleaf/xhtml1-frameset-thymeleaf-3.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-frameset-thymeleaf-4.dtd",
dtd_entry!("thymeleaf/xhtml1-frameset-thymeleaf-4.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml11-thymeleaf-1.dtd",
dtd_entry!("thymeleaf/xhtml11-thymeleaf-1.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml11-thymeleaf-2.dtd",
dtd_entry!("thymeleaf/xhtml11-thymeleaf-2.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml11-thymeleaf-3.dtd",
dtd_entry!("thymeleaf/xhtml11-thymeleaf-3.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml11-thymeleaf-4.dtd",
dtd_entry!("thymeleaf/xhtml11-thymeleaf-4.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitonal-thymeleaf-1.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-1.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitonal-thymeleaf-2.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-2.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitonal-thymeleaf-3.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-3.dtd"),
);
resolver.insert(
"http://www.thymeleaf.org/dtd/xhtml1-transitonal-thymeleaf-4.dtd",
dtd_entry!("thymeleaf/xhtml1-transitional-thymeleaf-4.dtd"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd",
dtd_entry!("standard/xhtml1-strict.dtd"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd",
dtd_entry!("standard/xhtml1-transitional.dtd"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd",
dtd_entry!("standard/xhtml1-frameset.dtd"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd",
dtd_entry!("standard/xhtml11.dtd"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml11/DTD/xhtml11-model-1.mod",
dtd_entry!("standard/xhtml11-model-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent",
dtd_entry!("standard/xhtml-lat1.ent"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent",
dtd_entry!("standard/xhtml-symbol.ent"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent",
dtd_entry!("standard/xhtml-special.ent"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-attribs-1.mod",
dtd_entry!("standard/xhtml-attribs-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-base-1.mod",
dtd_entry!("standard/xhtml-base-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-bdo-1.mod",
dtd_entry!("standard/xhtml-bdo-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-blkphras-1.mod",
dtd_entry!("standard/xhtml-blkphras-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-blkpres-1.mod",
dtd_entry!("standard/xhtml-blkpres-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-blkstruct-1.mod",
dtd_entry!("standard/xhtml-blkstruct-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-charent-1.mod",
dtd_entry!("standard/xhtml-charent-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-csismap-1.mod",
dtd_entry!("standard/xhtml-csismap-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-datatypes-1.mod",
dtd_entry!("standard/xhtml-datatypes-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-edit-1.mod",
dtd_entry!("standard/xhtml-edit-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-events-1.mod",
dtd_entry!("standard/xhtml-events-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-form-1.mod",
dtd_entry!("standard/xhtml-form-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-framework-1.mod",
dtd_entry!("standard/xhtml-framework-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-hypertext-1.mod",
dtd_entry!("standard/xhtml-hypertext-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-image-1.mod",
dtd_entry!("standard/xhtml-image-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlphras-1.mod",
dtd_entry!("standard/xhtml-inlphras-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlpres-1.mod",
dtd_entry!("standard/xhtml-inlpres-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlstruct-1.mod",
dtd_entry!("standard/xhtml-inlstruct-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlstyle-1.mod",
dtd_entry!("standard/xhtml-inlstyle-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-link-1.mod",
dtd_entry!("standard/xhtml-link-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-list-1.mod",
dtd_entry!("standard/xhtml-list-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-meta-1.mod",
dtd_entry!("standard/xhtml-meta-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-object-1.mod",
dtd_entry!("standard/xhtml-object-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-param-1.mod",
dtd_entry!("standard/xhtml-param-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-pres-1.mod",
dtd_entry!("standard/xhtml-pres-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-qname-1.mod",
dtd_entry!("standard/xhtml-qname-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-ruby-1.mod",
dtd_entry!("standard/xhtml-ruby-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-script-1.mod",
dtd_entry!("standard/xhtml-script-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-ssismap-1.mod",
dtd_entry!("standard/xhtml-ssismap-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-struct-1.mod",
dtd_entry!("standard/xhtml-struct-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-style-1.mod",
dtd_entry!("standard/xhtml-style-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-table-1.mod",
dtd_entry!("standard/xhtml-table-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-text-1.mod",
dtd_entry!("standard/xhtml-text-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml11-model-1.mod",
dtd_entry!("standard/xhtml11-model-1.mod"),
);
resolver.insert(
"http://www.w3.org/TR/ruby/xhtml-ruby-1.mod",
dtd_entry!("standard/xhtml-ruby-1.mod"),
);
resolver.insert(
"xhtml-attribs-1.mod",
dtd_entry!("standard/xhtml-attribs-1.mod"),
);
resolver.insert("xhtml-base-1.mod", dtd_entry!("standard/xhtml-base-1.mod"));
resolver.insert("xhtml-bdo-1.mod", dtd_entry!("standard/xhtml-bdo-1.mod"));
resolver.insert(
"xhtml-blkphras-1.mod",
dtd_entry!("standard/xhtml-blkphras-1.mod"),
);
resolver.insert(
"xhtml-blkpres-1.mod",
dtd_entry!("standard/xhtml-blkpres-1.mod"),
);
resolver.insert(
"xhtml-blkstruct-1.mod",
dtd_entry!("standard/xhtml-blkstruct-1.mod"),
);
resolver.insert(
"xhtml-charent-1.mod",
dtd_entry!("standard/xhtml-charent-1.mod"),
);
resolver.insert(
"xhtml-csismap-1.mod",
dtd_entry!("standard/xhtml-csismap-1.mod"),
);
resolver.insert(
"xhtml-datatypes-1.mod",
dtd_entry!("standard/xhtml-datatypes-1.mod"),
);
resolver.insert("xhtml-edit-1.mod", dtd_entry!("standard/xhtml-edit-1.mod"));
resolver.insert(
"xhtml-events-1.mod",
dtd_entry!("standard/xhtml-events-1.mod"),
);
resolver.insert("xhtml-form-1.mod", dtd_entry!("standard/xhtml-form-1.mod"));
resolver.insert(
"xhtml-framework-1.mod",
dtd_entry!("standard/xhtml-framework-1.mod"),
);
resolver.insert(
"xhtml-hypertext-1.mod",
dtd_entry!("standard/xhtml-hypertext-1.mod"),
);
resolver.insert(
"xhtml-image-1.mod",
dtd_entry!("standard/xhtml-image-1.mod"),
);
resolver.insert(
"xhtml-inlphras-1.mod",
dtd_entry!("standard/xhtml-inlphras-1.mod"),
);
resolver.insert(
"xhtml-inlpres-1.mod",
dtd_entry!("standard/xhtml-inlpres-1.mod"),
);
resolver.insert(
"xhtml-inlstruct-1.mod",
dtd_entry!("standard/xhtml-inlstruct-1.mod"),
);
resolver.insert(
"xhtml-inlstyle-1.mod",
dtd_entry!("standard/xhtml-inlstyle-1.mod"),
);
resolver.insert("xhtml-lat1.ent", dtd_entry!("standard/xhtml-lat1.ent"));
resolver.insert("xhtml-link-1.mod", dtd_entry!("standard/xhtml-link-1.mod"));
resolver.insert("xhtml-list-1.mod", dtd_entry!("standard/xhtml-list-1.mod"));
resolver.insert("xhtml-meta-1.mod", dtd_entry!("standard/xhtml-meta-1.mod"));
resolver.insert(
"xhtml-object-1.mod",
dtd_entry!("standard/xhtml-object-1.mod"),
);
resolver.insert(
"xhtml-param-1.mod",
dtd_entry!("standard/xhtml-param-1.mod"),
);
resolver.insert("xhtml-pres-1.mod", dtd_entry!("standard/xhtml-pres-1.mod"));
resolver.insert(
"xhtml-qname-1.mod",
dtd_entry!("standard/xhtml-qname-1.mod"),
);
resolver.insert("xhtml-ruby-1.mod", dtd_entry!("standard/xhtml-ruby-1.mod"));
resolver.insert(
"xhtml-script-1.mod",
dtd_entry!("standard/xhtml-script-1.mod"),
);
resolver.insert(
"xhtml-special.ent",
dtd_entry!("standard/xhtml-special.ent"),
);
resolver.insert(
"xhtml-ssismap-1.mod",
dtd_entry!("standard/xhtml-ssismap-1.mod"),
);
resolver.insert(
"xhtml-struct-1.mod",
dtd_entry!("standard/xhtml-struct-1.mod"),
);
resolver.insert(
"xhtml-style-1.mod",
dtd_entry!("standard/xhtml-style-1.mod"),
);
resolver.insert("xhtml-symbol.ent", dtd_entry!("standard/xhtml-symbol.ent"));
resolver.insert(
"xhtml-table-1.mod",
dtd_entry!("standard/xhtml-table-1.mod"),
);
resolver.insert("xhtml-text-1.mod", dtd_entry!("standard/xhtml-text-1.mod"));
resolver.insert(
"xhtml1-frameset.dtd",
dtd_entry!("standard/xhtml1-frameset.dtd"),
);
resolver.insert(
"xhtml1-strict.dtd",
dtd_entry!("standard/xhtml1-strict.dtd"),
);
resolver.insert(
"xhtml1-transitional.dtd",
dtd_entry!("standard/xhtml1-transitional.dtd"),
);
resolver.insert(
"xhtml11-model-1.mod",
dtd_entry!("standard/xhtml11-model-1.mod"),
);
resolver.insert("xhtml11.dtd", dtd_entry!("standard/xhtml11.dtd"));
resolver.insert(
"xhtml5-legacy-wildcard.dtd",
dtd_entry!("standard/xhtml5-legacy-wildcard.dtd"),
);
resolver
}