[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Please comment on following XML/XSL approach....

Subject: Please comment on following XML/XSL approach....
From: "Lee, Insoo" <Insoo.Lee@xxxxxx>
Date: Tue, 19 Nov 2002 16:04:36 -0500
domparser javascript
  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.