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

Earlier, you said "&lt;db_select&gt;" outputs "<db_select>", but now you say it outputs "&lt;db_select&gt;".

So how do I output "<db_select>" if db_select is a plugin? What about outputting "&lt;db_select&gt;"?

Replies are listed 'Best First'.
Re^22: aXML vs TT2
by Logicus (Initiate) on Oct 23, 2011 at 06:17 UTC

    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> ...
      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.

      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.