I'm looking at proposing a single-layout system for all our reports (and possibly exports) where I work. The system is in Perl and I figured that there had to be some CPAN solution out there. However, there are 1095 modules with the word 'Template' in their name. I haven't even started the list for 'Layout'.

The problem is this - I want a single layout from which, given data, I can choose to generate HTML, PDF, XLS, XML, char-delim, fixed-width, etc. Essentially, I want to separate layout from format.

It seems obvious that XML is the way to go, but I wanted to know if there was any other system out there. (Plus, I don't like the speed hit of XSLT to create HTML, which is going to be the most common format used.)

Any suggestions would be greatly appreciated.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.


In reply to Is XML the only generic layout system out there? by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.