[Catalyst] HTML::Widget and output into a html table

John Beppu john.beppu at gmail.com
Fri Apr 14 01:37:16 CEST 2006


On 4/13/06, Dave Hodgkinson <davehodg at gmail.com> wrote:

> > [% USE widget_stylesheet = XSLT('stylesheet.xsl');
> >   widget.as_xml | $widget_stylesheet %]
> >
> > in action.  I was impressed when mst posted that, and I wanted to
> > see if it would really work.
>
>
> And does it? I'm having a total 'mare trying to get CSS forms looking
> even passable. If you have xsl that works, I'd love to see it.

Yes!  It works.  :-)

The XSL stylesheet I'm currently using is closer to the original one I
posted with some of Paglatzis' refinements incorporated.  However, I
didn't go all the way with the identity transformations, because when
I tried them out, there were a few bugs in the output, and I'm not in
the mood to do battle with XSLT any more than I have to.  I will post
my stylesheet after I've refined it a bit more.

With that said, let me leave you with an unexpected behaviour I
observed from Template::Plugin::XSLT.  The stylesheet that you pass to
the plugin when you say [% USE xsl = XSLT('stylesheet.xsl') %] doesn't
seem to know anything about Template Toolkit's template root.  When
passing in the filename, I ended up using an absolute path, so I'd say
something like: [% USE xsl = XSLT('/var/www/sites/x/stylesheet.xsl')
%] .  That way, I could be sure I was getting the right .xsl file, but
something about that doesn't feel right.

Perhaps, with a little experimentation, I can find out what my current
working directory is so that I can pass XSLT() a relative path, but I
haven't gotten that far, yet.  I'll keep you guys updated, though.



More information about the Catalyst mailing list