Hi,

 

   I tried the command “java -cp .\saxon\saxon9he.jar net.sf.saxon.Transform -t -s:operationsReport_1_151624.xml  -xsl:operationReport.xsl “ to generate multi html files.

It works well.  

  

  The following is what I use now.  However, it could not produce multi html files.  I wonder how I can use saxon9he in java code.

 

 

              InputStream xsltStream = null;

              xsltStream = MessageContentUtil.class.getClassLoader().getResourceAsStream(DEFAULT_XSL_PATH);      

 

              Source xsltSource = new StreamSource(xsltStream);

             

              File f = new File( "\\messagepoint\\reports\\operationsReports\\operationsReport.xml" );

              InputStream xmlStream = new FileInputStream(f);

              Source xmlSource = new StreamSource(xmlStream);

             

              TransformerFactory transFact = TransformerFactory.newInstance();

              URIResolver resolver = new URIResolver() {

                     public Source resolve(String href, String base)

                                  throws TransformerException {

                           InputStream includeXSLTStream = MessageContentUtil.class

                                         .getClassLoader().getResourceAsStream(

                                                       "com/prinova/messagepoint/model/util/" + href);

                           Source includeXSLTSource = new StreamSource(includeXSLTStream);

                           return includeXSLTSource;

                     }

              };

              transFact.setURIResolver(resolver);

              Transformer trans = transFact.newTransformer(xsltSource);

 

              ByteArrayOutputStream reportHTMLstream = new ByteArrayOutputStream();

              trans.transform(xmlSource, new StreamResult(reportHTMLstream));

 

Thanks,

Kate