6 Replies Latest reply on Feb 20, 2008 5:53 AM by Andreas Watler

    Smooks: smooks-cdr.lst

    Andreas Watler Newbie

      Hi,

      I have a quick question about the file: smooks-cdr.lst.
      I keep on reading about this file both in the documentations and the quickstart-readmes.
      But in the quickstarts I have (jbossesb-server-4.2.1GA or jbossesb-server-4.2GA) there never is such a file included.

      My question is, do I still need this file when using Smooks in JBossESB?
      If so, where can I find an example of this file?
      If it isn't needed any more, how is the configuration of Smooks done now?

      Thanks alot
      Andreas

        • 1. Re: Smooks: smooks-cdr.lst
          Daniel Bevenius Master

          Hi Andreas,

          since version 0.9 of Smooks the smooks-cdr.lst is no longer needed.
          With Smooks 0.9, which JBossESB is currently using, the content handlers are loaded from the jar files.
          For example, templating-cdu-creators-0.1.cdrl exists in milyn-smooks-templating-0.3.jar and is read from that jar.
          In Smooks 1.0 the classpath is scanned for META-INF/content-handlers.inf files which list the content handlers that are to be loaded.

          So, for both version 0.9 and 1.0 it is enough that the required jars are on the classpath.


          Regards,

          Daniel

          • 2. Re: Smooks: smooks-cdr.lst
            Andreas Watler Newbie

            Hi,

            thanks for your answer!
            That makes things allot clearer for me!

            Thanks
            Andreas

            • 3. Re: Smooks: smooks-cdr.lst
              Daniel Bevenius Master

              Actually, I was wrong about the way it works in v0.9 with the ESB, but the end result is the same though.

              In the current version the SmooksInstanceManager takes care of the loading of content handlers and this is what makes
              smooks-cdrl.lst redundant in that version of the ESB. But with v1.0 it will work like I described above.

              Regards,

              Daniel

              • 4. Re: Smooks: smooks-cdr.lst
                Andreas Watler Newbie

                Thanks anyways!

                While we're at it, I wanted to be certain about something.
                I tried to use XSLT2.0 functions in an XSLT I use with Smooks.
                I figured they won't work, and they didn't.

                I remember reading something about Smooks just using very simple XSLT on the Smooks website,
                but I didn't found anything particularly on XSLT2.0.
                So I'm guessing these features aren't supported by Smook, am I right there?
                I always thought Smooks uses one of the known xslt-processors somewhere inside.
                Or does it implement the processing all new?


                Regards
                Andreas

                • 5. Re: Smooks: smooks-cdr.lst
                  Daniel Bevenius Master

                  Smooks uses JAXP to utilize existing XML processing technologies.
                  So Smooks will use JAXP's default processor by looking it up in the following order:

                  1. Use the value of the javax.xml.transform.TransformerFactory system property if it exists.
                  2. If JRE/lib/jaxp.properties exists, then look for a javax.xml.transform.TransformerFactory=ImplementationClass entry in that file.
                  3. Use a JAR file service provider to look for a file called META-INF/services/javax.xml.transform.TransformerFactory in any JAR file on the CLASSPATH.
                  4. Use the default TransformerFactory instance.

                  This is the default lookup behaviour for JAXP.

                  You could also take at look at the POM for the xslt-groovy example
                  http://svn.codehaus.org/milyn/trunk/smooks-examples/xslt-groovy/pom.xml,
                  which shows how to switch in and out different XSL Processor impls.

                  Could you tell us what features that you reqiure?

                  Regards,

                  Daniel

                  • 6. Re: Smooks: smooks-cdr.lst
                    Andreas Watler Newbie

                    Hi,

                    Thanks for the reply.
                    Just now I figured that Smooks uses JAXP, because of some exception messages I got doing a transformation :-).

                    I wanted to use some XPath functions from NS: http://www.w3.org/2005/xpath-functions.
                    I was about to settle with doing the desired actions over groovy or something like that,
                    but I will try the processor-switching from the example now first.

                    Again thanks allot for your help!

                    Regards
                    Andreas