Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • [% thingy | html %]

    Will automatically do the > for you, but you knew that.

    Cool hack. Shouldn't you be doing this with SAX though? Just place <acmepresentation:tagname/> in the right place and using a nice filter...
    • Oh, thanks. I'd forgotten about that. I could be using SAX, except SAX is horribly complicated when you're passing things around[1]. Template Toolkit is a tool I know well and I bet you dealing with XML in text blocks is faster than dealing with 500,000 XML events too.

      [1] Stop complaining that I complain about SAX too. It may be simple, but isn't practical.

      • Okay, then you could extract out the text with a XPath statement (using Template::Plugin::XML::LibXML, natch) then rerender it through a VIEW. At least this way you won't be screwed when apple decide to put a [% in their template ;-).

        Hmm, you could do a presentation on that itself. "How I created this presentation: A fully recursive talk".

    • TBH I'm not sure that SAX would be a good idea to do that. SAX is meant to be low-level, and works marvels at that. It's as close as you can get to XML without going lexical. Anyone using it for higher-level things will find it impractical, and rightly so.

      Other XML-orientated options that would be fit here could be XSLT (which acme also hates) or a number of modules from Barrie Slaymaker that deal with SAX at higher levels (eg XML::Essex or XML::Filter::Dispatcher).

      --

      -- Robin Berjon [berjon.com]