Subject: Re: Problems executing Oracle XSQL v1.0.1.0 From: "Steve Muench" <smuench@xxxxxxxxxxxxx> Date: Thu, 24 Aug 2000 09:21:06 -0700 |
| I was not so lucky this morning ... | | $ java oracle.xml.xsql.XSQLCommandLine hello.xml hello.xsl hello.htm | Ken, You're mixing up two different things whose names are addmittedly similar, so perhaps slightly confusing. I'll try to explain what's going on. There are two different systems were talking about here. (1) Oracle XSLT Processor - Implements XSLT 1.0 spec (2) Oracle XSQL Pages - Publishing framework that makes it easy to combine SQL, XML and XSLT. Both (1) and (2) come with command-line processors which do their respective jobs from the command line: (1) oracle.xml.parser.v2.oraxsl This is the command-line XSLT transformation tool. You use it like "xt" or "saxon" (or others) to Transform a source XML document into a target using a stylesheet with the syntax (assuming you're using the supplied oraxsl.bat script): $ oraxsl source.xml style.xsl [output.xyz] (2) oracle.xml.xsql.XSQLCommandLine This is the command-line processor for "XSQL Pages" which are XML-based templates that make it easy to assemble XML information and transform it using XSLT For example, while a lot more powerful than this, here is what a very simple XSQL Page looks like: <?xml version="1.0"?> <!-- emplist.xsql: Show Employees for a Given Department --> <?xml-stylesheet type="text/xsl" href="employee-list.xsl"?> <xsql:query xmlns:xsql="urn:oracle-xsql" connection="hr"> SELECT name, work_phone FROM employee_table WHERE deptno = {@dept} </xsql:query> This template is processed by the XSQL Page Processor to produce a result by assembling XML source information from a variety of XML "producers" or "sources". The example above uses one of the built-in sources for getting XML from database query results. The template effectively says: -> Query name and work_phone info for employees in the department whose number is passed in the "dept" parameter (and turn this on the fly into XML content for the "data page") -> Transform the resulting XML data page (by default, in the server) using the XSLT stylesheet "employee-list.xsl" The result would be an HTML-formatted list of employees in a department. Using the XSQL Servlet you could get the SQL/XML/XSLT employee list by doing: http://yourserver/emplist.xsql?dept=15 or you can use the XSQLCommandLine tool to process the exact same output in batch with: $ xsql emplist.xsql Both (1) and (2) make use of the XSLT processor. By doing (1), you are using the XSLT processor directly at the command line. By doing (2) you are indirectly using it as part of assembling XML information and transforming its results. >From the example you are trying, it looks like you want (1). :-) ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG Author "Building Oracle XML Applications", O'Reilly http://www.oreilly.com/catalog/orxmlapp/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Problems executing Oracle XSQL v1.0, G. Ken Holman | Thread | Re: Problems executing Oracle XSQL , G. Ken Holman |
Re: parse malformed XML element, Eric van der Vlist | Date | Re: VAJava XSLT result (perfect HTM, Gary L Peskin |
Month |