[
Lists Home |
Date Index |
Thread Index
]
- From: "Steve Muench" <smuench@us.oracle.com>
- To: "Anton Schoultz - ePOS" <antons@epos.co.za>, "XML-DEV LIST" <xml-dev@ic.ac.uk>
- Date: Fri, 5 Nov 1999 07:05:42 -0600
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@epos.co.za>
To: XML-DEV LIST <xml-dev@ic.ac.uk>
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@ic.ac.uk
| Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on
CD-ROM/ISBN 981-02-3594-1
| To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
| unsubscribe xml-dev
| To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
| subscribe xml-dev-digest
| List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|
|
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|