in reply to Re^21: aXML vs TT2
in thread aXML vs TT2

Ok there's two issues here, outputting to a browser, and outputting a literal string.

In the context of making the browser display <db_select>, you can use the specails the browser understands, &lt;db_select&gt;

In the context of outputting the literal string the only way to do that that I can think of is using a <post_include> type plugin, and storing the string you want literally output without being processed, in a separate file which is included post processing immediately prior to exit.

in the aXML ----------- <post_include>path/to/splarg</post_include> in 'splarg' ----------- <db_select> ...

Replies are listed 'Best First'.
Re^23: aXML vs TT2
by ikegami (Patriarch) on Oct 23, 2011 at 06:34 UTC
    I recommend creating a builtin plugin "<lt>" that outputs "<", then one could use <lt></lt>db_select>.

      That's a good suggestion however it wouldn't work.

      Once the <lt> tag has executed the document would then contain a valid <db_select> tag and the parser would pick up on it and execute it because it loops until it cannot find any more matches.

        That's the concern ikegami has.

        It's a subtle concern, but it's an important one. This is one reason why, for example, Perl allows you to choose alternate delimiters for strings and regular expressions and substitutions. Without that, you might get stuck in a weird dimension of quoting, and without quoting, there are certain programs and pieces of data you can't represent.


        Improve your skills with Modern Perl: the free book.

Re^23: aXML vs TT2
by ikegami (Patriarch) on Oct 23, 2011 at 06:38 UTC
    What's a "<post_include> type plugin"?

      I think it was solution 2 where I described it, but in a nutshell, that tag would take a path to a file which contains the string to be literally output, load it into memory and return a position marking token to the document. At the post processing stage immediately prior to exit that token would then be replaced with the value from memory.

        I don't know how to create a post-include type plugin -- well any plugin, really -- but could "lt" be one of them?