The reason for using XSLT is that you already have a number of XML tools. The ability to leverage those tools makes XSLT worthwhile.

Of course, we do have XML tools: it's called Perl. So use Perl to handle your XSLT!

One thing I find irritating about both XSLT and CSS ( Cascading Style Sheets )---both are concerned with the appearance of documents; both provided less than the full power of a programming language.

When converting an XML document into HTML, there might be some dynamic text extrtacted from the tags, and some static text. In Perl, the subroutine which processes a tag can generate the static text as well. The two segments are encapsulated into a unit, and distinguinished from the text, static or dynamic, associated with another tag. If you decide to rearrange the HTML, it's simple to do so without modifying the routines that deal with the tags.

Similarly, it is difficult to use symbolic constants in CSS. My web page stylesheets refer to colours in various places. The first rule of CS club says to use symbolic constants, so that when you decide to change the colours, you find all the instances of the colour. (And also to make sure that if #40f098 is used for two purposes, only the one which is supposed to change gets modified.)

--
TTTATCGGTCGTTATATAGATGTTTGCA


In reply to Re: Why XSLT and not just Perl? by TomDLux
in thread Why XSLT and not just Perl? by blahblah

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.