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

Re: oracle.xml.parser.v2.XSLProcessor & XSLStylesheet

  • From: "Steve Muench" <smuench@u...>
  • To: "Anton Schoultz - ePOS" <antons@e...>, "XML-DEV LIST" <xml-dev@i...>
  • Date: Fri, 5 Nov 1999 07:05:42 -0600

oracle.xml.parser.v2.xslprocessor
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!

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.