mirror of
				https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
				synced 2025-10-31 02:05:33 +00:00 
			
		
		
		
	added basic start page setup; began rewrite of parser
This commit is contained in:
		| @@ -2,7 +2,7 @@ namespace HaDocument.Settings.XMLRoots; | ||||
| using System.Xml.Linq; | ||||
|  | ||||
|  | ||||
| public class DocumentRoot : HaWeb.XMLParser.IXMLRoot { | ||||
| public class DocumentRoot : HaDocument.Interfaces.IXMLRoot { | ||||
|     public string Type { get; } = "Brieftext"; | ||||
|     public string Prefix { get; } = "brieftext"; | ||||
|     public string[] XPathContainer { get; } = { ".//data/document", ".//document" }; | ||||
| @@ -19,17 +19,17 @@ public class DocumentRoot : HaWeb.XMLParser.IXMLRoot { | ||||
|         else return null; | ||||
|     }; | ||||
|  | ||||
|     public List<(string, string?)>? GenerateFields(XMLRootDocument document) { | ||||
|         return null; | ||||
|     } | ||||
|     // public List<(string, string?)>? GenerateFields(XMLRootDocument document) { | ||||
|     //     return null; | ||||
|     // } | ||||
|  | ||||
|     public (string?, string?) GenerateIdentificationString(XElement element) { | ||||
|         return (null, null); | ||||
|     } | ||||
|  | ||||
|     public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) { | ||||
|         return true; | ||||
|     } | ||||
|     // public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) { | ||||
|     //     return true; | ||||
|     // } | ||||
|  | ||||
|     public XElement CreateHamannDocument(XElement element) { | ||||
|         var opus = new XElement("opus"); | ||||
| @@ -37,14 +37,14 @@ public class DocumentRoot : HaWeb.XMLParser.IXMLRoot { | ||||
|         return opus; | ||||
|     } | ||||
|  | ||||
|     public void MergeIntoFile(XElement file, XMLRootDocument document) { | ||||
|         if (file.Element("document") == null) | ||||
|             file.AddFirst(new XElement("document")); | ||||
|         var elements = document.Root.Elements().Where(x => IsCollectedObject(x)); | ||||
|         var root = file.Element("document"); | ||||
|         foreach (var element in elements) { | ||||
|             root!.Add(element); | ||||
|         } | ||||
|     } | ||||
|     // public void MergeIntoFile(XElement file, XMLRootDocument document) { | ||||
|     //     if (file.Element("document") == null) | ||||
|     //         file.AddFirst(new XElement("document")); | ||||
|     //     var elements = document.Root.Elements().Where(x => IsCollectedObject(x)); | ||||
|     //     var root = file.Element("document"); | ||||
|     //     foreach (var element in elements) { | ||||
|     //         root!.Add(element); | ||||
|     //     } | ||||
|     // } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 schnulller
					schnulller