Text manipulation is one of the tasks that Perl was developed for in the first place. If you already know Perl, then XSLT is going to seem like a poor substitute. I guess the easiest way to put it is along these lines: XSLT wasn't written for you.

That's an overstatement, of course. It's just that XSLT was written as a XML vocabulary for transforming other XML documents. For an XML author, it has the advantage of familiar syntax. It's also easy to write tools around XSLT (using Perl, for example) to produce a shiny GUI. But if you're only creating them for yourself, you might be happier with Perl.

The bits of XSLT that I really like involve other tidbits, like XPath. Still learning it, but it's a tremendously convenient notation for building links.

Besides, there's nothing to stop a clever Perlmonk from embedding Perl code as preprocessor instructions somehow. Then you would get the best of both worlds. Or the worst, depending on your mood that day.


In reply to Re: Why XSLT and not just Perl? by webfiend
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.