9 Commits

Author SHA1 Message Date
1899db4156 feat: implement ETG.2000-compatible CRC32 for XNeedle transforms
- Add SourceLocation struct (XNeedle namespace) with FilePath, Encoding,
  and LineNumber (-1 sentinel when unavailable)
- Add SLoc property to Context; Clone() propagates it for free
- Expose XmlRoundtripWriter.DetectEncoding as internal static
- Add XmlRoundtripWriter.CreateToString(filePath, encoding) returning a
  (writer, StringBuilder) tuple for in-memory style-preserving rendering
- Update XmlFragParser.ChecksumData to accept tagName only; use
  OpeningTagAnchor to skip the opening tag robustly, and AnyChar.Until()
  to non-greedily capture content through the closing tag
- Thread SourceLocation from Program.cs through Rule.Transform/Operate,
  refreshing LineNumber per node via IXmlLineInfo
- Implement ContextFunctions.crc: render node via CreateToString, extract
  digest slice via ChecksumData, encode with SLoc.Encoding, return CRC32
  as double for arithmetic compatibility

Clanker: claude-sonnet_4.6
2026-04-24 05:28:39 +02:00
c694fe8b17 Add cdata manipulators
Clanker: claude-sonnet_4.6
2026-04-24 04:45:42 +02:00
154647083c fix: port transformation layer from XmlDocument to XDocument
- Thread runtime Context through expression trees via ParameterExpression
  instead of baking a parse-time constant (Node was always null)
- Fix ExpressionPart to compile Func<Context,string> and invoke with live ctx
- Coerce double arithmetic expressions to string before lambda wrapping
- Remove HasAttributes guard in attr() that blocked new attribute creation
- Replace GetLevel(XmlNode) with XElement.Parent-based implementation
- Add cdata()/cdata(txt) functions to read/write CDATA nodes in place,
  preserving the XCData wrapper that SetValue() would destroy

Clanker: claude-sonnet_4.6
2026-04-24 04:44:59 +02:00
2d54bec41d Clanker made roundtripping possible 2026-04-24 04:33:37 +02:00
cc8738c0dc Use LINQ XDocument 2026-04-23 20:20:56 +02:00
13e375c145 Add command line interface 2026-04-23 19:55:24 +02:00
6ef074081a Restructured project, removed comment-out code 2026-04-23 19:11:53 +02:00
c71b85c8fe Add initial prototype 2025-11-20 20:03:12 +01:00
f926859b1e Add README.md, LICENSE.txt 2025-11-20 19:54:08 +01:00