Use Inkscape and XSLT to Create Cross-Platform Reports and Forms

A way to create platform-independent dynamic forms and reports.
Maintaining the Forms

Shortly after we finished the project, we were faced with making two rounds of changes to the layout of the form. The first round of changes dealt with the positioning of text objects. The second round was far more extensive—we had to draw a series of new boxes on the form to accommodate a new identification system. Because we could not open the modified SVG in Inkscape, we had to make our changes to the master SVG and then apply them manually to the XSLT version.

At first, we thought making the changes would be hard and tedious, but it turned out that the process was simple. For the first round, we simply made the changes in the master using Inkscape, careful to keep a note of the objects we changed. Then, using a text editor, we replaced the old portions of XML with the new ones in the XSLT. Because the second batch of changes was additions only, we decided simply to make another layer in the master to which to add the boxes. When we finished adding the new boxes, we simply copied the new layer into the XSLT using a text editor.

Conclusion

From start to finish, our project took a little more than a month to design, build, test and publish. Our solution has made all of our applications more agile and effective. We also have saved terabytes' worth of storage space on our servers.

Currently, the SVG adaptation rate is rather slow. We are looking forward to seeing what other tools will be built that utilize the versatile SVG file format.

Chad Files is a software developer who resides in Conway, Arkansas. He is an avid hiker and longtime Linux user. He welcomes your comments at cpfiles@gmail.com.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I did this for a few

Satya2's picture

I did this for a few projects and then turned to JasperReports. Keeping the XSLT in sync with the Inkscape SVG was getting to be a pain.

Does everyone have this problem, where people keep entering their life story into a field that has room for a couple of short lines only?

Resources?

ewalstad's picture

Thanks for the article, Chad.

Are your files available for download? I wasn't able to find them on the LJ site. I'm especially interested in your xe2_claim PL/pgSQL function because my data is also in a PostgreSQL database.

Thanks,

Eric.

Re: Resources?

cfiles's picture

You are welcome.

I will be glad to post the full SVG. The database stuff is a bit more complicated; it is tied into our main processing system. Basically outside of the database, without the structure and the data, it is useless.

I am going to try to get the guy who wrote it to publish an article about what he did.

Multiple lines

Anonymous's picture

I am interested in figuring out how to fill out a list of items that is variable for each record. Creating a new variable for every blank like in the template will not be a good idea, so how did you accomplished that?

Re: Multiple lines

Cafuego's picture

You create a flowRoot object in inkscape by clicking and dragging the text tool.

This object contains flowPara objects, which are the paragraphs that wrap properly within the defined flowRoot area.

Note you need to set the text-align property to justify manually if you want justified text, the inkscape text properties dialog doesn't allow you to do that (yet).

Can you share a sample hcfa

mak's picture

Can you share a sample hcfa 1500 file with layers? That will help to understand the design.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix