mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 09:45:32 +00:00
added basic start page setup; began rewrite of parser
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace HaDocument.Settings.XMLRoots;
|
||||
using System.Xml.Linq;
|
||||
|
||||
public class CommentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
public class CommentRoot : HaDocument.Interfaces.IXMLRoot {
|
||||
public string Type { get; } = "Register";
|
||||
public string Prefix { get; } = "register";
|
||||
public string[] XPathContainer { get; } = { ".//data//kommentare/kommcat", ".//kommentare/kommcat" };
|
||||
@@ -18,9 +18,9 @@ public class CommentRoot : 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) {
|
||||
var kat = element.Attribute("value");
|
||||
@@ -29,9 +29,9 @@ public class CommentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
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");
|
||||
@@ -41,10 +41,10 @@ public class CommentRoot : HaWeb.XMLParser.IXMLRoot {
|
||||
return opus;
|
||||
}
|
||||
|
||||
public void MergeIntoFile(XElement file, XMLRootDocument document) {
|
||||
if (file.Element("kommentare") == null)
|
||||
file.AddFirst(new XElement("kommentare"));
|
||||
file.Element("kommentare")!.AddFirst(document.Root);
|
||||
}
|
||||
// public void MergeIntoFile(XElement file, XMLRootDocument document) {
|
||||
// if (file.Element("kommentare") == null)
|
||||
// file.AddFirst(new XElement("kommentare"));
|
||||
// file.Element("kommentare")!.AddFirst(document.Root);
|
||||
// }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user