pub use einvoice_xsd::Licence;
const MIT: Licence = Licence {
id: "MIT",
covers: MIT_COVERS,
text: include_str!("../LICENSES/MIT.txt"),
};
#[cfg(all(feature = "pdf", feature = "fetch", not(target_family = "wasm")))]
const MIT_COVERS: &str = "the code of einvoice-validator and of the crates of the project it \
is built from (einvoice-bigint, einvoice-pdf, einvoice-schematron, einvoice-svrl, einvoice-xdm, \
einvoice-xml, einvoice-xpath, einvoice-xpath-eval, einvoice-xsd, einvoice-xslt, \
einvoice-xslt-exec)";
#[cfg(all(
feature = "pdf",
not(all(feature = "fetch", not(target_family = "wasm")))
))]
const MIT_COVERS: &str = "the code of einvoice-validator and of the crates of the project it \
is built from (einvoice-bigint, einvoice-pdf, einvoice-svrl, einvoice-xdm, einvoice-xml, \
einvoice-xpath, einvoice-xpath-eval, einvoice-xsd, einvoice-xslt, \
einvoice-xslt-exec)";
#[cfg(all(not(feature = "pdf"), feature = "fetch", not(target_family = "wasm")))]
const MIT_COVERS: &str = "the code of einvoice-validator and of the crates of the project it \
is built from (einvoice-bigint, einvoice-schematron, einvoice-svrl, einvoice-xdm, einvoice-xml, \
einvoice-xpath, einvoice-xpath-eval, einvoice-xsd, einvoice-xslt, \
einvoice-xslt-exec)";
#[cfg(all(
not(feature = "pdf"),
not(all(feature = "fetch", not(target_family = "wasm")))
))]
const MIT_COVERS: &str = "the code of einvoice-validator and of the crates of the project it \
is built from (einvoice-bigint, einvoice-svrl, einvoice-xdm, einvoice-xml, einvoice-xpath, \
einvoice-xpath-eval, einvoice-xsd, einvoice-xslt, einvoice-xslt-exec)";
#[cfg(any(feature = "cen-ubl", feature = "cen-cii"))]
const EUPL: Licence = Licence {
id: "EUPL-1.2",
covers: EUPL_COVERS,
text: include_str!("../LICENSES/EUPL-1.2.txt"),
};
#[cfg(all(feature = "cen-ubl", feature = "cen-cii"))]
const EUPL_COVERS: &str = "the CEN EN 16931 UBL and CII validation stylesheets, release 1.3.17 \
(ubl/xslt/EN16931-UBL-validation.xslt and cii/xslt/EN16931-CII-validation.xslt, \
unmodified), published by CEN/TC 434 and embedded by einvoice-validator as the built-in \
rule sets cen-ubl and cen-cii";
#[cfg(all(feature = "cen-ubl", not(feature = "cen-cii")))]
const EUPL_COVERS: &str = "the CEN EN 16931 UBL validation stylesheet, release 1.3.17 \
(ubl/xslt/EN16931-UBL-validation.xslt, unmodified), published by CEN/TC 434 and \
embedded by einvoice-validator as the built-in rule set cen-ubl";
#[cfg(all(feature = "cen-cii", not(feature = "cen-ubl")))]
const EUPL_COVERS: &str = "the CEN EN 16931 CII validation stylesheet, release 1.3.17 \
(cii/xslt/EN16931-CII-validation.xslt, unmodified), published by CEN/TC 434 and \
embedded by einvoice-validator as the built-in rule set cen-cii";
#[must_use]
pub fn licences() -> Vec<Licence> {
let mut out = vec![MIT];
#[cfg(any(feature = "cen-ubl", feature = "cen-cii"))]
out.push(EUPL);
out.extend(
einvoice_xsd::LICENCES
.iter()
.filter(|l| l.id != "MIT")
.copied(),
);
out
}