This commit is contained in:
philipp 2023-11-07 08:46:11 +01:00
parent dc628f68b7
commit 20ae66ffb2
3 changed files with 6 additions and 7 deletions

View File

@ -190,6 +190,11 @@ impl LawBuilder {
classifiers.push(Classifier::new("Hauptstück", Arc::new(&contains)).root());
classifiers.push(Classifier::new("Abschnitt", Arc::new(&contains)));
classifiers.push(Classifier::new("Number", Arc::new(&starts_with_number)));
} else if name == "MSchG" {
law_id = Some(10002180);
classifiers.push(Classifier::new("Abschnitt", Arc::new(&contains)).root());
classifiers.push(Classifier::new("Number", Arc::new(&starts_with_number)));
}
let mut builder = Self {

View File

@ -42,7 +42,7 @@ impl From<roxmltree::Error> for Error {
fn main() {
env_logger::init();
let law = LawBuilder::new("UrhG");
let law = LawBuilder::new("MSchG");
law.to_md();
}

View File

@ -33,8 +33,6 @@ pub(crate) fn parse_from_str(xml: &str, builder: &mut LawBuilder) -> Result<bool
r#"<ueberschrift typ="g1" ct="text" halign="c">4b. Presseveröffentlichungen.</ueberschrift>"#,
); // § 99d UrhG, Titel kein Para.... //TODO: not working
let xml = xml.replace("<i>.</i>", "."); // e.g. § 37d Abs. 4 (last point)...
let xml = xml.replace("<i>. </i>", "."); // e.g. § 23a in MSchG
let xml = xml.replace("<super>", ""); // e.g. § 23a in MSchG
let xml = xml.replace("</super>", ""); // e.g. § 23a in MSchG
let xml = xml.replace("<i>", ""); // § 69 in MSchG
@ -46,10 +44,6 @@ pub(crate) fn parse_from_str(xml: &str, builder: &mut LawBuilder) -> Result<bool
let xml = xml.replace("<b>", ""); // § 14 in FSG
let xml = xml.replace("</b>", "");
// Artikel 18 UrhG
let xml = xml.replace("<n><i>", "");
let xml = xml.replace("</i></n>", "");
let xml = xml.replace(
r#"(Anm.: § 69 aufgehoben durch Art. 1 Z 12, BGBl. I Nr. 124/2017)"#,
r#"<gldsym>§ 69.</gldsym>(Anm.: § 69 aufgehoben durch Art. 1 Z 12, BGBl. I Nr. 124/2017)"#,