code
10 May 2011 | 3 Comments
Today, thanks to user Lucero on StackOverflow, I learned about .NET’s “Balancing Groups” Regex feature. Basically, any time you use a named capturing group, it actually pushes the capture onto a named stack. You can then pop this stack by using the same capturing group prefixed with a hyphen, like (?< -stackToPop>). Of course, anyone [...]
Tagged in C, code, horrid, regex, silly, snippet, XML
Uncategorized
19 July 2007 | 2 Comments
Since XSLT is basically a pattern-matching functional programming language, we should be able to use it to compute. I’m going to use it to implement one of the most basic functions: Peano-style addition. First of all we have to have an idea of what the numbers look like. We want to simulate this in XSL: [...]
Tagged in Cool, Functional programming, Haskell, Mathematics, XML, XSLT
Uncategorized
25 June 2006 | 0 Comments
XML 1.0 allows you to insert characters from the C1 control code range, whilst those from the C0 range are outright forbidden. XML 1.1 allows you to insert characters from the C0 range as long as they are escaped as character entity references, and mandates that you do the same for those from the C1 [...]
Tagged in Development, Reference, Unicode, XML