It's totally illogical trying to compare aXML and TT2!. On the one hand yes aXML can be used for templating, but on the other hand it is not a templating system or even a language, it's just a simple set of rules on how to process a quasi-xml style document, from which great depth and complexity can be derived.

It doesn't even make sense to try and provide an example of the same thing as above done in aXML, since all you would need to do to replicate that output is write a little perl script like :

$result = ""; for (my $ctr=1;$ctr<4;$ctr++) { $result .= "recursion count: $ctr\n\n"; }

Save that as a plugin say "count.aXMLpi", and then add the tag "<count></count>", into any document that wants to use it. So when people ask for examples comparing TT2 and aXML, I'm stumped because the two are not equivalent paradigms.

Let me give you another quick example; one of the plugins I have written for aXML implements an Ajax powered chatroom. The code to output the javascript for the chatroom is written in perl, and if I want an Ajax chatroom on any page of any site I write, then all I have to do is add the plugin to that site's plugin folder (I don't keep it in the global plugin folder), and then add the following to the aXML file for that page :

<ajaxchat>ajaxresponder</ajaxchat>

Then I just make an action called ajaxresponder which loads the chat data either from a file or the database or whatever (programmers choice) and returns it when the browser is updating the chatwindow which was created by the plugin ajaxchat.


In reply to Re^2: H.O.P && aXML by Logicus
in thread H.O.P && aXML by Logicus

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.