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

Examples of org.exoplatform.services.xml.transform.trax.TRAXTransformer.transform()


         {
            String msg = "XSLT scheme name is null.";
            throw new NullPointerException(msg);
         }
         transformer.initResult(new StreamResult(outStream));
         transformer.transform(source);
      }
      catch (TransformerConfigurationException tce)
      {
         throw new IOException("Can't write to output stream " + tce);
      }
View Full Code Here


            for (Map.Entry<String, String> e : xsltParams.entrySet())
            {
               transformer.setParameter(e.getKey(), e.getValue());
            }
         }
         transformer.transform(source);
      }
      catch (TransformerConfigurationException tce)
      {
         throw new IOException("Can't write to output stream " + tce);
      }
View Full Code Here

            for (Map.Entry<String, String> e : xsltParams.entrySet())
            {
               transformer.setParameter(e.getKey(), e.getValue());
            }
         }
         transformer.transform(source);
      }
      catch (TransformerConfigurationException tce)
      {
         throw new IOException("Can't write to output stream " + tce);
      }
View Full Code Here

      // init transformer
      TRAXTransformer traxTransformer = traxService.getTransformer(xslSource);
      assertNotNull("get transformer", traxTransformer);

      traxTransformer.initResult(new StreamResult(outputFileOutputStream));
      traxTransformer.transform(new StreamSource(res));

      res.close();
      outputFileOutputStream.close();

      // read the output file
View Full Code Here

      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
View Full Code Here

      assertTrue("Empty input other file", res.available() > 0);

      ByteArrayOutputStream byteOtherOutputStream = new ByteArrayOutputStream();

      traxOtherTransformer.initResult(new StreamResult(byteOtherOutputStream));
      traxOtherTransformer.transform(new StreamSource(res));
      res.close();
      assertTrue("Output other is empty", byteOutputStream.size() > 0);

   }
View Full Code Here

            for (Map.Entry<String, String> e : xsltParams.entrySet())
            {
               transformer.setParameter(e.getKey(), e.getValue());
            }
         }
         transformer.transform(source);
      }
      catch (TransformerConfigurationException tce)
      {
         throw new IOException("Can't write to output stream " + tce);
      }
View Full Code Here

            for (Map.Entry<String, String> e : xsltParams.entrySet())
            {
               transformer.setParameter(e.getKey(), e.getValue());
            }
         }
         transformer.transform(source);
      }
      catch (TransformerConfigurationException tce)
      {
         throw new IOException("Can't write to output stream " + tce, tce);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.