[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: oracle.xml.parser.v2.XSLProcessor & XSLStylesheet
The 2nd argument is a URL which is used as the base url for <xsl:import> and <xsl:include>. It's most relevant if you are passing the XSLStylesheet() constructor an InputStream as the first argument, and it gives the class that extra bit of "base uri" information that it cannot get out of the stream. If you're not using include/import, then it's ok to pass a null. So you can do: // Create the Stylesheet from the stream XSLStylesheet theXSLStylesheet = new XSLStylesheet(XSLStream,null); // Create an instance of XSLProcessor to perform the transformation XSLProcessor processor = new XSLProcessor(); // Transform theXMLDoc by theXSLStylesheet and write result to // System.out. This obeys all the rules of <xsl:output> while // writing it out processor.processXSL(theXSLStylesheet, theXMLDoc, System.out ); or // Transform and keep hold of raw result DocumentFragment DocumentFragment df = processor.processXSL(theXSLStylesheet, theXMLDoc); You might want to check out the Oracle XSQL Servlet on our Technet website which is a servlet that does this for you already, as well as our XML Forum on OTN where there's a Q and A forum on our components. _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Development Team http://technet.oracle.com/tech/java http://technet.oracle.com/tech/xml ----- Original Message ----- From: Anton Schoultz - ePOS <antons@e...> To: XML-DEV LIST <xml-dev@i...> Sent: Friday, November 05, 1999 8:03 AM Subject: oracle.xml.parser.v2.XSLProcessor & XSLStylesheet | Hi Gang, | | Do any of you have experience in using oracle's parser stuff, in particular | the XSL Processor? | | According to the very skimpy notes (see below) , the XSLStylesheet has a | constructor which takes two URL objects, one for the xsl, the other a | 'Reference'. | | I have set up an xml document, it's DTD and an xsl style sheet. I can browse | the xml with IE5 and it reads the style sheet and applies it as desired. Now | I want to do the stylesheet processing from inside a JAVA servlet. Thus far | the servlet can read and parse the XML using the DTD. But I can't seem to | get the code to build up the style sheet which I need as a parameter for the | XSL Processing. | | Can anyone help ? | | Regards | Anton | | | <quote> | | public XSLStylesheet(URL xsl, | URL ref) throws XSLException | | Constructs an XSLStylesheet using the given URL | | Parameters: | xsl - XSL input as a URL | ref - Reference URL for include, import and external entities | Throws: XSLException | on error. | | </quote> | | | xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... | Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 | To unsubscribe, mailto:majordomo@i... the following message; | unsubscribe xml-dev | To subscribe to the digests, mailto:majordomo@i... the following message; | subscribe xml-dev-digest | List coordinator, Henry Rzepa (mailto:rzepa@i...) | | xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|