Writing C with XML and XSLT
I've been playing with writing C code with XML and XSLT. I have been using this to look at a state machine where each state is a separate C function. eg the BSD Installer C backend.
The basic gist is:
<installer>
<window name="foo">
<button name="b1"/>
<button name="b2"/>
</window>
<window name="bar">
<button name="baz">
</window>
</installer>
The XSL file then converts each <window> to a separate function with each <button> becoming the correct definition for a button in dfui API.
The basic gist is:
<installer>
<window name="foo">
<button name="b1"/>
<button name="b2"/>
</window>
<window name="bar">
<button name="baz">
</window>
</installer>
The XSL file then converts each <window> to a separate function with each <button> becoming the correct definition for a button in dfui API.