diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 039ccf2..90b5094 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -3,7 +3,7 @@ ## Original Author **Dominic Hoegliner** -Author and maintainer of XNeedle. +Author and maintainer of XN. All intellectual property rights retained by the original author. --- diff --git a/LICENSE.txt b/LICENSE.txt index 67a15af..3909aab 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2026 DOMINIC HOEGLINER +Copyright 2026 Dominic Hoeglinger Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 24e11e2..fe22a99 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ -# XNeedle +# XN -A simple tool for injecting faults into XML documents. +XML Needle (XN) is a simple tool for injecting faults into XML documents. ## Description The purpose of the tool is to hide a metaphorical "needle in a haystack" in large XML files, such as an EtherCAT SubDevice Information or ESI file. -Therefore it is a FIT (fault injection test) tool, but can be used off-label. +Therefore it is a FIT (fault injection test) tool, +but can be used for general purpose manipulation. -To live up to its name, XPath is utilized to specify precise locations +XPath is utilized to specify precise locations combined with a good enough set of instructions to do CRUD operations. As the main application lies with injecting faults into ESI files, @@ -28,7 +29,7 @@ and values. This example prepends the existing inner text of a given node with "Faulty '", and appends the evaluated string "': 2+2=10". ``` -text("Faulty '" .. text() .. "': " .. string(1+1^2) .. "+2=10"); +text("Faulty '" .. text() .. "': " .. string(1+1**2) .. "+2=10"); ``` 2. Rules @@ -50,7 +51,7 @@ $("//Device/Type[@ProductCode='#x0B583052' and @RevisionNo='#x00110000']/..") 3. Bangs Bangs are special function calls which take either a string or XPath as parameters, -and make structural changes to the document. +and make addition changes to the document. They are prefixed with, as the name implies, an exclamation mark. This example adds, removes and swaps nodes. diff --git a/Common/SourceLocation.cs b/src/Common/SourceLocation.cs similarity index 100% rename from Common/SourceLocation.cs rename to src/Common/SourceLocation.cs diff --git a/Formats/XmlRoundtripWriter.cs b/src/Formats/XmlRoundtripWriter.cs similarity index 100% rename from Formats/XmlRoundtripWriter.cs rename to src/Formats/XmlRoundtripWriter.cs diff --git a/Parser/Elements/Arithmeric.cs b/src/Parser/Elements/Arithmeric.cs similarity index 100% rename from Parser/Elements/Arithmeric.cs rename to src/Parser/Elements/Arithmeric.cs diff --git a/Parser/Elements/Call.cs b/src/Parser/Elements/Call.cs similarity index 100% rename from Parser/Elements/Call.cs rename to src/Parser/Elements/Call.cs diff --git a/Parser/Elements/Context.cs b/src/Parser/Elements/Context.cs similarity index 100% rename from Parser/Elements/Context.cs rename to src/Parser/Elements/Context.cs diff --git a/Parser/Elements/Evaluatable.cs b/src/Parser/Elements/Evaluatable.cs similarity index 100% rename from Parser/Elements/Evaluatable.cs rename to src/Parser/Elements/Evaluatable.cs diff --git a/Parser/Elements/ExpressionPart.cs b/src/Parser/Elements/ExpressionPart.cs similarity index 100% rename from Parser/Elements/ExpressionPart.cs rename to src/Parser/Elements/ExpressionPart.cs diff --git a/Parser/Elements/NullPart.cs b/src/Parser/Elements/NullPart.cs similarity index 100% rename from Parser/Elements/NullPart.cs rename to src/Parser/Elements/NullPart.cs diff --git a/Parser/Elements/Part.cs b/src/Parser/Elements/Part.cs similarity index 100% rename from Parser/Elements/Part.cs rename to src/Parser/Elements/Part.cs diff --git a/Parser/XmlFragParser.cs b/src/Parser/XmlFragParser.cs similarity index 100% rename from Parser/XmlFragParser.cs rename to src/Parser/XmlFragParser.cs diff --git a/Parser/XnParser.cs b/src/Parser/XnParser.cs similarity index 100% rename from Parser/XnParser.cs rename to src/Parser/XnParser.cs diff --git a/Program.cs b/src/Program.cs similarity index 100% rename from Program.cs rename to src/Program.cs diff --git a/Transformation/Bang.cs b/src/Transformation/Bang.cs similarity index 100% rename from Transformation/Bang.cs rename to src/Transformation/Bang.cs diff --git a/Transformation/BangOperation.cs b/src/Transformation/BangOperation.cs similarity index 100% rename from Transformation/BangOperation.cs rename to src/Transformation/BangOperation.cs diff --git a/Transformation/Bangs/AddBang.cs b/src/Transformation/Bangs/AddBang.cs similarity index 100% rename from Transformation/Bangs/AddBang.cs rename to src/Transformation/Bangs/AddBang.cs diff --git a/Transformation/Bangs/AfterBang.cs b/src/Transformation/Bangs/AfterBang.cs similarity index 100% rename from Transformation/Bangs/AfterBang.cs rename to src/Transformation/Bangs/AfterBang.cs diff --git a/Transformation/Bangs/BeforeBang.cs b/src/Transformation/Bangs/BeforeBang.cs similarity index 100% rename from Transformation/Bangs/BeforeBang.cs rename to src/Transformation/Bangs/BeforeBang.cs diff --git a/Transformation/ContextFunctions.cs b/src/Transformation/ContextFunctions.cs similarity index 100% rename from Transformation/ContextFunctions.cs rename to src/Transformation/ContextFunctions.cs diff --git a/Transformation/RequireException.cs b/src/Transformation/RequireException.cs similarity index 100% rename from Transformation/RequireException.cs rename to src/Transformation/RequireException.cs diff --git a/Transformation/Rule.cs b/src/Transformation/Rule.cs similarity index 100% rename from Transformation/Rule.cs rename to src/Transformation/Rule.cs diff --git a/XNeedle.csproj b/src/xn.csproj similarity index 100% rename from XNeedle.csproj rename to src/xn.csproj diff --git a/xn.slnx b/xn.slnx new file mode 100644 index 0000000..1364993 --- /dev/null +++ b/xn.slnx @@ -0,0 +1,5 @@ + + + + +