<--design, part 4 ^--xmld20--^ Part II, continued-->

xmld20 - an XML Schema for d20 gaming systems - Part II

Part II

The time has come, I've decided, to move to XSLT 2.0.

Why? Lately, coding has become more and more complex, with calculations for ability save DCs, multiple attacks with weapons, and inheritance of properties. These newer features are becoming more and more difficult to eke out of XSLT 1.0. I can do it, sure, and have done so, and it is a bit surprising how used to workarounds you can get, but now that the project is coming along nicely, with both new and old stat blocks, I think it's time for a move to a more powerful processing language.

Also, looking on the Saxon website I found out that they've got .NET executables, which means that XSLT 2.0 is much more accessible to the masses; no more having to fight with Java classpaths and such to use this library.

So far, Saxon hasn't failed me. I've only been doing a handful of tests, including running old XSLT 1.0 code, which works fine. Testing out the new features has been going flawlessly as well.

So now what? Now I move the library, stat block and character sheet generator code to version two, and recode them all. The biggest addition will be the xsl:function element, so I can stop making template calls that simulate string-returning functions, and can now fetch node-sets as return values. This will clean up a LOT of code that's in the current library and stylesheets.

What else? Little things like having a lower-case() and upper-case() function will cut down on a lot of unreadability; string-join() and the @separator attribute will definitely improve the readability of lists, and cut down on a lot of cruft that currently has to force this readability in.

Things might get a little quiet here while the existing codebase gets ported over, but I don't expect it to take too long, and we can return to fighting with the more interesting aspects of monster and character development.
<--design, part 4 ^--xmld20--^ Part II, continued-->

©2002-2017 Wayne Pearson