Integrating Balanced Scorecard for iPad Using XML

This is a pretty technical topic, but I think a number of users of this Balanced Scorecard for iPad (BsC) will find this information interesting at some level. If you ever want to integrate your scorecard data with othersystems, this article will certainly come in handy.

This is part one of a two-part article. The first part deals with a localization issue and the second part will show you some practical use cases for leveraging BsC data files.

BsC Supports XML

In case you missed it, the most recent update to Balanced Scorecard for iPad (BsC) provides a feature that allows you to not only share scorecard files through a web service, but also export and share them in XML format. The new XML abilities make it possible to import your BsC projects into other enterprise systems. Given this ability, BsC data can now flow into almost any environment including reporting tools, collaboration systems, and even accounting systems. It is also possible to perform round-trip updates since the XML format may also be imported back into BsC.

As I began to experiment with BsC’s XML format I slammed into a wall right away. The XML schema is defined in Spanish and I barely read and write English. As soon as the dust settled I realized – okay, no worries – there’s a companion technology to XML called XSLT (Extensible Stylesheet Transformation Language). If indeed BsC’s XML format is valid and well-formed, I should be able to translate the documents in a jiff. So, without breaking my integration stride, I created a simple transformation document with the help of some translation guideposts from Eduardo (at BsC) and Google Translator.

Why is an English Version of the BsC XML Format Important?

Integrators are far more productive (and precise) if they can look at an XML document and understand what each element represents. This is one of the great advantages of XML and why so many companies, even brutal competitors, have agreed that this is an ideal interchange format. The following snippet from a BsC XML document is really difficult for me to read.

image

However, the next snippet, transformed into English, is quite easy to understand.

image

What Does XSLT Do?

It’s very simple really – it allows you to parse an XML document and change it (transform it) into something else. The “something else” in this case is the same data but with a different XML schema; specifically a schema that I, and everyone who reads English, can readily understand.

Writing a transformation stylesheet requires the use of XSL (extensible stylesheet language) and it so happens I have some experience doing this. With a few hours of tests and another few hours of translation effort, I was able to create a simple Spanish-to-English transformation script. This involves reading the BsC format and writing out the same data but with a different set of XML elements (in English).

XSL uses rules to match and then generate something different. In this case, we want to generate another XML document, but XSL can also generate anything you want it to – CSV, HTML, DOCX – pretty much any format you can imaging, XSL can generate. I think it can even generate binary files, but I’m not sure about that.

My transformation engine matches XML elements in the BsC document such as the month data block. As you probably know, BsC’s strategic planning model requires monthly data, and the Spanish element used in the schema is “MESINDICADOR”. I want that to say “monthIndicator” so I create a transformation rule to look for this block of elements and replace it with my own [English] schema.

image

You Can Experiment Too

I  published my Spanish-to-English transformation engine at this address:

http://blogsite.com/public/item/268847

If you run this URL, avoid doing so in IE browsers – something about it isn’t well behaved. Calling this URL without any parameters will automatically select and transform a sample BSC file that I hosted here. It is the raw, native Spanish version of a BsC file.

If you want to pass your own BsC file to this transformation tool, you have to place it on a web server of some type and then add the parameter as shown in this example.

http://blogsite.com/public/item/268847?xmlFile=http%3A%2F%2Fblogsite.com%2Fdocs%2Ftest.xml

Note that the URL for the BsC XML file is URL encoded. This is important and if you don’t know how to encode URLs so that they can be passed as URL parameters, this free online tool will help you. You can also use DropBox as a temporary web server. Just use the public folder feature in DropBox to store BsC files that you want to pass to this transformation engine. DropBox also provides a feature in its web interface to copy the public URL to any file you’ve uploaded.

So that’s it for today – you now have the tools to see what BsC generates in terms of XML content from an English perspective. Part two of this series will provide a number of examples for leveraging BsC XML in real situations.

Stay tuned…

Enhanced by Zemanta
Advertisements
This entry was posted in Articles about Business Intelligence, Integration, New in Balanced Scorecard for iPad and tagged , , , , , . Bookmark the permalink.

One Response to Integrating Balanced Scorecard for iPad Using XML

  1. Pingback: Integrate BsC Data With Google Docs Using XML | bscipad

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s