GerixSoft Blog

How to implement Yield in Delphi

Delphi programming language has all the guts to compete with C# and Java. For example, you can quite easily implement C# yield return in Delphi:

How to use MSXML properly in Delphi

Using MSXML in Delphi is quite simple, except couple of caveats:

Consider the following sample code:

procedure Proc1(Node: IXMLDOMNode);
  i: Integer;
  for i := 0 to Node.childNodes.length - 1 do
    if Node.childNodes.item[i].nodeName = 'test' then

it kinda does the job, but if you put the following assertion (check line #05):

How to Create Native Cocoa applications in Delphi XE2 (without FireMonkey)

While official Embarcadero materials emphasize only FireMonkey technology in light of creating MacOSX applications, it is yet very possible to create Cocoa applications w/ native MacOSX look and feel without using FireMonkey at all: Embarcadero have performed all the necessary job of translating Objective-C Cocoa headers to Delphi; compiler and debugger environment is working fine for non-FireMonkey applications.

So, in order to create 100% native Cocoa applications in Delphi XE2 you will have to master the following:

How to Make guarddog working in Ubuntu Oneiric 11.10

guarddog is still missing in Ubuntu… This article will outline required steps to install guarddog in Ubuntu Oneiric 11.10/Precise 12.04 and get it working.

To get guarddog installed in Ubuntu Oneiric 11.10 you need the following packages:

How to Transform JSON using XSLT

There are some debates about declining use of XML and rising use of JSON. Some people love XML, some people love JSON. I love SAX: assuming SAX serializer/deserializers exist, anything can be treated as XML.

For example, you can write XSLT stylesheets transforming JSON: JSON SAX deserializer was already created by me in my previous article "How to Convert JSON to XML using ANTLR" and JSON SAX serializer is fairly easy to write. Once you have all that, you can transform JSON using XSLT:

How to Import Mailman/Pipermail archive into Thunderbird

This little tool will download HTML file produced by Mailman/Pipermail, convert it to XML, extract all hyperlinks to monthly archive files, download and concatenate these into one big file ready for import into Thunderbird.

How to Convert JSON to XML using ANTLR

In the previous article I have shown how to convert JSON to XML using XSLT 2.0 capabilities.

The problem w/ implementing parsers in XSLT, is conversion from flat structure to tree structure. XSLT was simply NOT created for such kind of conversions. For example, JSON to XML transformation is using XML Pipeline of mode1, mode2, mode3 to build a tree structure from a sequence of tokens generated by regexp in mode0.

ANN: Announcing XSLT Lint

I am pleased to announce XSLT Lint -- a tool for performing static code analysis of XSLT.

Idea of the project is to unscramble poorly coded XSLT, and patch the code accurately, so changes can be viewed nicely displayed line-by-line in file comparison tool.

Syndicate content