Package org.exoplatform.services.xml.transform.trax

Examples of org.exoplatform.services.xml.transform.trax.TRAXTemplates


      try
      {
         TRAXTransformer transformer = null;
         if (schemeName != null)
         {
            TRAXTemplates t = templatesService.getTemplates(schemeName);
            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            String msg = "XSLT scheme name is null.";
            throw new NullPointerException(msg);
View Full Code Here


      try
      {
         TRAXTransformer transformer = null;
         if (schemeName != null)
         {
            TRAXTemplates t = templatesService.getTemplates(schemeName);
            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            String msg = "XSLT scheme name is null.";
            throw new NullPointerException(msg);
View Full Code Here

      try
      {
         TRAXTransformer transformer = null;
         if (schemeName != null)
         {
            TRAXTemplates t = templatesService.getTemplates(schemeName);
            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            String msg = "XSLT scheme name is null.";
            throw new NullPointerException(msg);
View Full Code Here

      assertNotNull("empty xsl", xslInputStream);
      Source xslSource = new StreamSource(xslInputStream);
      assertNotNull("get xsl source", xslSource);

      // init templates
      TRAXTemplates traxTemplates = traxService.getTemplates(xslSource);
      assertNotNull("get templates", traxTemplates);

      // get transformer
      TRAXTransformer traxTransformer = traxTemplates.newTransformer();
      assertNotNull("get transformer", traxTransformer);

      // transform
      traxTransformer.initResult(new StreamResult(byteOutputStream));
      traxTransformer.transform(new StreamSource(res));
      res.close();

      assertTrue("Output is empty", byteOutputStream.size() > 0);

      // other transformer from same templates

      TRAXTransformer traxOtherTransformer = traxTemplates.newTransformer();
      assertNotNull("get Other transformer", traxOtherTransformer);

      res = resourceStream("rss-in.xhtml");

      assertTrue("Empty input other file", res.available() > 0);
View Full Code Here

      try
      {
         TRAXTransformer transformer = null;
         if (schemeName != null)
         {
            TRAXTemplates t = templatesService.getTemplates(schemeName);
            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            throw new IllegalArgumentException("XSLT scheme name is null.");
         }
View Full Code Here

      try
      {
         TRAXTransformer transformer = null;
         if (schemeName != null)
         {
            TRAXTemplates t = templatesService.getTemplates(schemeName);
            if (t == null)
            {
               String msg = "Template " + schemeName + " not found.";
               throw new IllegalArgumentException(msg);
            }
            transformer = t.newTransformer();
         }
         else
         {
            throw new IllegalArgumentException("XSLT scheme name is null.");
         }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.xml.transform.trax.TRAXTemplates

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.