One of the great things about StyleVision is the flexibility that it affords. With StyleVision you can
design visually sophisticated stylesheets and reports for output to multiple formats including HTML, PDF, and Authentic electronic forms. Now StyleVision makes it even easier to accommodate different formatting needs in a single design with dynamic selection of CSS files – a new feature introduced in
StyleVision 2012.
Although you can still manage virtually all formatting tasks from the StyleVision design itself, dynamic selection of CSS files means that you can create a single template for use in multiple situations. To demonstrate, we’ve created an invoice for the fictional Nanonull Corporation for which the design changes based on the number of days that have elapsed between the invoice issue date and the due date. Although we could have used XPath to change the formatting of each element based on the number of days that have elapsed, in this case it is more efficient to create individual CSS files that apply to different scenarios.
Below is the invoice that we designed in StyleVision. Notice that beyond the bold headings it is almost devoid of formatting – we’ll be applying formatting based on the number of days that have elapsed between the invoice issue date and the due date via CSS files.
Now we can create our CSS files in XMLSpy, Altova’s XML editor with integrated support for editing CSS2 and CSS3.
First we’ll create a CSS file for invoices with due dates after the invoice issue date (i.e., invoices that are not overdue). Here we’ve simply created the body selector with a yellowish background and the Nanonull logo and a header class.
Now we’ll create a more elaborate CSS for overdue invoices. The body selector will include a past due image, the paragraph selector will have 20 point bold red font, and the header and small header classes will have red bold font in different sizes.
Now we can assign the CSS files to the StyleVision design and subsequently assign classes to different design elements.
In StyleVision, we simply click add new CSS file in the Design Overview and navigate to the CSS files we created in XMLSpy – StyleVision supports multiple CSS files in the same design.
Our design now looks like this – notice that formatting from both CSSRegular and CSSOverdue have been applied in StyleVision design view.
However we would like to assign the CSS file based on the distance between the invoice issue date and the due date. Therefore, we’ll right click on the arrow next to the CSS file in the Design Overview and choose Select One CSS File with XPath (below).
This will invoke the Select CSS File Using XPath dialog box (below). We can use XPath in this dialog box to select the appropriate CSS file based on dynamic input – here we’ve instructed StyleVision to use the CSSOverdue.css file if the invoice due date precedes the invoice issue date and the CSSRegular.css file in all other cases.
Here is the complete XPath we entered into the Select CSS File Using XPath dialog box above.
Now we can assign the classes defined in the CSS files to individual design elements in the StyleVision design.
Here we’ve assigned the paragraph containing the text “Invoice” to the class “header “ in the Styles pane – based on the contents of our CSS files this text will appear in red 20 point bold font for overdue invoices and black 20 point bold for invoices whose due date is in the future.
Likewise, we’ll assign the invoice due date to the class “small header.”
Now we’re ready to preview the invoice.
Below is the HTML preview for an overdue invoice – note that the text “Invoice” and the due date are in red bold font and that Past Due image is stamped in the middle.
Now let’s look at the same invoice with a due date in the future – note the yellow background, Nanonull logo, and that “Invoice” and the due date appear in black.
The ability to select a CSS file based on dynamic input opens up a wealth of possibilities and makes your StyleVision designs even more adaptable. With this feature, you can make formatting changes on the fly via the CSS files associated with a design – especially handy for designs with many elements.
Created a great project using the StyleVision stylesheet and report designer or any of Altova’s other tools and want to show it off? Please share your story with other Altova users by commenting on this blog post.
If you think it would make a great case study please visit the
Altova case studies page – if we use your story you’ll receive a $200 Amazon gift card. We’d love to hear from you!
Trick or Treat with Altova at DevConnections!
Altova MissionKit 2013 provides specialized functionality for Microsoft developers and IT pros, including seamless integration with Visual Studio®, C# and C++ code gen
eration, powerful functionality for SQL Server® database management and reporting, integration with SharePoint® Server, functionality for working with Open XML (OOXML), diff/merge for Word documents, and much more.
While you are at our booth, don’t forget to enter our drawing for a chance to win a free Altova MapForce Basic Edition license. If you also mention that you saw this blog post – we might have a special treat for you too!
Do You Believe in (XML) Magic?
One of the most exciting features in our recent Version 2013 release is Smart Fix XML validation in XMLSpy. Smart Fix is so magical it can revolutionize XML validation as we know it. While the XMLSpy validator has always been powerful, with new features added often, Smart Fix really delivers the “wow” factor: automatic error correction.
Read more…
Using Table Row and Column Conditions in StyleVision 2013
The ability to conditionally hide table rows or columns has been a popular feature request from StyleVision users. StyleVision 2013 adds the capability in the form of conditional expressions on table rows and columns. Conditional processing can be set on individual columns and rows of static and dynamic tables, as well as on column and row headers, to display or hide the column, row, or header depending on the truth of the condition. The conditions are specified using StyleVision’s XPath Expression editor. If a condition evaluates to true, the column, row, or header is displayed; otherwise it is not (i.e., is hidden).
Let’s take a look at some scenarios for which this new feature is exceptionally useful.
Read more…
Watermarks in StyleVision 2013
Watermark support has been added in StyleVision 2013, in response to customer requests. A watermark is text or an image that is displayed on the background of each page of a document section. Watermarks are often used in draft and confidential documents in order to emphasize a document’s status or security constraints.
In StyleVision 2013, watermarks may be used for print-oriented output formats, including PDF, RTF, and Word (Open XML). In keeping with StyleVision’s overall design model, with a single layout design used for multiple output types, you only need to define watermarks once, and they are applied to all print-output views.
Here’s an example of a StyleVision design containing a watermark:
Let’s take a look at the steps involved in using watermarks in StyleVision 2013 by modifying the QuickStart example (quickstart.sps) included in the Tutorials folder (installed with StyleVision), in order to produce the design shown in the image above.
In the Design view, if you select “Edit Properties” in the Initial Document Section, you’ll see a new “Watermark…” button. Clicking the button presents the Edit Watermark dialog:
StyleVision supports both image and text watermarks. For both types of watermarks, the general idea is to specify:
· A condition used to determine when the watermark should be included (which can simply be “true()” in order to include the watermark on all pages)
· The watermark content (image or text, with related attribute setting preferences)
· Watermark size and position settings
For our example scenario, let’s assume we want to place a red “CONFIDENTIAL” text watermark across printed pages. To do so, we click the Text tab in the Edit Watermark dialog and:
· Enter “true()” for the condition
· Enter “CONFIDENTIAL” for the watermark text
· Select red for the watermark color
StyleVision’s support for watermarks is powerful and flexible. You can include both text and image watermarks, for example, with different XPath conditional expressions used to specify what should appear when. You can also specify different watermarks (or pairs of image and text watermarks) for each document section in a StyleVision design.
Check out watermark options and the other new features in StyleVision 2013 by downloading a free 30-day trial version today!
Visit us at Oracle OpenWorld next week!
Fall is here, which must mean we are off to San Francisco, CA for the 2012 Oracle OpenWorld show. If you are planning on attending come by and see Altova at the Moscone center from Sept. 30th – October 4th in booth #3408 for a demo of Altova’s tools for Oracle Users and see the amazing new features in the newly released Altova MissionKit 2013!
While you are visiting our booth tell us about your latest projects and challenges, collaborate on best practices or let us show you some of the latest and greatest features available in MissionKit 2013, like Smart Fix XML Validation in XMLSpy, mapping SQL stored procedures in MapForce, watermark support in StyleVision, or our seamless integration options in Java applications. Don’t forget to enter our drawing for a chance to win a free Altova MapForce Basic Edition license!
Stored Procedures in Database Mappings
In response to user requests, the new release of MapForce 2013 includes robust support for stored procedures in database mappings as:
The screenshot below shows the mapping of a stored procedure in SQL Server to create an XML file.
Read more…
Altova MissionKit 2013 with Smart Fix
Altova Software Version 2013 was released today, and, as always, numerous features in this year’s autumn launch have been developed in response to customer requests. You asked for the ability to use SQL stored procedures in MapForce data mapping projects, to embed XSDs in WSDL documents in XMLSpy, to add watermarks in StyleVision, and to integrate MissionKit functionality flexibly in Java applications. All those features and more are there in Version 2013. We’ve also added some features that can only be described as magical. Let’s take a look at the highlights…
Read more…
Have you ever wanted a schema for Apache Ant?
Recently I was having some issues with the Ant files for a software project I was working on. I was editing one of them in XMLSpy but wasn’t getting entry help or code completion because I didn’t have a schema assigned to my script.
That seemed like a simple problem, so off I went looking for the schema.
I quickly found a Stack Overflow question looking for the same thing. The answer turns out to be, there is no Ant schema or DTD. The reasoning is straightforward. Above the challenge of making a flexible and comprehensive model of the Ant core, it would be able to include all the external tasks.
I immediately remembered that I’d been here before a couple years back, but this time I figured I’d use XMLSpy’s schema generation feature to try to do something about it…
Read more…
FlowForce Server Beta 3 is Now Available
MapForce 2012 users who need to automate data transformations in a centralized environment are enthusiastic about FlowForce Server, the new server product from Altova that automates execution of MapForce data transformations. Now we are pleased to announce the release of FlowForce Server Beta 3, offered as a free public beta test to all licensed users of Altova MapForce 2012 Enterprise Edition and MapForce 2012 Professional Edition.
The beta test period for FlowForce Server Beta 3 is extended until March 31, 2013.
FlowForce Server Beta 3 adds support for remote job requests via an HTTP client and job parameters that can be passed to any step in a job. When used together with the request interface, job parameters empower the HTTP client to specify input values in the job request.
FlowForce Server Beta 3 also permits any job to be called as a step within another job, implements individual job queues that make it possible to control server resources used by jobs, and adds many more refinements and enhancements.
FlowForce Server Beta 3 is available in a 32-bit version and a 64-bit version. The 64-bit version allows the MapForce Beta 3 module to process extremely large data files and provides compatibility with 64-bit database drivers.
Click here to read more about FlowForce Server Beta 3 at the Altova Web site, or visit the FlowForce Server Beta 3 download page to get started automating data transformations in your data center!
XML Summer Fun
Aloha! Summer is the time to hang loose, get some sun, and recharge your XML knowledge. Altova offers free, self-paced, Online Training in XMLSpy, MapForce, and StyleVision. We also have technology specific training in XBRL, XSLT, and HL7.
Don’t be a poser when your bro’s talk up XSLT transformation. Our classes will let you brag about some cherry surfing through gnarly XPath code.
XML getting you bummed? Brush up on XMLSpy techniques to ride a fat wave to a juicy completed project. Let MapForce put your data in the best form for your project and make your output major with StyleVision.
Don’t get cranked by the tax code. Use our XBRL training to become the Big Kahuna and shoot the pipe to the Surf Shack of Standards Compliance.

Grab your board, and surf over to Altova Online Training to catch some sweet knowledge.
You’ll say “Mahalo, Altova!”
Web Service as a Look-Up Table to Refine GPS Data
Elevation data recorded by GPS devices is notoriously inaccurate, especially in hilly terrain like the Russian River Valley example from our earlier post.
The final elevation track plotted from the Russian River Valley GPX file is suspicious for several reasons. First, the graph shows we descended almost 50 feet below sea level. That’s hard to believe, since we were travelling along the bank of the river, only about 10 miles from the Pacific Ocean.
We can evaluate the recorded GPS elevation data by comparing it to information available from the United States Geological Survey (USGS). The USGS operates a Web service that accepts latitude and longitude coordinates, and returns elevation data measured by NASA and assessed for accuracy based on over 13,000 control points in the continental United States.
Using the elevation Web service in an Altova MapForce mapping will let us extract each point from the GPX file, send the coordinates to the USGS Web service, and build a new GPX file with corrected elevation data.
Read more…
We will be at TechEd! Will you?
If you are attending TechEd, stop by our booth to see the latest features in the Altova MissionKit 2012r2, which include EPUB editing and validation in XMLSpy, sorting of data mapping results in MapForce, generation of code from UML sequence diagrams in UModel, RichEdit functionality in StyleVision and Authentic and much more! We hope to see you next week.
New Case Study: Automating XBRL Data Collection and Processing
Case studies are a great way to see how other organizations use Altova® technologies to develop unique projects that meet their business goals. We’re often asked, however, what comes next. Did the project take off? Has it grown since the case study was published?
We’re happy to bring you a follow up to a case study we published last year about the not-for-profit Maryland Association of Certified Public Accountants (MACPA).
In the original case study, MACPA converted General Ledger and other financial data from siloed systems into XBRL – in house and on a budget – with the Altova MissionKit®. At that point, they were mapping the XBRL file to multiple external targets, including an Excel spreadsheet used to feed their Key Performance Indicators (KPI) system. (You can read the original XBRL case study here.)
Since that time, they’ve built on the foundation they created and developed a business intelligence dashboard driven by the XBRL files they generate in MapForce®. They used Altova FlowForce®, an application designed to automate the execution of MapForce data transformations and other tasks on servers, virtual machines, and workstations, to automate the XBRL data collection and processing. Now the most recent data is available across the entire organization for custom reporting.
You can read the follow-up to the original XBRL case study here.
Read more about how they did it. Read more…
Versiones en español de XMLSpy, MapForce y StyleVision
Nos complace anunciar que, a partir de la versión 2012 Release 2 SP1, las aplicaciones XMLSpy, MapForce, StyleVision y el conjunto de aplicaciones MissionKit for XML Developers están disponibles en español. También en español está ya el sitio web de Altova.
Estas versiones en español amplían nuestra oferta de versiones traducidas, que ya incluye productos en inglés, alemán, japonés y chino.
Para descargar la versión en español de XMLSpy, MapForce y StyleVision o el conjunto de aplicaciones MissionKit for XML Developers, sólo tiene que seleccionar la opción “Spanish/Español” del menú desplegable de selección de idiomas. Con su actual código clave de licencia puede desbloquear cualquier versión traducida del producto que adquirió. Si lo prefiere, también puede descargar una versión de prueba gratis de 30 días de duración.
Spanish Language Versions of XMLSpy, MapForce, and StyleVision
We’re excited to announce that, starting with Version 2012 Release 2 SP1, Altova XMLSpy, MapForce, StyleVision, and the MissionKit for XML Developers are now available in fully localized Spanish language versions! Much of the Altova Web site is now available in Spanish, as well.
Spanish is latest addition to our growing list of localized options including English, German, Japanese, and Chinese.
To download the Spanish version of XMLSpy, MapForce, StyleVision, or the MissionKit for XML Developers, simply select Spanish from the language selector. Your existing license key code will unlock any language version of your purchased product(s). You can also download a free 30-day trial at any time.
Resist Data Integration Redundancy
The Internet makes massive amounts of data available for lots of interesting applications. But whenever you design a unique analysis and presentation of information you don’t privately control, you risk that the owner will offer the same view at some point in the future, instantly making your application redundant.
That’s exactly what happened to the Groupon API data-mining project we originally wrote about in August, 2011. Fortunately, the core of our project is a MapForce graphical data mapping. We can quickly and easily tweak the mapping and repurpose it to present an entirely different data set that provides new value.
Read more…
XPath Enhances XML Reports
In our previous post on Creating Elegant Reports for GPS XML Data we used an XPath expression to select nodes from an XML document for an elevation line chart. You can also use XPath to compute values. Altova StyleVision includes strong support for XPath, and we can write XPath expressions to add interesting information to our GPS XML reports. For instance, we can process the elevation data stored by the GPS device in meters to plot a chart showing the elevation in feet above sea level instead.
Read more…
Creating Elegant Reports for GPS XML Data
In our earlier post on XML for Global Positioning Systems, we mentioned that adventurers and athletes might want to use XML data from their devices to keep a record of their trips, or even training sessions leading up a marathon or other special event. Several colleagues responded by offering example files!
Looking through all this data, we realized that plotting elevation changes over time would show interesting results for many activities. We used XMLSpy to create this customized line graph directly from the XML data to show elevation vs. time for an afternoon of bicycling through California wine country. We even applied the vineyard photo as a background image right from the XMLSpy chart settings dialog.
Whenever you want to elegantly present data from multiple XML data files based on the same XML Schema, Altova StyleVision is the tool that lets you design a richly featured stylesheet for repeatable output in HTML, RTF, PDF, or Microsoft Word formats. Here’s how we did It for our GPS XML data:
Read more…
Transforming a Plain Layout in StyleVision
Altova Online Training’s newest course, XSLT Technology, leads the student though several transformations of XML data into new formats. Even with all the transformations performed in the class, there are some transformations that did not make it into the final edit.
In Chapter 4 of the XSLT Technology training, I walk students through the process of creating a flyer for the play “Hamlet” using StyleVision. The source content is in XML, and StyleVision autogenerates the XSL stylesheets required to render it into HTML, PDF, and Word, based on our design.
I asked the Altova Art Department to spruce up my design, and, while I did not end up using the nicer design in the training, I wanted to show how to turn my plain flyer into the Art Department’s vision.

Let’s explore the transformation.
Read more…
FlowForce Server Beta 2 is Now Available
The beta test period for FlowForce Server Beta 2 is extended until September 1, 2012.
FlowForce Server Beta 2 adds robust access control to segregate jobs and related data files, so departments can work independently without seeing or overwriting each other’s data. Access control functionality includes defined Users and Roles, Privileges, and Credentials, all managed by FlowForce Server Administrators.
FlowForce Server Beta 2 also includes Web interface enhancements to provide more status information about job schedules, active triggers, and more.
FlowForce Server Beta 2 is available in a 32-bit version and a 64-bit version. The new 64-bit version allows the MapForce Beta 2 module to process very large data files and provides compatibility with 64-bit database drivers.
Click here to read more about FlowForce Server Beta 2 at the Altova Web site, or visit the FlowForce Server Beta 2 download page to get a copy of the installers for yourself!
Come Visit Altova this Spring at FOSE!
If you are attending FOSE, stop by our booth to see the latest features in the Altova MissionKit 2012r2, which include EPUB editing and validation in XMLSpy, sorting of data mapping results in MapForce, generation of code from UML sequence diagrams in UModel, RichEdit functionality in StyleVision and Authentic and much more.
Visit Altova at DevConnections!
We would love to see you there, where we will be showcasing the entire suite of tools found in the Altova MissionKit. Altova MissionKit 2012r2 products provide specialized functionality for Microsoft developers and IT pros, including seamless integration with Visual Studio®, C# and C++ code generation, powerful functionality for SQL Server® database management and reporting, integration with SharePoint® Server, functionality for working with Open XML (OOXML), diff/merge for Word documents, and much more.
Building Web Pages – HTML Design with StyleVision
The rapid pace of today’s business environment means that information – along with the format in which it is required – changes often. Although some Web pages contain content that doesn’t often change (e.g., About Us and directions pages), the majority of today’s corporate Websites are continually updated with new data.

For this reason, many organizations choose to store Web content in XML. This allows organizations to develop content in a highly efficient manner because information in the XML file can be used for multiple purposes and in multiple output formats – the XML Schema associated with the XML file describes the content model.
StyleVision is a powerful stylesheet and report designer that can help you leverage XML. StyleVision will allow you to build Web pages with sophisticated formatting in a template-based, drag and drop design window. StyleVision auto-generates XSLT stylesheets so that you can integrate your design into a new or existing site – you can even generate ASPX Web applications right from the File menu.
In this post we’ll design a Web page that will show off some of StyleVision’s HTML formatting capabilities. Although StyleVision’s built in formatting capabilities allow you to create sophisticated designs via simple drag-and-drop, for this example we’ll use CSS3, images, and other standard design elements to create a Web page that doesn’t need to be reformatted when content changes.
Read more…
The Global Positioning of XML
XML is everywhere. If you don’t believe it, get a USB cable and connect a GPS device to a computer, then browse for any file with the extension .gpx. We quickly found a 2 MB file named Current.gpx on a Garmin GPS. Opening it in XMLSpy reveals XML data and an XML Schema assignment at the top.
Scrolling through the body of the file displays numerous <trkpt> tags that record latitude and longitude along with <ele> and <time> tags reporting the elevation, date and time at that location.
Any place you may go in the world, XML is there to tell you where you are.
Read more…
New! XSLT Technology Training
We’re excited to introduce our new XSLT Technology training as the latest Altova Online Training offering. As with all our trainings, XSLT Technology is released as a free, self-paced course, available online, so students can fit it into their busy schedules.
XSLT transforms XML data into other formats, and this course will transform a beginner XML student into an advanced user. Intermediate and advanced students will gain valuable techniques to add to their XML toolkits.
Read more…
Release 2 of the Altova MissionKit 2012
It’s an exciting week here at Altova! We have several new offerings to tell you about, including Release 2 of the Version 2012 Altova MissionKit and entire product line, a new Altova Online Training course on XSLT Technology, and a new service called Altova Product Consulting.
Let’s start with what’s included in the latest product release. Version 2012 Release 2 delivers a host of the new features that have been most frequently requested by our customers, including support for EPUB 2.x, sorting of data mapping results, RichEdit functionality for Authentic eForms, code generation from UML sequence diagrams, and much more.
Version 2012 Release 2 Highlights
EPUB As the demand for e-books and other digital publications has exploded, so have the number of requests we’ve received from developers who need an easy way to create and edit these documents in XMLSpy 2012. In Release 2 we’ve added support for EPUB® (electronic publication), the open standard for e-books from the International Digital Publishing Forum (IDPF). It’s easy to view and work with the various files that make up an EPUB document in XMLSpy’s Archive View, which supports creating, editing, validating, and previewing EPUB digital publications.
XMLSpy already provides validation and support for editing XML, XHTML, CSS, and other standards-based files that comprise EPUB documents, making it a natural choice for creating and working with EPUB content. Check out all the new features in XMLSpy. Sorting for Data Mapping Projects Another frequently requested feature is the ability to sort data in mapping projects where the final output format needs to be ordered differently than it was in the input. MapForce 2012r2 includes two powerful new sorting features that you can apply in a variety of ways. The screenshot below shows a new function that performs a multi-level sort on the source data before writing the output file:
Another option is available for sorting relational input. MapForce users have long been able to sort database data through ORDER BY statements in SQL queries. However, SQL queries that operate inside the database are not always sufficient for complex data mapping tasks. MapForce 2012r2 adds additional database sorting functionality to the existing MapForce SQL-WHERE component to become SQL-WHERE/ORDER, which is especially useful when database input requires additional processing that cannot be accomplished in a SQL query, or other data or conditions can impact the sorted order of data rows.
Read more about new MapForce features. Other important features added in R2 include RichEdit functionality for Authentic eForms created in StyleVision, code generation from UML sequence diagrams in UModel, support for logical files in IBM® iSeries® databases across the product line, and much more.
Upgrade Info
Check out the rest of the features added in Release 2. This new version is free to download and install for customers with Support and Maintenance. If you’re not already an Altova customer, you can download a free, fully functional 30-day trial.
XSLT Technology Training
We are thrilled to announce the latest Altova Online Training course, XSLT Technology. This free, online, self-paced class introduces students to the concepts of XSL, XSLT, XPath, XSL-FO, and more, through guided tutorials and videos. You can practice working with these technologies using the tools of the Altova MissionKit to transform XML to XML, to HTML, and to PDF.
Altova Product Consulting
Have you ever wished you could purchase a few hours of a product expert’s time – whether you need to determine if a particular tool could solve your problem, or need help creating a schema or mapping project, or simply require in-depth product support? We’ve heard from a lot of customers with this very requirement – and in response we have created Altova Product Consulting. Altova’s Product Consulting engineers are experts on Altova software and related technologies. Services include determining if an Altova product meet the needs of a particular project, creating a MapForce mapping file (.mfd), designing a StyleVision design (.sps), and so on. Unlike typical complicated consulting engagements, Altova Product Consulting services are sold per hour, the allotment of which is agreed upon in advance, so there are no surprises. Get more information on specific services provided, pricing, and how to get started.
Model Driven Architecture with Altova UModel
For Version 2012, UModel introduces Model Driven Architecture (MDA), with platform-independent models and a Model Transformation feature that transforms all code relevant modeling elements to and from UML, C#, Visual Basic, Java, databases, and XML Schema. Model Transformation A Model Driven Architecture approach to software engineering with platform independent models provides two primary advantages:
Users can even apply model transformation to projects that were reverse engineered from existing source code. For instance, an existing Java application can be reverse-engineered by UModel then transformed to generate Visual Basic classes, and many other possibilities are available.
Platform Independent Models Model Driven Architecture is a set of standards and methods for applying the UML (Unified Modeling Language) administered by the Object Management Group. In Model Driven Architecture, the UML model of a software project is a platform independent model (PIM) that can be fully described without concern for the details of any specific programming language. This development strategy allows software architects and other developers to focus exclusively on logic required by the subject domain, rather than characteristics of any programming language. Data Type Mapping During model transformation, UModel maps data types from the source to the target to accommodate differences between languages. The Type Mapping dialog lets you review or even edit type mapping pairs.
UModel also automatically adds the target language profile to the transformed project. UML Class Diagrams As part of the model transformation, UModel creates new UML classes and class diagrams for the target, reflecting classes and class diagrams in the original project. The screen shot below shows the Hierarchy of Account diagram for Visual Basic after model transformation from Java. The new Account class in the new folder named VB Target in the model tree contains Visual Basic syntax for all properties and operations. For instance, the new balance property is defined as the Visual Basic Single data type, whereas in Java the data type was float. After transformation, the original Account class for Java is preserved in the model in its original location in the model tree. The original UML design for Java will now generate code in multiple source code languages – Java and Visual Basic.
Persistent Transformation Parameters The transformation paradigm extends to updating existing transformations and merging the updates into the specified target models. Transformation parameters are stored in a Model Transformation Profile in the model. The Transformation Profile can be set to run transformations automatically before forward engineering code generation, and/or after reverse engineering, to update elements for one target language based on changes to model elements for another.
These Transformation Profile settings can also be changed at any time.
This functionality lets UModel automate much of the maintenance of multiple source code languages as your cross-platform model evolves. If you’d like to try out Model Driven Architecture and model transformation with UModel 2012, you can download a free 30-day trial.
Data Exchange for the Mobile Workforce
Data Exchange for the Mobile WorkforceOrganizations have been forced to adapt many of their internal business processes to accommodate an increasingly mobile workforce. Although there are technological solutions that address many of today’s communication needs, the plethora of different document formats in use – even within the same organization – means that some tasks remain vexing. For example, how does an organization remain flexible enough to facilitate the exchange of data among mobile workers yet retain the ability to bring that data into internal IT systems? Altova offers an inexpensive solution with StyleVision®, a graphical stylesheet and report designer with electronic forms capability, and Authentic®, a WYSIWYG XML and database editor in which end users can view and edit electronic forms created in StyleVision. The Authentic Community Edition is available from the Altova Web site as a free download so that anyone can be brought into your workflow, whether they are internal or external to your organization.
In this post we’ll present a sample case showing you how to create an electronic form that mirrors an existing paper form (in our example it is a reimbursement form) and then we’ll follow it as it makes its way around a fictional organization. Please note that the example we use here is simplistic and was designed only to illustrate the process of developing and deploying an electronic form. Although you can add additional data sources and perform validation and other complex functions in StyleVision, we have not illustrated these here.It is extremely easy to design electronic forms in StyleVision. To start, we simply select New – New from XML Schema/DTD/XML … from the File menu, browse to an XML Schema file, and select the type of design we’d like to create. For this example we created an XML Schema and instance file in XMLSpy, Altova’s XML editor and development environment, based on the fields on the paper reimbursement form. You can also base a StyleVision design on a database or XBRL taxonomy.Below is a copy of the reimbursement form we will be using along with the XML Schema we created.
Once we select the XML file in StyleVision, we are prompted to select either a free-flow or form-based document. In a form-based document all design elements (e.g., text boxes for user input, images, buttons) are fixed in position – ideal for data entry forms.When we create a form-based document, we can upload a “blueprint image” so that we can recreate a paper-based form exactly as it was originally designed. This is the option we’ve selected below. The image will appear in the background of the design window and we will simply place design elements on top of corresponding elements on the form. Of course, the blueprint image overlay does not appear in the final output.
The screenshot below shows the blueprint image as it appears in the design window in StyleVision – how cool is that?
Now, using the Insert menu at the top, we can simply insert design elements onto the blueprint image in the design window.Available design elements include form controls (e.g., input boxes, combo boxes, radio buttons), images, tables, charts, and “layout containers” for exact positioning.We’ll start by adding input fields to capture employee information (i.e., First [Name], Last [Name], Title, etc. from the top part of the form). Once we click Insert – Insert Form Controls and select Input Field, the Insert Design Element dialog box appears.We have highlighted the First [Name] element in the dialog box below – the input field will now be associated with the First element. This way, when the end user types data into the input field and saves the form, this information will populate the First [Name] element in the XML file.
We now add design elements throughout the rest of the form, associating input fields with their respective elements from the XML file.When we are finished adding input fields, a logo, lines, a table for the expense items, and labels, the design looks like this – we’ve set the opacity attribute for the blueprint image to 0 to make it easier to view the design elements. Please note also that we’ve done some additional design work such as adding calendars in date fields, drop down boxes, and a currency sign that changes according to user input. For more information about fine tuning your form please see the StyleVision User and Reference Manual in the StyleVision application.
We can preview how the end user will see the form we designed in StyleVision by clicking on the Authentic eForm tab at the bottom of the design window (below). Note that the end user is prompted to enter data directly into each data input field. We accomplished this by placing the prompts (e.g., Insert First Name) in between the relevant tags in the XML file associated with our design. The end user simply highlights the prompt and replaces it with text.
Once we are finished designing the reimbursement form we can save the entire design – including the XML Schema and instance files, images, and any other associated files – in a single PXF® (Portable XML Form®). Saving the design as a PXF will enable us to email the form along with data updated in the underlying XML form among people both inside and outside the company’s LAN.
Once we hit OK we are prompted to select the files to include in the PXF. Notice that we’ve selected HTML, RTF, PDF, and Word 2007+ under the Generate and store XSLT files … heading. This will allow an end user to generate the form – with data – in these formats directly from Authentic.
Now that we’ve saved it in a PXF, the electronic form we designed in StyleVision is ready to be deployed in a business environment.In our example, we have a team of salespeople working across the globe who need to request reimbursement for business and travel expenses incurred. The salespeople complete expense reports, forward them to their managers for approval, and then send approved reports to the corporate office so that the information can be added into the accounting system.The PXF makes this easy.Once a salesperson is ready to complete a reimbursement request, she simply opens the PXF in Authentic and can immediately begin entering information onto the form. Below is a screenshot of a reimbursement form that has been completed in Authentic – notice that the form still needs a manager’s signature.
Now the salesperson must send it to her manager for approval. It’s easy to initiate an email with the form attached directly from Authentic.
Once the manager receives the email, she can simply double click the attachment and it will open in Authentic. Here the manager has clicked the Approved check box and added her name and the date.
The manager can then email the updated PXF back to the salesperson, who in turn emails it to the corporate office so it can be imported into the accounting system for processing. Our fictitious corporate office of course receives hundreds of reimbursement requests each day and has established a process for importing them into the relevant Oracle databases in the accounting system.We’ll use Altova MapForce, a graphical any-to-any data mapping, conversion, and transformation tool, to populate the corporate database with the data from the quotations. After setting up the mapping, we’ll automatically generate code from MapForce so that we can automate the transformation either through batch processing or a real-time conversion.First we’ll set up the mapping.We’ve inserted the XML file ExpRpt which we’ve extracted from the PXF into the left side of the MapForce design window and then inserted the Oracle database on the right side of the design window.Now we can drag and drop fields from the XML file with the reimbursement data into the Oracle database. We can also transform data, as we’ve done with the Approved element. Here we’ve used the built-in boolean function to convert the string value stored in the XML file (“true” or “false”) into the numeric equivalents (1 or 0). We can also create our own functions.The mapping we’ve created appears below.
Please note that this post offers a very broad overview of how to use both StyleVision and MapForce. Please visit the online training section of the Altova website for more in-depth instructions on how to use these and other Altova products.And there you have it. With the PXF, the fictitious Nanonull Corporation allows a group of far flung sales reps and their managers to easily exchange and edit information via electronic form. The PXF also provides a way for Nanonull to populate the accounting database without offering these employees direct access to company IT systems. All without busting the IT budget.
What could your organization do with a flexible, portable interactive document? Please share your ideas with other users by commenting on this blog post. Have you used StyleVision or other Altova products in an interesting project and think it would make a great case study? Email us at marketing@altova.com. We’d love to hear from you!
Intuitive User Interface Features
Here at Altova we like to share user interface features across products to give the MissionKit a consistent look and feel, and to help users leverage experience gained using one tool to get up to speed more quickly with the others. In version 2012 we introduced new visual alignment guides in both UModel and MapForce to make it easy to work very rapidly, yet still produce a neat, organized result that communicates effectively with other team members. As users drag elements in the diagram window, alignment snap lines appear automatically to allow any component to align with any other component.
In the UModel class diagram shown above, the developer has collapsed the properties and operations compartments to concentrate on class associations. As the CheckingAccount subclass is dragged upwards on the screen, a visual alignment guide appears and offers instant snap-to alignment with the other subclasses of the Account class. Complex data mappings in Altova MapForce might include dozens of components, functions and constants, and visual alignment guides can help organize the mapping view. In the screenshot below, the developer used alignment guides to collect split-name functions together, while concat functions are aligned in a separate group.
Constructing the mapping diagram this way can greatly clarify the developer’s intent when multiple complex string manipulations are needed! Of course, aligned components also improve the value of printed diagrams that become part of the permanent documentation for UModel and MapForce projects. We also understand that not everyone likes to work the same way. If you prefer not to see guide lines and to turn off automatic alignment, this feature can be deselected in the Tools / Options menu selection in both UModel and MapForce. If you’d like to see for yourself how intuitively tools in the Altova MissionKit 2012 work together, click here to download a free trial!
Get More Mileage from Your StyleVision Designs with Dynamic Selection of CSS Files
Although you can still manage virtually all formatting tasks from the StyleVision design itself, dynamic selection of CSS files means that you can create a single template for use in multiple situations. To demonstrate, we’ve created an invoice for the fictional Nanonull Corporation for which the design changes based on the number of days that have elapsed between the invoice issue date and the due date. Although we could have used XPath to change the formatting of each element based on the number of days that have elapsed, in this case it is more efficient to create individual CSS files that apply to different scenarios.
Below is the invoice that we designed in StyleVision. Notice that beyond the bold headings it is almost devoid of formatting – we’ll be applying formatting based on the number of days that have elapsed between the invoice issue date and the due date via CSS files.
Now we can create our CSS files in XMLSpy, Altova’s XML editor with integrated support for editing CSS2 and CSS3.
First we’ll create a CSS file for invoices with due dates after the invoice issue date (i.e., invoices that are not overdue). Here we’ve simply created the body selector with a yellowish background and the Nanonull logo and a header class.
Now let’s look at the same invoice with a due date in the future – note the yellow background, Nanonull logo, and that “Invoice” and the due date appear in black.
XML Editor Supports HTML5 and CSS3
The Altova MissionKit Web tools received an important update with our recent Version 2012 release: support for HTML5 and CSS3. You’ll find support updated to include the most recent versions of these Web standards in both XMLSpy 2012 (and higher) for code editing and StyleVision 2012 for graphical stylesheet and report design.

Let’s focus on the HTML5 and CSS3 editors in XMLSpy here – StyleVision functionality will be covered in a future article.
HTML5 Editor
XMLSpy has long supported editing of HTML4 and, of course, XHTML – and now those intelligent coding features extend to HTML5.

If you’re already an XMLSpy user, you’ll immediately recognize the helpful syntax coloring, source folding, and line numbering in advanced Text View when you open your HTML5 file for editing. As you type, you’re presented with valid HTML5 element and attribute choices in a drop down menu as well as in static entry helper windows, so you can complete code in your preferred working style. At the same time, code completion helps you work faster while ensuring elements are closed properly.
These intelligent editing features are applicable to the version of HTML you’re working with – when you open an existing HTML5 document or start a new file from scratch, all the HTML5 elements and attributes are immediately available in the entry helper windows and drop down menu. Some of the most notable new elements in HTML5 include:
XMLSpy includes an integrated Browser View that lets you see the results of your HTML5 coding immediately. The Browser View renders your page using your installation of Internet Explorer directly in XMLSpy…


…but also allows you to immediately view your HTML5 Web page in an instance of any browser you have installed on your machine.
This allows for quick testing and debugging to ensure cross-browser compatibility.
To get an idea of how some of the new HTML5 features look in action, check out the simple HTML5 example document that is supplied in the XMLSpy 2012 Examples folder and linked from the Example project. To learn more about HTML, there are many excellent resources on the Web, including http://www.w3.org/TR/html5/.
CSS3 Editor
Working hand-in-hand with the HTML5 editor is the XMLSpy CSS3 editor, which also provides syntax coloring and entry helpers, as well as bookmarking and source folding in Text View.


A CSS Outline window displays an outline of the document organized by its selectors listed in groups. Each group can be collapsed and expanded, and clicking a selector in the CSS Outline highlights it in the document. CSS Properties and HTML elements entry helpers are shown in windows as well as context sensitive drop-down menus, and XMLSpy even includes screen tips that provide a definition of each property and its possible values as you type.
You can take advantage of XMLSpy’s integrated Browser View here, too, to see the results of your CSS edits immediately in a linked HTML page.
Why XMLSpy for HTML?
Sure, XMLSpy is known for all things XML, but it’s also a clear choice for HTML development. HTML5 and CSS3 editing in XMLSpy is facilitated by support for related technologies including XML, XSLT, WSDL, and others, as well as integrated project management functionality, support for popular version/source control systems, and Microsoft® SharePoint® Server integration – giving you all the tools you need to develop the next generation of Web sites and apps.
We’d love to hear how you’re using HTML5 now – please drop us a line by leaving a comment below.
New in StyleVision 2012 – Composite Styles for Enhanced Formatting
One of the more versatile features introduced in StyleVision 2012 is support for composite styles for output to RTF, Word, and PDF as well as HTML and Authentic electronic forms. This feature allows you to combine styles defined in an XML instance document with those you set in the report itself. You can also build a composite with XPath to control multiple style features of the same design element (e.g., font, background color, alignment).
Support for composite styles means that you can quickly and easily change the look of a design component by selecting an attribute from the XML instance file or by changing the XPath expression. This feature is used most often in cases where the XML document includes HTML fragments that contain style information – now you can use an XPath selector to extract style information from the HTML fragment and apply it directly to an output document.
Here for example we’ve used XMLSpy, Altova’s XML editor and development environment, to create an XML instance file containing the contents of a music library. (We also created the Schema in XMLSpy.)
The StyleIt attribute of the Recording element pictured below includes formatting instructions for this individual recording – according to our file the Fun Factory recording should be red and bolded.
Now we can move to StyleVision and start creating a design based on our XML instance document.
All we need to do to apply the formatting instructions in the XML instance document is to call the StyleIt attribute from the composite style drop down in the Properties pane in our StyleVision design.
The Fun Factory recording appears in red bold in the resulting output.
We can also choose to ignore the formatting instructions from the instance file and provide our own.
Here we’ve replaced the StyleIt attribute in the drop down list with an XPath if-then-else statement that assigns formatting based on an attribute of the Recording element called PlaylistCode – party tunes are in blue Papyrus 12 point font, easy listening favorites are in maroon Pristina 14 point font, and background music by default is in green Onyx 14 point font.
Here’s what the output file looks like now.
Support for composite styles is only one of the new styling features in the StyleVision 2012 stylesheet and report designer. Click here to read more about the new features across the entire Altova product line.
Have you used created a great project using the StyleVision stylesheet and report designer or any of Altova’s other tools? Want to show it off? Please share your story with other Altova users by commenting on this blog post. If you think it would make a great case study please visit the Altova case studies page – if we use your story you’ll receive a $200 Amazon gift card. We’d love to hear from you!
Announcing Altova FlowForce® Server Beta 1
Altova FlowForce® Server Beta 1 is an exciting new tool for execution of automated data mappings designed to provide comprehensive management and control over data transformations performed by dedicated high-speed servers, virtual machines, or even regular workstations, depending on the size of the task. To gather user input and accelerate product development, Altova is offering Altova FlowForce Server Beta 1 as a free public beta test to all licensed users of Altova MapForce® 2012 Enterprise Edition and MapForce® 2012 Professional Edition. Users employ Altova MapForce data mappings for two different types of data transformations:
While command-line execution, royalty-free code generation, and the MapForce API can assist with automation of repeated transformations, FlowForce Server Beta 1 provides much greater power and flexibility. FlowForce Server Beta 1 is a server-based tool with a Web interface that makes it much easier to implement, manage, or modify data transformation jobs in a busy data processing environment. FlowForce Server Beta 1 can administer multiple transformation jobs simultaneously, lets users define and adjust a variety of job triggers and actions on the fly, can perform housekeeping tasks like moving output files or cleaning up intermediate work, records detailed logs of all activity, and much more. FlowForce Server Beta 1 consists of four components that work together as illustrated in the diagram below.
The FlowForce Server continuously checks for trigger conditions, starts and monitors job execution, and writes detailed logs. MapForce Server is an implementation of the MapForce Built-in execution engine that executes mapping packages previously deployed via the MapForce graphical environment. The FlowForce Web Administration Interface is a standalone web application that runs in an internet browser and provides the front-end of FlowForce Server. MapForce Beta is an enhanced version of the Altova MapForce application with an integrated deployment feature to deploy MapForce data mappings to a FlowForce server package. Altova FlowForce Server Beta 1 is available immediately as a free public beta test to all licensed users of Altova MapForce® 2012 Enterprise Edition and MapForce® 2012 Professional Edition. Visit the FlowForce Server Beta 1 page at the Altova Web site for more information!
Processing the Groupon API – Epilogue
Rare edge cases can derail loosely coupled data mapping applications. This is especially true when you are consuming large datasets available over the Internet and have little or no influence over the source data. In this article we describe a debugging technique that lets developers working on data mapping and transformation projects quickly identify and accommodate unexpected data in a stream from a remote source. The Problem Last summer we wrote a series of blog posts describing how to work with the Groupon API to retrieve a subset of offers in all Groupon cities and format the list for a web browser or mobile device.
We concluded with a command line to run a MapForce data mapping that calls the Groupon API over 150 times — once for each Groupon city, then filters the data to extract deals sold on the Internet instead of a physical location, and formats the results in HTML using StyleVision. Every morning we run the command line in a batch file that saves the HTML output on a local server so our colleagues can check it out with any Web browser to find interesting offers from all over the country. The mapping ran fine for more than two months until one day it failed with this error message: “Source-value “” of type dateTime could not be converted into target-type dateTime.” The specific explanation is that somewhere in the mapping where we expected a dateTime, we received an empty value. On a more abstract level, the error suggests a potential defect in the logic of our mapping strategy. Every time we call the Groupon API we receive a well-formed XML data stream enclosed in a <response> element, but the API specs do not include an XML Schema defining the data that may be returned. When we developed our mapping we needed to analyze the raw data and select the output we wanted, so our first step was to call the API to capture all the Groupon deals for one large metro area. We assumed we would get a large enough data sample to include every possible option in the API response. After our mapping ran successfully for two months, the API finally delivered a rare edge case that did not fit the pattern we expected. Debugging Tools MapForce provides debugging help. We can run our data mapping using the MapForce built in execution engine to see more details in the Messages window.
The lines labeled Related location are hyperlinked back to components in the mapping where the error occurred. Clicking on the result error takes us to a format-dateTime function.
We can either click the “” error or trace the value connector to identify the input element to the format-dateTime function. Either way, we locate the element that triggered the error.
The suspect element resides in the input component that captures all the data returned by our calls to the Groupon API before any filtering or conversion takes place. When we designed the mapping, the endAt element in our sample data always reported the ending date and time for each Groupon offer, but for some reason we must have received an empty value in this field. If the error had occurred by running a local input file we could simply examine the file contents, but in this case the data came from multiple URLs, and is only held temporarily until it is mapped to the output component. Fortunately, we can apply a trick to easily modify the mapping and preserve all data received from the Groupon API. We simply copy the input component and paste a duplicate into the mapping. We can connect the response element from the original to the duplicate, which simultaneously maps all the child elements between the components.
Our original input component is now connected to two output components. We can select which output component will be generated by the MapForce built-in execution engine by clicking the eye icon at the top right corner of any output component. The new output component simply saves a copy of everything in the input component. When we examine the raw data using XMLSpy, sure enough we find an empty element where we expected a date and time:
The Solution Now that we know an offer might have no specific end time, we can plan for that possibility in the mapping. In the revised treatment of the endAt element, we do an if-test before the original format-dateTime function and provide an alternate output when the endAt element is empty.
We had to work fast because all Groupon data is time sensitive. The edge case would eventually expire and disappear from the data stream. This experience showed us how important it is to have powerful debugging tools and to use them creatively, even after you think a data mapping project is running successfully! Altova MapForce is available in a free trial – the next edge case you solve could be your own. Editor’s Note: Our original series on mapping data from the Groupon API ran in three parts you can see by clicking the links here: Part 1 of Processing the Groupon API with Altova MapForce describes how to create dynamic input by collecting data from multiple URLs. Processing the Groupon API with MapForce – Part 2 describes how we filtered data from the API and defined the output to extract only the most interesting details. Processing the Groupon API – Part 3 describes formatting the output as a single HTML document optimized for desktop and mobile devices, and reviews ways to automate repeat execution.
Analyze Football Statistics using the Altova MissionKit
In this article we use stats from NFL.com and ESPN.com to show how easy it can be to process and analyze online data in new ways – even when it uses different metrics and is only available in textual format. We have seen in previous blog posts how easy it is to gather data from the Internet that is widely available in XML formats. But what about interesting data that is available online but not in an XML format, or data that is buried in legacy data processing systems and only available in textual report format? One such example involves quarterback ratings. The NFL has used a Passer Rating that rates quarterbacks solely based on a passer’s completions, attempts, touchdowns, and interceptions. ESPN introduced a new rating system this year called the Total QBR (Quarterback Rating). The Total QBR incorporates more data, including an expected points average and a clutch play index, that ESPN claims gives a more accurate measure of a quarterback’s performance. Let’s compare the rankings that these system produce to see if we can garner some useful information. For this example we’ll be using the data importing and analysis tools of the Altova MissionKit to compare the ratings. If you want to try this out yourself, the MissionKit is available to download for a 30 day free trial from the Altova web site. You can access the files used in this example here. The first thing we need is the raw data to analyze. Let’s use the entire 2010 season as a data source. We can get the table with Passer Ratings from NFL.com and then copy and paste it as a new text file.
We can access a similar table of Total Quarterback Ratings from the ESPN web site and create a second text file.
We now have two text files with tables of data in different orders. The next step is to combine the tables into one file and generate charts. First, we need a schema file for the destination of the data. In XMLSpy, we can create an XSD file quickly, and graphically, to contain a series of QB nodes with child nodes of first and last name, team, passer rating and rank, and total QBR and rank.
Now, in MapForce, we open the text documents and use FlexText to parse the text and change it into a list of categories.
We then build a mapping file in MapForce to map the data from the text files to the destination XML file. Built-in functions make it easy to extract the first and last names from the Player string, and a value-map will change the team abbreviation to a string (ARI is changed to Arizona Cardinals, ATL to Atlanta Falcons, etc.). We set the Priority Context in the test of our filters to make sure we get the correct set of data for each unique quarterback.
Once we execute the mapping, we can save the resulting XML data file and use it as the source file in StyleVision to design a stylesheet. In this stylesheet, we create a table of the top ten ranked passers and charts showing the Passer Rating and the Total QBR graphically.
Now that we have a visual representation of the rankings of the two rating systems, we can examine their differences and try to see which works better. For example, Peyton Manning was tenth in passer rating, but was second in Total QBR. This can be explained by the Total QBR taking clutch points into account and knowing that Peyton Manning had a few late game comebacks in the 2010 season. Since we now have a collection of files (the XSD file built in XMLSpy, the FlexText and mapping files from MapForce, and the stylesheet design created in StyleVision), we can update the text data files easily to analyze new sets of quarterback data. Later in the season, we can update the text tables with 2011 data, and allow the data to flow through the mappings and into the stylesheet to update the charts and see the rankings for the current season. This example focuses on numbers from the NFL, but this method can easily be adapted to other data sets and data sources that are accessed as text files as well as in other formats. You can learn more about how to use the products in the Altova MissionKit by taking our free online training courses.
Mastering Paid Keywords
Anyone who manages paid keyword search knows it is hard work! You can look at vast reports of raw statistics and quickly get lost in trivia. At Altova we designed a better way to analyze and manage the performance data for our Google Adwords campaigns. We can creatively query the numbers to: · Quickly aggregate results for subcategories of campaigns, for instance by product, geographical region, or any other grouping · Easily identify trends over time The chart below illustrates these advantages by collecting data for a single Altova product – SemanticWorks – from multiple campaigns over six individual months.
Starting Out Like many keyword advertisers, we were viewing statistics in Adwords, downloading CSV files, then spending hours massaging and manipulating the data in spreadsheets to identify and format the information we required. We wanted more immediate and in-depth reporting of keyword performance while retaining full control of the process and managing everything internally. SQL queries of a database of keyword statistics offer a powerful and flexible alternative. In the remainder of this post we explain how the database design, data mapping, and reporting features of the Altova MissionKit can be applied to create an architecture to efficiently track paid keyword performance. Database Design Our choices were to implement a keywords database on an existing database platform already running in the company, an express edition of a commercial database, or an open-source database, since the Altova MissionKit works with SQL Server®, MySQL®, Oracle®, IBM DB2®, PostgreSQL®, Sybase®, and Microsoft® Access®. We chose SQL Server for our database platform. We connected with DatabaseSpy and used the graphical database Design Editor to create the table shown below.
Most columns correspond to fields in a keywords report. In order to store multiple rows for each individual keyword – one row for every month of statistics – the table also includes columns for the month and year. Populating the Table The Google Adwords online interface lets users create reports of keyword statistics of specific date ranges and download them as CSV files. We downloaded individual CSV files containing our performance data for each unique month. We used MapForce to map values from the CSV files to columns in the database table and insert the month and year data for each row.
The string functions at the bottom center of the mapping diagram remove percent signs and commas from fields we want to treat as numerical data. By doing this in the mapping, we don’t have to massage the columns of data in the CSV files before importing them. Since the CSV files for each month all have the same structure, the mapping needs only minor revisions to import each new month’s data: update the constants at the top that define the starting row id, month, and year. MapForce processes the mapping with its built-in execution engine, reading the CSV input and generating SQL INSERT statements for each row of data. MapForce then allows users to execute the entire generated SQL script by clicking a toolbar icon or from a selection in the Output menu:
Querying the Database Back in DatabaseSpy, we can query the database from the SQL Editor window. This query reports the top ten performing keywords for SemanticWorks in October 2011. For data privacy, some fields in the Results chart are hidden.
To get additional interesting results, the SQL statement can be easily modified. For instance, the ORDER BY line can sort for highest cost, most clicks, or any other characteristic. The WHERE statement combines data from multiple campaigns. The LIKE keyword treats the percent signs around SemanticWorks as wildcard characters to match any campaign with SemanticWorks anywhere in its name. Other queries could add a geographic identifier such as US or EU, or match on an entirely different column such as adgroup. Of course, all these options depend on a consistent and predictable campaign and adgroup naming system. We created a DatabaseSpy Project to collect all our favorite SQL queries for sharing and convenient reuse. Here is the query we used to generate the chart right in DatabaseSpy that appears at the top of this post:
This query goes beyond simple SQL reporting to perform calculations on a subset of the data and format the results. Database Reports We designed reports for the executive team using Altova StyleVision, based on the queries and charts we had already designed in DatabaseSpy. We simply copied our queries from the DatabaseSpy SQL Editor window and added them as sources in the StyleVision Design Overview window. Saving our report design in a StyleVision SPS stylesheet makes it is easy to regenerate an updated version every month. Here is the HTML output for a SemanticWorks Keyword Trends report based on the query above, displayed in the StyleVision Preview window:
If you follow the conventional wisdom for building your own paid keyword campaigns, you will develop segmented campaigns with many small, highly specialized ad groups, and you may also find yourself overwhelmed by the data in Adwords reports. If you’d like to try managing your own keywords the way we describe here, a fully functional trial of the Altova MissionKit is available.
DiffDog Takes to the Cloud
Techy folks generally have a good diff tool they rely on to compare and sync files and directories. But what happens when, as more and more info is bound for the cloud, your data lives on servers accessed via URL?
There are myriad applications today that live on servers accessed via HTPP – but let’s take a look at a common example: SVN. Subversion (SVN) repositories include WebDAV as a commonly used server option. WebDAV is a natural protocol for SVN because its concern is hierarchy, structured metadata, and versions. Since WebDAV is an extension of HTTP it gives easy access to basic information about files and folders to any HTTP-aware client, including DiffDog – Altova’s diff/merge tool for files, directories, and databases. However, DiffDog knows a few tricks that set it apart from the other breeds.
Diff/Merge via WebDAV
SVN clients typically support command line differencing; however, a text-only representation of the changes in even one file can be hard to read and use. When you want to compare the trunk against a tagged version, the problem is magnified. There are several visual differencing tools available that can help with analyzing version changes in SVN. They have varying degrees of compatibility with how SVN works. Some tools are well integrated with the SVN command line. DiffDog includes all the common comparison options for a tool that is tightly integrated with SVN clients. Where it excels is its ability to talk to SVN servers. Accessing an SVN repository with DiffDog using WebDAV is simple. The easiest starting point is to open Directory Comparison View and paste in the URLs of the folders you want to compare. In this case we’re comparing SVN branches on Projectlocker.com. The two sets of files open, and DiffDog provides a color-coded, browsable view of the differences between the two directories.
Clicking on either one of a pair of files opens a detailed file comparison.
DiffDog’s ability to distinguish between changes to XML and meaningful changes is key in this situation – most development trees have some amount of XML in them. DiffDog also supports comparing Word docs and databases – so all bases are covered.
Of course, folders you compare do not have to both be WebDAV SVN folders. It is equally straightforward to compare the SVN server with a local directory. DiffDog’s ability to access servers via HTTP (or FTP) opens a world of possibilities: comparing a local directory with a Google Docs directory, or diffing a local Web server against files hosted on the Amazon CloudFront , or even just synching photos between your local drive and your chosen back- up service. If you’d like to try DiffDog, it’s available for a 30-day trial over on the Altova Web site.
Digging deeper with the Twitter API: iPhone 4S vs. Galaxy Nexus
We found some interesting data when we dug below the surface of the iPhone 4S vs. Galaxy Nexus debate using the Twitter Search API.In today’s world there is a vast quantity of data available online that can be used for research, market analysis, and competitive intelligence. While “Big Data” can be a problem for those who produce it, store it, and compile it, it is highly beneficial for those of us who are looking for answers.Some of that data is fortunately available to be queried online, and, in particular, there is a vast quantity of data on social media interactions out there.
In this article we will explore how to use the Twitter Search API from MapForce, Altova’s data mapping/conversion/integration tool, to aggregate data on recent user submissions (“tweets”) on two highly popular topics – the Apple “iPhone 4S” vs. the “Galaxy Nexus” as the latest hot Android phone – and extract some statistical data about the users engaged in those discussions. One of the benefits of this abundance of data available to us today is that we can query it in interesting ways and extract new meaning from it. While there are undoubtedly many existing services that already provide trends over Twitter topics (e.g., Trendistic), those services only offer very simple trends and do not allow us to query any deeper.But all of the underlying data is available for grabs if you are just willing to learn a tiny bit about web service APIs and how to use them to extract XML data for further processing. As a starting point, let’s use the Twitter Search API to query the stream of recent tweets for the last 100 postings that are about the “Galaxy Nexus”. The Usage Guidelines for Twitter Search tell us that using both words in a query will result in the use of the default operator, which is AND, so we are going to search for posts that contain “Galaxy AND Nexus”. So let’s try that and request the most recent 100 items:
If you follow this link, you will get a second window with a lot of raw XML data that is formatted according to the Atom Syndication Format specifications. Alternatively, you could request the data in JSON format, if you wanted to directly process it via JavaScript code by hand, but we will use the XML-based Atom format so that we can easily analyze the data and extract the information we want.Viewing the above search result in a browser is not very user-friendly, so we can take a quick peek at the XML data in our favorite XML Editor using the Open from URL function:
As you can see, the data for each entry includes a language code, so for this example we will extract data from this Twitter feed as well as from a second search result on the “iPhone 4S” and combine them into one intermediate XML file for further analysis.Extracting XML data is really easy in MapForce: using the “Insert XML File” option to drop in an XML source, we can again specify the same URL as before. If needed, MapForce will automatically create an XML Schema for the supplied data so we can visualize it and extract information from it:
In our mapping we have dropped in two sources on the left side – one using a query string to search for “Galaxy Nexus” and the other to search for “iPhone 4S” – and on the right side we have dropped in a simple XML Schema that will allow us to aggregate our data and analyze it more conveniently going forward. In this case the mapping between the two sides is straight-forward as we are only extracting basic information about the user, the date, and the language of the tweet, but in other applications the mapping could be more complicated and include functions as well as queries to other data sources, databases, or web services…Previewing the resulting XML data can be done directly inside MapForce using the output tab, and this is what we see as a result of our data transformation:
Now we can easily use the reporting capabilities of StyleVision to group this data by language within each topic and count the number of posts in each language. We can then report this data in the form of pie charts, which produces the following interesting results:
Obviously, this data is highly dependent on the date of execution and time of day, as well as the particular announcements happening about these products, so the numbers will fluctuate quite a bit, but it can be used as a nice monitoring for seeing different language-specific trends. And once this has been set up, the report can be refreshed easily with the click of a button to get a snapshot at that point in time. For more long-term analysis it would of course be necessary to modify the mapping a bit to query more than 100 recent tweets.In this article we have used Twitter’s Search API as one example data source and only looked at language as one unique data point, but there are many more interesting sources of data available online today, and this approach can be used on all of them in a similar fashion.If you want to experiment with other data sources and other kinds of information that you want to extract, we invite you to try for yourself. A free 30-day evaluation version of MapForce is available, and there are no limits on how you can use the other features of Altova’s data mapping and conversion tool for data processing tasks that go beyond analyzing social media trends…
Case Study: Altova Customer Succeeds with XBRL
XBRL is mandated for most public companies. So why are private organizations and non-profits jumping on the bandwagon? This case study examines a real-world success story.
We were really excited when the folks at MACPA told us about their success working with XBRL. They set out to discover if XBRL could be used successfully (without a huge upfront investment) by small businesses and NPOs and ended up confirming not only that, but realizing benefits to their internal financial processes, as well.
Toward Ubiquitous XBRL
With close to 10,000 members, the Maryland Association of Certified Public Accountants (MACPA) is often looked to for their expertise on issues relevant to the field of accounting. The US Securities and Exchange Commission’s (SEC) mandate that public companies submit financial data in XBRL is one of those issues. Despite the potential of XBRL for reducing costs and increasing efficiency, many organizations are concerned about the time and expense that will be required to convert all of their financial data into XBRL, a process that can be further complicated when financial data is housed in multiple systems. MACPA set out to prove that these obstacles are easily surmountable: with the right tools, it’s possible to bring XBRL transformation in-house to not only comply with mandates, but realize greater efficiencies and transparency in various scenarios. In the process they discovered that tagging data in XBRL is valuable to private entities and non-profits as well as public companies facing a mandate. They took advantage of widely available XBRL software tools including the Altova MissionKit, which interfaces with multiple relational databases for XBRL mapping, tagging, and reporting.
In the end, the project turned MACPA’s financial data into a force for driving efficiencies and accountability. Once their internal accounting data was mapped to XBRL, they were able to automate burdensome data collection, transformation, and analysis tasks to gain more insight into their financial data. For instance, MACPA used their XBRL data to populate their financial Key Performance Indicator (KPI) system, significantly reducing the amount of time and effort required to prepare the KPI documentation. This in turn enables them to run the system at more frequent intervals. They are also now able to automate previously onerous tax filing tasks by mapping the association’s financial data in XBRL to the 990 tax return. (With almost 1.5 million exempt organizations in the US filing hundreds of thousands of Form 990s each year, the efficiency gained by using XBRL could be significant.)
This project not only enabled MACPA to learn about XBRL and advise their members, but also to automate and enhance the way they dealt with their own financial data. And utilizing affordable tools like the Altova MissionKit confirmed that handling XBRL in-house is the way to go.
Check out the complete case study to learn how MACPA brought XBRL transformation in-house to effect changes in efficiency and transparency. If you’re an accounting or technical professional who needs to learn more about XBRL, Altova offers free, self-paced online training and an educational XBRL whitepaper.
January 1 HIPAA Deadline Has Wide Impact
Every day tens of thousands of encrypted data transactions occur between health care providers, pharmacies, insurers, medical billing services, and employers who provide worker health coverage. Everyone in the United States covered by health or dental insurance depends on the automation, accuracy, and security of these largely unnoticed data streams to verify eligibility and process payments for nearly all medical services. Definition of messaging standards for these transactions are mandated by HIPAA (Health Insurance Portability and Accountability Act), passed in 1992 and administered by the Department of Health and Human Services. By January 1, 2012, all health care enterprises covered under HIPAA are required to transfer data in version 5010, the latest HIPAA standard, based on ANSI X12.
Migrating Existing Data Formats To and From the Latest Standards
Altova MapForce is a powerful and flexible tool used by developers and IT professionals in many industries to automate today’s complex data conversions. The screenshot below shows a portion of a real-world example of a complex HIPAA data mapping in Altova MapForce from one state’s ANSI X12 eligibility file to integrate membership file data for public sector healthcare.
Altova MapForce 2012 enables visual mapping to and from all transaction sets that are required to comply with HIPAA regulations. If you are a developer working for an organization in the healthcare industry, you can map HIPAA messages to or from XML, databases, flat files, Excel 2007+, and Web services, then generate royalty-free code in Java, C#, or C++ for your data transformation to integrate internal healthcare data formats and the HIPAA standards. MapForce includes an example mapping from a HIPAA message to XML format, along with a sample data file and XML schema, so you can generate XML output using the MapForce built-in execution engine. The screen shot below shows the MapForce example mapping, including the pop-up help available by rolling the cursor over any HIPAA message element.
MapForce allows users to apply mathematical, string, or logical functions, and other conversions, as data is transformed between the source and destination, illustrated by the parse-date function at the bottom center of the mapping image. Of course, privacy issues forbid distribution of an actual patient health care record, so the MapForce example HIPPA message content shown below is describing a fictitious person, but the message format is valid and the example is an effective demonstration of mapping functionality. When you click the Output button at the bottom of the mapping window, MapForce extracts the selected fields from the sample HIPAA message and transforms them to the XML version.
For one-time data conversion needs, MapForce lets you save the results displayed in the Output window. MapForce also integrates with Altova StyleVision to apply style sheets that format data mapping output to HTML, RTF, PDF, or Microsoft Word formats.
HIPAA Message Formats Supported by MapForce
MapForce supports version 5010 for all the following key X12 transaction types included in the HIPAA January 1, 2012 mandate:
You can also use the example mapping to generate code and compile it to experiment with interfacing a data mapping application to your existing health care records infrastructure.
HIPAA data mapping is only one application for the any-to-any graphical data mapping, conversion, and integration functionality of Altova MapForce. If you are interested in trying MapForce for your next data conversion project, you can click here to download a fully functional 30-day trial.
Altova MissionKit 2012 Released Today
Fall is bringing cooler temps, shorter days, and beautiful foliage to us here in the Eastern US and parts near and far. As we celebrate the changing season with fresh apple cider and warm sweaters, we’ve also been working hard to deliver Altova Software Version 2012. This year, Altova’s fall release brings support for HTML5 and CSS3, enhanced functionality for ETL applications, new Java-friendly options, Model Driven Architecture, and more, to the MissionKit software tool suite.
Let’s take a look at the new features in detail here, starting with tools that help developers and designers take advantage of HTML5 to create more sophisticated Web pages and apps.
HTML5 and CSS3
The latest version of the lingua franca for publishing content on the Web includes numerous improvements, from enhanced handling of multimedia content to increased interoperability. As Web developers transition to HTML5, they’ll need an intelligent HTML editor that can provide context-sensitive editing guidance and other time-saving features. XMLSpy 2012 adds support for HTML5 in its HTML editor with entry helpers and drop down menus that offer valid choices based on your cursor location, and an integrated Browser View. It’s also lightning fast to test your edits in multiple browsers directly from the HTML editor. Other features such as integrated project management and support for popular version/source control systems – as well as SharePoint® Server support – make XMLSpy a powerful tool for HTML development.
For web designers and developers looking to create HTML5 pages from XML, database, or even XBRL content using a graphical, drag and drop design tool, StyleVision 2012 also supports HTML5 for creating stylesheets and reports. Both XMLSpy 2012 and StyleVision 2012 also support CSS3 styles to complement the new HTML5 functionality.
Enhanced functionality for ETL
The MapForce 2012 data mapping tool now supports streaming reading of files, a crucial feature for ETL (Extract/Transform/Load) applications. When executing data mapping projects, the built-in MapForce engine can now read extremely large XML, CSV, and FLF files and create correspondingly large output streams. MapForce can even theoretically read an entire relational database in a single pass and generate an XML or other output file at once. This new support makes MapForce a highly effective, lightweight, and scalable tool for ETL. It’s also uniquely affordable, whether purchased as part of the MissionKit tool suite or individually.
New options for Java developers
The Altova MissionKit is designed to support users in their preferred development environment, whatever that may be. To that end we’ve added some new Java-friendly options, including support for JDBC database drivers in all database-enabled products.
We’ve also introduced a completely redesigned, native Java API for automating the functionality of Altova MissionKit tools in custom applications. This revamped Java API joins the existing COM API, and the products also ship with code samples in various programming language to get you started using the APIs right away.
Model Driven Architecture (MDA)
In response to requests from our UModel customers, we’ve added support for MDA in Version 2012 of our UML modeling tool. Utilizing a Model Driven Architecture approach to software engineering in UModel provides two primary advantages:
Upgrade info
Check out the rest of the features added in the MissionKit 2012. This new version is free to download and install for customers with Support and Maintenance. If you’re not already a customer, you can download a free, fully functional 30-day trial.
XML Development with Database Integration
Did you know that XMLSpy connects to relational databases? One of the most compelling features of the Altova MissionKit is that numerous tools in the suite include offer deep integration with relational databases, providing seamless access to back end data for bi-directional conversion, integration, analysis, and reporting.
Let’s take a look at what you can do when you connect XMLSpy to your databases. Other database-enabled MissionKit tools will be covered in subsequent posts.All popular relational databases are supported in XMLSpy:
First step: Connect to and query the database
When you select Query Database from the DB menu, XMLSpy helps you connect to your database with the step-by-step Database Connection Wizard. Then, the DB Query window makes it easy to explore and/or edit data in the database you’re working with, either by opening existing SQL files or creating SQL scripts from scratch using drag-and-drop and auto-complete functionality. Once you execute your query, you can edit the database data in the results window, review changed fields (highlighted in pink), and commit the changes back to the database.
Next: Convert between XML and databases
Another common requirement is converting between XML and database models, and XMLSpy supports this in both directions. You can easily export database data to XML. If no schema is required, you can simply export the data to XML in its basic tabular format. Or, you can use the Create XML Schema from DB Structure option first, then import database data maintaining all the relationships and dependencies defined in the content model. Numerous options are available to specify the format of the schema, whether columns should be imported as elements or attributes, and the database constraints that should be generated in the XML Schema.
Or, to go in the other direction, it’s just as easy to go from XML to a relational model in XMLSpy. The Export to Database dialog (accessed via the Convert menu) allows you to specify where to start the export, how to handle export fields, and which elements to include. Then, the data is instantly converted and stored in your database.
For times when you want to define a database with the same rules as an existing XML Schema, the Create DB Structure from XML Schema dialog lets you do so with numerous options. Any identity constraints included in the schema will automatically transfer to the database structure. Alternatively, it’s easy to define relationships between elements manually. Learn more about all these features for working with XML and databases in XMLSpy, or check out all the database tools available in the MissionKit.
Meet the Altova Team at Oracle OpenWorld
Leverage Your Financial Data with the XBRL Chart Wizard–Part 2
Extensible Business Reporting Language (XBRL) is an XML-based language for reporting and exchanging financial data that’s making inroads across the globe. In fact the US Securities and Exchange Commission now requires public companies to submit financial data in XBRL format.Altova’s MissionKit, a suite of our most popular software, supports XBRL tagging via XMLSpy and MapForce as well as XBRL rendering via StyleVision. With StyleVision you can create sophisticated financial reports including charts and tables based on XBRL instance files.
This is the second post in our two part series on StyleVision’s XBRL chart capabilities. In our last post we showed you how to call the XBRL Chart Wizard and create pie charts. This time we’ll show you how to create bar charts and line charts. Bar Charts Bar charts are the ideal vehicle for comparing groups of objects or visualizing change from one period to another. Here we’ve used the XBRL Chart Wizard to create a bar chart comparing Current Assets to Current Liabilities from the third quarters of two consecutive years. After invoking the XBRL Chart Wizard as we did in the very first step, we select Current Assets and Current Liabilities in the Concepts tab and place it in the Series pane so that these amounts will be reflected on the Y or vertical axis.
Now we click the ellipses in the Period tab in the Categories pane to bring up the Period Properties dialog box. Assets and Liabilities are measured at specific points in time and so we have checked the Show instant periods box. We’ve also filtered the data using XPath so that only assets and liabilities at the end of the third quarter (which ends in August) appear. Finally we add a dynamic label that combines “Q3” with the year using XPath.
In addition to the bar chart, we’d like to include the Quick Ratio, a measure that indicates whether an organization has enough readily liquidated resources to cover outstanding financial obligations. The Quick Ratio is simply Current Assets divided by Current Liabilities. We’ve added an auto calculation and used XPath to divide Current Assets by Current Liabilities for all time periods in the XBRL instance document. Below is the design view of our bar chart and auto calculation, including the XPath.
The HTML output appears below. However we can also render the design in RTF, PDF, and Word 2007+.
Line Charts A line chart has a line connecting discrete points plotted on a graph and is typically used to track how financial and other data varies over time. In this example we’ve created a line chart to track two concepts – costs / expenses and revenue – over a four year period. Just as we did for the pie chart and bar chart, we’ve dragged a concept (here, Revenues) from the Schema Tree into the design window and invoked the XBRL Chart Wizard. Likewise, once the Chart Wizard opens, we clicked on the ellipses on the Concepts tab in the Series pane to bring up the Concept Properties dialog box, where we selected the Costs and Expenses concept. Costs and Expenses will now appear on the chart along with Revenues. Our XBRL file includes both instance and duration time periods so in the Period Properties dialog box below (invoked by clicking on the ellipses in the Period tab in the Categories pane) we’ve selected only duration periods, or those with a start and end date. We will now use XPath to filter the data. We’ll create a variable $altova:duration that translates the difference in number of days between the start and end dates of the period into the number of months and then selected data where that variable is equal to three (equivalent to a fiscal quarter). We’ve also used XPath to create a dynamic label combining Q3 with the year.
Because our line chart is visualizing changes in revenue and costs and expenses over time, we have used the Sort function in the Period Properties dialog box above so that the data appear chronologically.
Although the appearance of the chart (e.g., colors, labels, and visibility of tick marks and axis values) can be controlled with the All Settings button in the Chart Settings section of the XBRL Chart Wizard dialog box, it can also be controlled with XPath via the Dynamic XPath Settings button under Chart Settings (below).
This feature provides tremendous flexibility not only in managing appearance but in managing the contents of the chart. Among the many things you can do with XPath are controlling output based on conditions and adding a dynamic title that includes the time period reflected as we’ve done here. Once you click the Dynamic XPath Settings button in the XBRL Chart Wizard dialog box (above), the Dynamic XPath Settings dialog box is invoked (below).
Clicking the ellipses next to the property that you want to edit in the Dynamic XPath Settings dialog box (above) brings up the Edit XPath Expression dialog box (below). Here we’ve used XPath to concatenate a string (“Revenues / Costs and Expenses”) with the first and last years in the period we identified in the Period Properties dialog box earlier.
The XPath expression entered here will overrule the settings in the Change Appearance and XBRL Chart Wizard dialog boxes – notice in the chart (here rendered in HTML) includes the dynamic title that we built with XPath rather than the title in the XBRL Chart Wizard Dialog Box.
As we’ve shown here, the XBRL Chart Wizard provides developers and designers with a highly flexible tool for visualizing XBRL data. With XBRL’s place in the international technology sector firmly established, the ability to leverage XBRL data to support strategic decision making is key. There are a number of different types of companies that are discovering the strategic value of XBRL. Our XBRL case study describes how the Maryland Association of CPAs streamlined their tax reporting and benchmarking processes with XBRL. This case study is a great resource for anyone interested in learning how to leverage this data with Altova software tools.
Have you created something really great with the XBRL Chart Wizard? Or developed an interesting project using StyleVision or another of our tools? Please share your story with other Altova users by commenting on this blog post. Think it would make a great case study? Email us at marketing@altova.com – if we choose to use your story you’ll receive a $200 Amazon gift card as well as some free press for you and your organization. We’d love to hear from you!
Leverage Your Financial Data with the XBRL Chart Wizard–Part 1
Extensible Business Reporting Language (XBRL), an XML-based language for financial data, is increasingly being used by both public and private organizations across the globe – in fact it is mandated for some companies in countries including the United Kingdom and the United States. Altova provides comprehensive support for XBRL tagging and XBRL reporting with the MissionKit, a suite of our most popular software. Among the MissionKit tools is StyleVision, a graphical stylesheet designer and report builder, which can be used to support a host of internal reporting and analysis activities for companies that use XBRL.
In the next post we’ll focus on StyleVision’s XBRL Chart Wizard, a powerful XBRL visualization tool that can turn your XBRL-tagged financial data into powerful charts and graphs – if a picture is worth 1,000 words then StyleVision is worth its weight in gold. Calling the XBRL Chart Wizard You invoke the XBRL Chart Wizard as you do the XBRL Table Wizard and other StyleVision capabilities. Once you’ve started a design by selecting New – New from XBRL Taxonomy from the File menu and selected a taxonomy and working XBRL file, all concepts are populated to the Schema Tree. From here you simply select a concept from the XBRL taxonomy in the Schema Tree and drag it into the design window. For this example we’ll be using the Carnival Corporation quarterly report for 2009 that they have published with the SEC, but you can apply the same techniques to any XBRL instance document – be it a publicly available filing with the SEC or an internally generated XBRL file. As a first step, we will look at how the revenues are composed by creating a pie chart that shows the revenue breakdown. Here we’ve dragged the Revenues concept (highlighted in the Schema Tree in the left sidebar) into the design window and selected Create XBRL Chart.
Once you select Create XBRL Chart the XBRL Chart Wizard dialog box will open automatically.
Once you click the ellipses in the corner of the Concepts tab in the Series pane, the Concept Properties dialog box (below) will open and you can select concepts to appear in the chart. Carnival Corp breaks out revenues for their cruises between Passenger tickets and the Onboard and other. We will select those two concepts, and also the Other category to capture all elements that make up the total revenues.
Pie Charts Pie charts are useful when you wish to see the relative contribution of individual elements to the whole. Placing Onboard and other, Other Sales Revenue Net, and Passenger Tickets in a pie chart provides us with a visual representation of the relative contributions of each source of income to total revenue. We are now ready to make changes in the XBRL Chart Wizard dialog box so that our pie chart reflects the information we need in a format conducive to strategic decision making. First we must change the chart type under Chart Settings from Bar Chart to Pie Chart 3D via the Change type… button, which brings up the Change Type dialog box (below).
In pie charts, the concepts that will form the segments of the pie (in this instance the Onboard and other, Other Sales Revenue Net, and Passenger Tickets concepts that we selected above) are placed in the Categories pane and the values in the Series pane. Therefore we will need to move the Concepts tab to the Categories pane and the Period tab to the Series pane. We’d like to segment the revenue data from the XBRL file based on quarter. We do this by dragging the User-Defined Grouping (by Quarter) tab from the Available pane to the Categories pane. We’ll make the necessary changes in this tab in the next step. We will also check the Remove empty categories and Remove empty series boxes so that a value or label will not be generated if no data exists and change the size of the chart to 350 pixels x 350 pixels in the Chart Settings section of the XBRL Chart Wizard dialog box. After we make these changes, the dialog box looks like this:
Now we are ready to select the data that appears in the chart. First we’ll segment the data by quarter. We invoke the User-defined Grouping Properties dialog box pictured below by clicking the ellipses in the corner of the User-defined Grouping (by quarter) tab in the Categories pane. The grouping feature provides you with maximum flexibility by allowing you to segment data based on variables identified in the taxonomy (e.g., reporting period, geographical area, division). Now we can use XPath in the Group By field to group the data by quarter, filter it based on the group we created (in this example only the second quarters will appear in the chart), and add a dynamic label. We want the chart to reflect all second quarter data for each of the revenue concepts we selected so we toggle Do not filter under Group key filter.
We can further filter the data by clicking on the ellipses on the Period tab in the Series pane to bring up the Period Properties dialog box. Here we’ve selected only duration periods (i.e., those with a start date and end date – instant periods have a single date reflecting the date that the “snapshot” was taken) and filtered based on year. In this example only data from the second quarter of 2009 will appear in the chart.
Finally we can fine tune the chart’s appearance by clicking on the All Settings tab under Chart Settings, which brings up the Change Appearance dialog box. Here we’ve opted to show the concept labels, values, and percent of total. We can also select color schema, chart size, font types and sizes for each section of the chart (e.g., chart title, labels, legend), and background colors.
After making all of these changes we hit OK in the XBRL Chart Wizard dialog box and the pie chart reflecting these changes is created. Please note that after the chart is created you can go back and edit the chart settings.
As you can see, the biggest source of revenues is Passenger tickets, which produced 75.02% of total revenues for Carnival Corp in the second quarter of 2009. As is the case with all StyleVision designs, output can be rendered in HTML, RTF, PDF, and Word 2007+ formats and an XSLT stylesheet for each format is automatically generated. And this was just one example of what kind of data you can extract from an XBRL filing and visualize in a chart. Next week we’ll look at creating bar charts and line charts from XBRL financial data.
Have you created something really great with the XBRL Chart Wizard? Or developed an interesting project using StyleVision or another of our tools? Please share your story with other Altova users by commenting on this blog post. Think it would make a great case study? Email us at marketing@altova.com – if we choose to use your story you’ll receive a $200 Amazon gift card as well as some free press for you and your organization. We’d love to hear from you!
Processing the Groupon API – Part 3
Concluding the series in this post, we will apply a stylesheet to transform the XML data created from our mapping of the Groupon API into HTML. Here is an example of the XML output from the data mapping we created last time:
Assign a Stylesheet to Transform XML The Component Settings dialog for the output component of the MapForce mapping allows us to assign a stylesheet created with Altova StyleVision.

When you click any of these output format buttons, MapForce executes the data mapping exactly as we saw in the previous post. MapForce seamlessly passes the XML output to StyleVision, where it is transformed to the selected format. MapForce then displays the formatted document in the Output window. Here is the MapForce Output window for HTML, based on the StyleVision Power Stylesheet assigned above:
The MapForce Output menu lets you save the XML data mapping output or the HTML document formatted according to the stylesheet. How to Make a Stylesheet We designed a stylesheet for the Groupon API data mapping using Altova StyleVision, based on the XML Schema for the MapForce output component. The intuitive StyleVision interface and powerful data access and manipulation features make it easy to create attractive documents in HTML, RTF, PDF, and Microsoft Word formats from XML files. The screenshot below shows the StyleVision Design View of the Extreme Groupon stylesheet. The blue numbered circles identify the location of each design feature listed following the image.
Features of the SPS file
Assigning a stylesheet to the data mapping output component integrates the operations of MapForce and StyleVision, and a new series of buttons appears at the bottom of the MapForce mapping window for HTML, RTF, PDF, and Microsoft Word formats. (You must have both MapForce and StyleVision installed on your computer.)
StyleVision Power Stylesheets can combine multiple .xsd files, existing .css stylesheets, database schemas, XBRL taxonomies, and more to produce richly formatted reports that can even include automatically generated charts in various styles. You can also use StyleVision to define e-forms with data entry fields, drop down menus, radio buttons and other advanced features. Previewing Stylesheet Transformations StyleVision lets you assign a working XML file to preview your output as you design the stylesheet, and the buttons along the bottom of the Design window make it convenient to display the formatted working file as you refine your design. We saved the XML output of the MapForce mapping and assigned it as our working document. When the stylesheet was complete, the HTML Preview in StyleVision was identical to the MapForce HTML Output window shown above. To view the document on a mobile device you can either deploy the HTML as a page on a Web site or email it as an attachment.
In addition to the stylesheet itself and formatted versions of the working document, StyleVision lets you save generated XSLT files to transform other XML files using your stylesheet design outside the StyleVision application. Automation Next Time In the future when you want to re-run a data mapping and refresh the HTML document with up to date data, there are two ways to automate the process:
XMLSpy, MapForce, and StyleVision are all available together in the specially priced Altova MissionKit. See for yourself how easy it is to use the MissionKit to convert data from a Web API — download a free 30-day trial!
Editor’s Note: Our original series on mapping data from the Groupon API ran in three parts you can see by clicking the links here: Part 1 of Processing the Groupon API with Altova MapForce describes how to create dynamic input by collecting data from multiple URLs. Processing the Groupon API with MapForce – Part 2 describes how we filtered data from the API and defined the output to extract only the most interesting details. Processing the Groupon API – Part 3 describes formatting the output as a single HTML document optimized for desktop and mobile devices, and reviews ways to automate repeat execution.
Processing the Groupon API with MapForce – Part 2
In Part 1 of this series we described how to connect Altova MapForce to the Groupon API. We queried the API for a list of Groupon divisions, then used the list to create API queries for all the current deals from every division. In this part, we will execute the /deals queries and filter the response for the most interesting data. The list of /deals queries we built previously looks like this:
To process all the queries, we can connect the list as a dynamic file input to a new mapping component. When we needed a new component last time, we dropped an API /divisions query into the mapping, and let MapForce create an XML Schema automatically. We could do the same thing here by dropping in an API /deals query as an XML input file. There’s just one small issue — although the Groupon API online documentation clearly describes the queries we can make, it is vague about the information that will be returned. Before we send dozens of queries to the API for all the current deals, we probably want to know a little more about the data that will come back.
As expected, we got quite a bit of data when we requested all the deals for a single division! A fast way to analyze the structure of this data is to use the XMLSpy DTD / Schema menu option to generate an .xsd file from the xml. Shown below is a reduced view of the entire generated .xsd file based on the response to the /deals query for Dallas:
We can dig even deeper, following Yogi’s advice like déjà vu all over again. Expanding all the elements to review the XML Schema reveals some curious anomalies. For instance, there are two elements named redemptionLocation with different definitions. The first contains a sequence of child elements:
And the second is defined as a simple string:
Going back into the xml data for Dallas and searching for redemptionLocation displays these examples:
And:
And:
Now this is really interesting, because redemptionLocation = ”online” identifies deals that can be redeemed from anywhere, instead of by a visit to a bricks and mortar location in the division where they are advertised. What if we ran the /deals API queries for all divisions and extracted a list of all the online deals? That would be one extreme Groupon! Only Ask for What You Need The Groupon /deals API query supports an optional parameter called &show= that allows users to limit the data returned. Applying this parameter can save bandwidth and reduce processing time for the data transformation by removing unwanted data from the API response. We can also simplify our final result by including only the most interesting information, including the link to the Groupon web page for each deal. After we remove unwanted elements from the generated Dallas schema, our final version for the summary of online deals looks like this:
When we add the &show= parameter to our MapForce mapping to request only the elements included in the simplified XML Schema, the queries look like this:
Now we can drop the revised .xsd file into the mapping and connect the list of API /deals queries as dynamic input. We don’t need to delete the text file we used to collect the list of queries — that might continue to be helpful for future debugging.
These changes complete the input side of the data mapping. Defining the Data Transformation Output Back in XMLSpy we can make a couple more revisions to the input XML Schema to design a new version for output:
We discarded the response element since it doesn’t add any value, and eliminated the redemptionLocation element that we don’t intend to include in the output. We also added a date element for a timestamp, because our output file will be a snapshot of data that is constantly changing. After saving this version of the .xsd file in XMLSpy, we can drop it into the MapForce mapping. Shown below is the output side of the mapping with the output component partially connected. The filter at the top reads the redemptionLocation element to select only online deals and the now function inserts the date:
The last revision we made in the output XML Schema was to change several element types from dateTime, Boolean, and integer to the string data type to allow more descriptive text Here is the complete definition of the mapping with the final connections to the output component:
Now for the Payoff When we click the Output button MapForce processes the entire mapping from beginning to end using the MapForce Built-in execution engine. Here’s a breakdown of the steps:
Let’s Make a Deal Like Yogi Berra said, you can observe a lot just by looking. Let’s start by running a /deals query in XMLSpy. That will let us examine the response to a query for one division before we pull in a potentially unwieldy volume of data. The XMLSpy File / Open menu includes the same Switch to URL option we used in MapForce in the earlier post. If we enter the /deals API query for a division that covers a large metro area – say Dallas – we are likely to get enough deals instances to extrapolate the characteristics of the entire data set. XMLSpy opens the response to the /deals API query in Text view just as if we opened a local file:
MapForce takes only a few seconds to complete all those steps and generate an output file with a series of deals that look like this:
In part 3 of this series we’ll design a stylesheet to automatically transform the XML output of our mapping into html for attractive presentation in a web browser and on mobile devices. See ya at the ballpark, Yogi! XMLSpy and MapForce are available together in the specially priced Altova MissionKit. See for yourself how easy it is to use the MissionKit to convert data from a Web API — download a free 30-day trial!
Editor’s Note: Our original series on mapping data from the Groupon API ran in three parts you can see by clicking the links here: Part 1 of Processing the Groupon API with Altova MapForce describes how to create dynamic input by collecting data from multiple URLs. Processing the Groupon API with MapForce – Part 2 describes how we filtered data from the API and defined the output to extract only the most interesting details. Processing the Groupon API – Part 3 describes formatting the output as a single HTML document optimized for desktop and mobile devices, and reviews ways to automate repeat execution.
The PXF File as the Software Equivalent of Plug and Play – A Database Editing Use Case
A few weeks ago we introduced you to the Portable XML Form (PXF), a file format in which all design elements supporting a StyleVision design including XML Schema and instance documents, SPS design files, XSLT, images, and other external files are embedded. End users simply open the PXF file in Authentic and can immediately start editing XML and database data.
In this post we’ll create an electronic form for business users to record donations and enter new donors for a fictitious charity called the Green Planet Fund.
Altova’s new PXF file format is a boon to developers and end users alike –the PXF file can be transported, downloaded, copied, and saved like any other office document, increasing both efficiency and error-free deployments. Developers no longer have to send or install multiple files or create a server application to support a design and business users can distribute critical business information quickly and reliably. This is especially true in distributed organizations where business data needs to be sent around via e-mail between different locations or between field employees and their counterparts in the home office. A PXF that supports electronic forms designed in StyleVision and edited by business users in Authentic makes editing business data a snap. In most cases that business data will be contained directly within the PXF file as an embedded XML document, but it is also possible to connect a PXF file to a database server and store the data directly in the database, as the following use case shows.
For this example we’ll be using StyleVision to create an electronic form on which business users will record donations and enter new donors for the fictitious Green Planet Fund. End users interact with these forms in the Authentic WYSIWYG editor, a sophisticated word processor-style interface that allows end users to capture, view, and update XML and database content. Once you click File, New from DB in StyleVision, the Connection Wizard is invoked. Simply select the database type – you will be prompted to browse for the source.
Here we’ve identified the DonorsDatabase from the MARKETING006SQLEXPRESS server. The connection string is automatically saved with the design file and re-established each time a business user accesses the form in Authentic. The database is updated with the information that the business user enters in the Authentic form.
Once you establish a connection, you can select tables, data views and even SQL SELECT statements in the Insert Database Objects dialog box.
For this example we’ve added a SQL SELECT statement (below) that concatenates donor title, first name, and last name and calculates the total amount contributed by each donor. Once you click Add SELECT Statement the SQL SELECT statement becomes available to the StyleVision design, as seen above.
Please note that we used Altova DatabaseSpy, a multi-database query, design, and database comparison tool, to build our SQL statement. Although you can export data from the SQL Editor in DatabaseSpy into a range of formats, for this example we simply copied the SELECT statement from DatabaseSpy into the window in the SQL SELECT dialog box in StyleVision. StyleVision generates a temporary XML Schema based on the structure of the database and displays it in the Schema Window. Note that both the Contributions and Donors tables as well as our SQL SELECT statement appear in the Schema Tree.
During this transformation StyleVision creates internal XML files – a non-editable one for previews and as the source of the generated XML data file as well as an editable XML file that will write modifications back to the database. Now that we’ve established and saved the database connection string we’re ready to design the electronic form that Green Planet Fund will use to add new donors and log contributions. For this example we’ve created two simple tables in StyleVision – one for recording contributions and another for looking up and adding donors. (Please note that our example is for illustrative purposes only and we’ve shown only a small sample of the fields that we would typically include in a real-world application. The functionality too is far less sophisticated than it would be in an actual project.) We’ve done the following to our design: · Created a design fragment with a table for entering new donors and a table of registered donors that is populated dynamically · Added a checkbox that when toggled will show the registered donors table and the data entry table from the design fragment · Edited the Authentic properties of the registered donors table to retrieve all records · Edited the Authentic properties of the data entry table to retrieve only one record to make it easier to enter data · Used XPath to concatenate each donor’s title, first, and last names for the table of registered donors, using the normalize-space function to remove all white spaces · Used Value Formatting (below) to format the contribution date – this also allows the end user to edit the date via a calendar interface in Authentic
Note the design fragment ‘DonorList’ is enclosed within the DB tags and is represented as a single element. The design fragment itself appears at the bottom of the design.
Clicking the tabs next to the Design tab will render the report in different formats. Here we’ve presented the Authentic view.
Notice that the design is still in standard SPS format (greenplanetdonorsII.sps) – we are now ready to save it as a PXF so that it can be emailed to the client and deployed immediately upon receipt. Once you select File – Save As from the top menu, you can choose whether to save the design as a SPS or PXF.
When you Save as PXF File you are prompted to select the files to embed in the PXF file. All files supporting the StyleVision design are automatically made available in the dialog box.
Here we’ve checked each of the design elements as well as the XSLT files. This will allow end users to generate output from the StyleVision-designed form in each of these formats directly from Authentic. Please note that you also have the option to include additional files. Although this design does not require other files, this feature makes transporting and deploying projects that require multiple files significantly easier. Now you can send the PXF file that you have just created to the client. All project files as well as the database connection string are embedded in the PXF so that once the end user opens it in Authentic he can immediately start viewing, editing, and entering data. To create a new record in Authentic, place the cursor in one of the fields in the contributions table on the form and click the Append row button on the tool bar. (Alternatively you can select Authentic – Append Row from the top menu.)
Now the business user can enter contributions (new data is in bold) …
…and new donors.
Note that in the SQL Server database the Donor ID is an auto-generated field. Once the end user clicks File – Save from the top menu, the new information is posted to the database, the database generates an ID number, and the new information populates the other tables in the form. (As reflected above, data is populated in real time.) Edits and additions are immediately written to the database. The SQL Server database view below shows that Edward and Julie Jay, whom we have just added to the Authentic form, have been assigned a donor id of 18.
Although we did not include it here, the form can be designed to generate an error message when the user attempts to save a new donor without at least one first and last name. This can be accomplished using XPath in the additional validation property of the Authentic properties or by creating a constraint in the SQL Server database. This use case was designed to show how easy it is to create and deploy interactive forms. Electronic forms designed in StyleVision have always been a great way to update both XML and database content – the PXF file simply makes it easier to transport and deploy them.
Have you used the PXF form yet? Or created a really cool database project using StyleVision or any of Altova’s other tools? Please share your story with other Altova users by commenting on this blog post. Think it would make a great case study? Email us at marketing@altova.com – if we use your story you’ll receive a $200 Amazon gift card. We’d love to hear from you!
Processing the Groupon API with Altova MapForce
We often think of a data integration project as a translation from one singular data input file to some other data set, but Altova MapForce lets you greatly expand the concept of an input file. For instance, the MergeMultipleFiles.mfd example installed with MapForce illustrates how you can use a filename with wildcard characters to merge multiple input files into a single output.
A MapForce mapping input doesn’t even need to be a physical file – it can be a URL that returns predictable structured data, like the APIs for popular Web sites like Groupon and many others.
When we click the Open button MapForce offers to generate the schema:
When we click Yes, the File / Save dialog opens. I saved the schema as divisions.xsd, and the mapping with the new XML Schema inserted looks like this:
And the Properties dialog for the XML Schema component automatically contains the API /divisions URL as the Input XML File:
Check the Work We want to filter the Groupon divisions data to build a list of id names to use for deal queries for each locality. But before we go any further, now might be a good time to apply the text file trick from the Quick Solution for Complicated Functions blog post to look at the id values. When we insert the text file and connect the divisions and id schema elements, the mapping looks like this:
We connected the division element to Rows in the text file in order to generate a new row in the text file for each unique division, so that Field1 in each row will hold the id. Clicking the Output button now generates this result:
All we need to do is apply the concat string function to build the list of /deal URLs for all division IDs. The next step in the mapping looks like this:
Rolling the cursor over the constant connected to value1 of the concat function displays its full definition:
When we click the Output button to execute the mapping, the Output file now looks like this:
As a further review, we can open the generated XML Schema in XMLSpy and display it in graphical Schema View:
So far we have:
In this blog post we’ll describe how to use Altova tools to retrieve, filter, analyze, and present data available from a Web-based API, using Groupon as an example. If you want to follow along yourself, you will first need to visit http://www.groupon.com/pages/api to request your personal Groupon API client key. The Problem: All Deals Are Local The Groupon Web site and email subscriptions are great for finding deals in your local neighborhood, but what if you’re looking for a deal to use on an upcoming vacation, or for a gift for friends or family across the country? Sure, you could enter each location manually at the Groupon Web page, but that’s so last century. Let’s use the Altova MissionKit to automate things. The Groupon API offers two URL queries that return data in .json or .xml formats: the first returns a list of all Groupon localities (called divisions), and the second returns current deals information for one named division. If we want to see all the deals for more than one division, we need to resolve multiple URLs and aggregate the data into a single result. Yes, MapForce can do that! First We Need a Schema The Groupon API documentation describes the elements that will be returned by our requests, but doesn’t provide an XML Schema. That’s okay, we can use MapForce to generate one. All we have to do is open a new mapping design and choose Insert XML Schema/File, then click the Switch to URL button. Now we can enter the URL to retrieve the Groupon divisions list:
In the next post in this series we will process the list of deal queries as the input for a new mapping component and filter the output for some interesting information. Find out for yourself how easy it is to apply MapForce to convert data from a Web API! Download a free 30-day trial of MapForce.
Editor’s Note: Our original series on mapping data from the Groupon API ran in three parts you can see by clicking the links here: Part 1 of Processing the Groupon API with Altova MapForce describes how to create dynamic input by collecting data from multiple URLs. Processing the Groupon API with MapForce – Part 2 describes how we filtered data from the API and defined the output to extract only the most interesting details. Processing the Groupon API – Part 3 describes formatting the output as a single HTML document optimized for desktop and mobile devices, and reviews ways to automate repeat execution.
UML Class Diagrams in Altova UModel
Altova products have long been recognized for their rich, intuitive user interface. One example is the UModel diagram window, which includes multiple display options for class diagrams to facilitate ease of use and improve information clarity in objected-oriented models. Class diagram style for projects that generate .NET (C# and Visual Basic) application code UModel 2011 Release 3 includes a new option for displaying class diagrams for .NET programmers. If your project will generate source code in .NET programming languages (C# or Visual Basic), your classes may contain .NET properties that can be called from outside like attributes, but are implemented internally as methods. To better organize .NET classes, UModel offers an option to display .NET properties and methods in separate operations compartments inside classes.
This view is an optional setting in the Styles helper window for class diagram display and editing. Choosing to display separate .NET properties compartments or a single traditional UML operations compartment has no influence on code generated from the class.

View or Hide Class Properties and Operations Developers can collapse Properties and Operations compartments using convenient grab handle tools along the right edge. They can also customize the display of classes to show or hide individual class properties and operations. The right-click context menu offers a Visible Elements dialog for any selected class.
This feature lets users simplify the diagram to focus on the properties and operations relevant to the task at hand. Hidden items are indicated by ellipses.
Clicking on an ellipsis re-opens the Visible elements dialog. Options for Interface Notation UModel 2011 supports alternate diagram styles for interfaces between classes. By default, new interfaces are created in class diagram style with arrowhead styles and notations to indicate the interface creator and interface users. In the class diagram below, the developer wants to concentrate on class relationships and interfaces, so all the properties and operations compartments are collapsed.
Interfaces have a special Toggle Notation quick-editing button to switch from the class diagram style to the UML ball and socket interface notation.
Visibility Icons vs. Mathematical Operators The UModel visibility icons, along with the visibility pull-down menus in the drawing window and properties menu, have been praised because they avoid confusion with common mathematical operators that can also appear in definitions of properties and operations. But users who prefer the traditional view can choose UML Style in the Project Styles helper window.
All the style settings selected to display class diagrams on screen are also applied when rendering project documentation in Word, RTF, or .html formats Find out for yourself how you can improve development of your object-oriented application by customizing the display of class diagrams with Altova UModel – download a free 30-day trial today!
Service Pack 1 Available
Just a quick note to let customers of Altova Software Version 2011 Release 3 know that Service Pack 1 (v2011r3 SP1) is now available for all Altova products. In addition to bug fixes, SP1 includes important enhancements:
Please note that v2011r3 SP1 is a new product version (not a patch). All customers with a license for Altova Software v2011r3, as well as any customer with an active Support and Maintenance Package for their Altova product(s), can simply download and install this update.