austin_dern (austin_dern) wrote,

By the window, that is where I'll be

I am, meanwhile, frustrated by some of the goings-on at my job. This isn't related to my boss, for a change; it comes to my not being able to figure out a smarter way to do what I want to do. I've got a scheme which works; I just recognize that it's a lousy way to do things, and I'm not having luck figuring out how to make it elegant instead.

The problem is one of XSL transformations, which are these not-really-a-programming-language techniques for starting with an XML document and rewriting it based on the content. What we have are raw data where the descriptions of things are written in numerical codes, and I want to replace the codes with the English-language equivalents (which come from another XML documents, and which I want ultimately to come from a generated-on-the-fly XML because the meanings of the codes can change for some clients). And I want to go through each of the category types and translate the code to its English-language equivalent where that exists, or leave the number unchanged if it doesn't.

I have code which does this; it's just, it has hard-coded in it each of the data properties, which the obviously correct thing to do is write a function which takes as input the property name, and which returns either the translated value or the unaltered code. And that just doesn't work; I get back no response whatsoever. Unfortunately XSL doesn't return error messages, as best I can determine; it just either works or doesn't and good luck finding out why. I'm offended that it's not doing what I want, and that I'm not finding the right level of documentation of XSL to figure out what I want. I suppose it wouldn't really be work if I could just easily pull an example off the web and copy that over, but I like it better when I have the inspiration and it falls into place swiftly.

Trivia: By the end of the 1960s Blue Cross/Blue Shield of Massachusetts had three IBM System/360 computers and a 7074/1401 system to handle its client records, with 43 tape drives in operation. Though COBOL was the preferred language, some programs in the more primitive language AUTOCODER were still used on one of the 360's, emulating a 7074/1401 system. Source: A History Of Modern Computing, Paul E Ceruzzi.

Currently Reading: A History Of The World In Six Glasses, Tom Standage.


  • It's only natural

    We got up at 7 am Sunday so you know it has to be something significant. Either a day trip to a distant amusement park or a pinball tournament. It…

  • Why not come dancing

    One very busy Sunday in June 2018 we tried to go to the BalloonFest in Howell, Michigan, and then to the Livonia Spree, in Livonia. Both are local…

  • All her boyfriends used to come and call

    I managed my quota of writing at least something, this week, on my mathematics blog. And it was about the comics, my usual domain of original…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment