4 Replies Latest reply on Mar 26, 2004 1:53 PM by rebornspirit

    XSLT implementation

    rebornspirit

      Just wrote my first module (not counting the hello world ;) ...)
      I have to say that developing modules for NUKES is REALY EASY.

      What i did was an XSLT implementation to have a clearer seperation between logic and layout. Instead of saving my xsl files in the web directory I just drop it in my java packages and read get it with the classloader, transform it (my business object are converted into documents) and put the result back on the page.print().

      I looks nice and it took now time at all, NUKES, you got my vote from now one.

      Grtz

        • 1. Re: XSLT implementation
          ntemple

          Are you going to be able to release this module (or another one based on XSLT?) I'm curious how the implementation was done.

          Nick

          • 2. Re: XSLT implementation
            rebornspirit

            The implemention of XSL was just of quick-and-dirty first try, it works, but I would first like to understand the core a little better (still have to read what a template engine does :) ... ). So I think it's for the moment to early to show me my example.

            But if you want to know what I did, here it goes:

            - I save all my xsl files in a java package, so that I don't have to explode my core war to place all the xsl's in there.
            - In my module I just call my business logic that does whatever it needs to do, I return my business object and pass it on to my xstRender class, there the business object is being transformed in an xml object.
            - I do a lookup of my xsl file using the classloader
            - create my result using the xml object
            - drop the result on the page.print() statement

            That's it, it's a start but ...

            I like to hear from other people how they would implement xslt in ther Nukes

            • 3. Re: XSLT implementation
              ntemple

              Very similar to the way I handled Velocity. I'd like to compare notes on this sometime soon (specifically the module API and how to handle functions like openTable() from a templating engine such as XSLT).

              Right now I'm burried in a PHP project that is supposed to be launched next week ....

              Hopefully I can use Nukes instead of PHP for the next one.

              • 4. Re: XSLT implementation
                rebornspirit

                Nick, I have just send you a mail by using your site, hope it works ;) Otherwise you can contact me on maarten_volders@hotmail.com.

                Grtz