[xsl] Please comment on following XML/XSL approach....

Subject: [xsl] Please comment on following XML/XSL approach....
From: "Lee, Insoo" <Insoo.Lee@xxxxxx>
Date: Tue, 19 Nov 2002 16:04:36 -0500
  I am using following code to generate reports and it works, but...
  Could you please comment on this approach?

	URL url = new URL(
"http://nyamdweb03.company.com/fd/xml/report_cab?entity=123&branch=abc"; );

            InputSource source = new InputSource( url.openStream());
            DOMParser parser = new DOMParser();
            parser.parse( source );
            Document doc = parser.getDocument();

            // Create a TransformerFactory
            TransformerFactory tFactory = TransformerFactory.newInstance();

            //  Create a StreamSource
            StreamSource xslSource = new StreamSource(
"http://nyamdweb03.company.com/fd/xml/report_cab.xsl"; );

            //  Use the above StreamSource to build a new Transformer
            Transformer transformer = tFactory.newTransformer( xslSource );

            //  Build a new DOMSource for the document loaded in step 1
            DOMSource inXML = new DOMSource( doc );
            StreamResult outXML = new StreamResult( out );
            transformer.transform( inXML, outXML );


  1) the servlet 'report_cab' on the first line will run sql to retrieve
results set with passed parameters from the request object.
      Then, this servlet will build XML from the results set using JDOM.
(so, if you were to go to http://nyamdweb03....... report_cab?..., you would
see an XML)

	question) would this be safe? security wise?  Is this a common
practice to get servlet to generate XML from database and refer to it to
create URL InputSource?

  2) Next, it will create a streamSource from static XSL

	questoin) is this an industrial standard way to refer to XSL?

  3) Then, using Transformer to put them together and generate HTML or Excel
or PDF....

  Any comments would be greatly appreciated...  If it's ok, we are hoping to
release this out to production.
  Thanks much for your time and input..

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread