Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^21: aXML vs TT2

by ikegami (Patriarch)
on Oct 23, 2011 at 06:02 UTC ( [id://933154]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://933154]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-23 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found