[Radiant] Can radiant tags replace simple XSLT?

Andrew O'Brien obrien.andrew at gmail.com
Thu Jul 5 14:16:55 CDT 2007


Hi Dave,


If you want to get away from XSLT but still want to keep this XML format,
you could always make an extension that defines a filter and keep your XML
data in a separate page part (so that the filter is only applied to that
data).  There's an example filter in the trunk:

http://dev.radiantcms.org/radiant/browser/trunk/extensions/sass_filter

and another extension that adds a filter on the 3rd party extension page
(Maruku Filter I think?).


In your filter class, you would define a "filter(text)" method that takes
the input text and outputs your final html.  So in that method you could run
over the XML with REXML or Hpricot (or any other library) and handle the
transformation.


Or the filter could run an XSLT transformation if one were so inclined.


-Andrew

On 7/5/07, dave4c03 <dave4c03 at greatchiro.com> wrote:
>
> Personally, I agree with Martin Fowler on this matter.  See
> http://www.martinfowler.com/bliki/MovingAwayFromXslt.html
>
> Unless speed is critical I will simplicity whenever possible.
>
>
> On 7/5/07, Keymone <keymone at gmail.com> wrote:
> >
> > just curious: isn't XSLT faster than any radiant template parser?
> > XSLT is bad only in one thing - when it goes to dynamic data,
> > you can't change input XML on fly but XSLT parser is really good idea
> > for template language.
> >
> > --
> > Regards, Keymone
> > _______________________________________________
> > Radiant mailing list
> > Post:   Radiant at lists.radiantcms.org
> > Search: http://radiantcms.org/mailing-list/search/
> > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> >
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>



More information about the Radiant mailing list