XSQL stylesheet parameters

I'm using the xsql proccessor in order to insert an xml into the database.
I have 1000 xml files that should be inserted and 4 xsl style sheets to transfrom them into the xsql xml-form <rowset></rowset>.
would like to find out how to pass a parameter to the xsl stylesheet so that the id of the inserted row changes each time.
I know how to pass a parameter to the xsql page but not further to the xsl page.
please send answers to [email protected]
tnx

Use <xsql:set-stylesheet-param> to do this.

Similar Messages

  • Stylesheet Parameters with setParam

    Hello,
    I have the following java code (to set the foo parameter):
    URL xslURL = createURL(styleSheetFile);
    parser.parse(xslURL);
    xslDoc = parser.getDocument();
    xsl = new XSLStylesheet(xslDoc, xslURL);
    xsl.setParam("foo", "hi");
    XSLProc.processXSL(xsl,(XMLDocument)xmlDoc, out);
    The XSL file uses:
    <xsl:param name="foo"/>
    <xsl:param name="sp"/>
    <xsl:template match="/nwc/plan" >
    <xsl:value-of select="@id"/>
    value of foo=<xsl:value-of select="foo"/>
    </xsl:template>
    </xsl:stylesheet>
    The problem is that the style sheet is not displaying me the value for foo...
    Thanx

    Hello,
    You must write :
    1-xsl.setParam("foo", "'"+"hi"+"'");
    XSLProc.processXSL(xsl,(XMLDocument)xmlDoc, out);
    2 -
    <xsl:value-of select="$foo"/>
    null

  • XSQL Input parameters containing apostrophes

    Input parameters containing apostrophes cause actions
    such as include-owa to break if I use lexical substitution. I can use bind variables instead if the
    number of parameters is always the same.
    How can I pass values containing apostrophes when the
    number of parameters is not always the same?

    Use &amp;#39; instead of '

  • ANN: XSQL Servlet 0.9.8.6 Release Available

    Oracle is excited to announce the 0.9.8.6 technology preview
    release of Oracle XSQL Pages and the XSQL Servlet with major
    new functionality.
    -----------------[ Download Info ]-------------------
    http://technet.oracle.com/tech/xml/xsql_servlet/
    Click on "Software" to Download
    Click on "Release Notes" for Full Documentation
    XSQL Pages are server-side XML templates that make it easy
    to exploit the powerful combination of SQL, XML and XSLT to
    prototype and deploy dynamic, data-powered sites and web
    services.
    The XSQL Servlet installs into your favorite Java Servlet
    environment and works with your favorite relational database,
    making it dead easy to:
    -> Assemble XML "DataPages" from multiple SQL Query
    Results (including full support for Oracle8i's
    richly-structured XML Objects Views), local or remote
    XML resources, Stored Procedure Calls, etc.
    -> Transform the "DataPages" in the server using XSLT,
    optionally using stylesheets that are appropriate to
    the requesting client, including the ability to
    let the client to the stylesheet processing for IE5
    or other clients in the future that support this.
    Our online support forum for XML is at:
    http://technet.oracle.com/support/bboard/discussions.htm
    The XSQL Servlet demos (included in the release) are
    installed on Oracle's OTN site and can be tested from the
    comfort of your browser before you download if you choose:
    http://technet.oracle.com/tech/xml/demo/demo1.htm
    This new 0.9.8.6 release includes...
    More Documentation
    ==================
    More extensive documentation and new tutorial material.
    New Demos
    =========
    New and enhanced demos with additional notes describing key
    points each demo is trying to illustrate.
    New API's and JavaDoc
    =====================
    Programmatically process XSQL Pages from your own Java
    programs using a new XSQLRequest object, as well as write
    custom page "action handlers" with new JavaDoc and
    example code.
    New Features
    ============
    <xsql:query>
    The <query> element from previous releases is now part of
    the xsql namespace and is referred to using the new
    <xsql:query> syntax in your XSQL Page. A new section details
    how to use <xsql:query> to produce XML query results with
    nested structure.
    <xsql:dml>
    Do DML and call stored procedures anywhere you need to in
    your XSQL Pages.
    <xsql:stylesheet-param>
    Use parametrized XSLT Stylesheets and set the stylesheet
    parameter values from your XSQL Page.
    <xsql:insert-request>
    Automatically insert posted XML or HTML Form parameters into
    the database.
    <xsql:include-xml>
    Include arbitrary XML resources at any point in your page by
    relative or absolute URL.
    <xsql:include-request-params>
    Include key information like HTTP Parameters, Session
    Variable values and Cookies into your XSQL Page for
    addressing them in your stylesheet.
    <xsql:include-xsql>
    Include the results of one XSQL Page at any point inside
    another. This allows sophisticated combinations of multiple
    XML data sources and multiple XSLT transformations.
    <xsql:include-owa>
    Include the results of executing a stored procedure that
    makes use of the Oracle Web Agent (OWA) packages inside the
    database to generate XML.
    <xsql:action>
    Invoke a user-defined action handler, implemented in Java,
    for executing custom logic and including custom XML
    information into your XSQL Page.
    null

    That error message is outdated and should read:
    Cannot find XSQLConfig.xml in your server-side classpath. The error is definitely that it's not finding XSQLConfig.xml on your classpath. The likely cause is that you did not add the directory:
    ./xsql/lib
    to your CLASSPATH in the JRun Servlet Engine Java environment.

  • Webservices and XSQL

    Hi!
    I have a question: I would like to use Oracle's XSQL servlet. I have a .xsql file
    which calls a function and returns a data in XML format. Now how can I use this
    in weblogic using webservices?
    Anybody has an idea?
    Thanks in advance
    ..Madhuri

    Currently, WebLogic Web Services only use Stateless Session EJBs (for RPC-style)
    and JMS destinations (for Message-style). You can, of course, deploy other Web
    Service Platforms (i.e. Apache SOAP, GLUE, WASP, etc.) on WLS 6.1 and use them
    ;-) They usually support using POJOs (Plain Old Java Objects) as Web service implementations.
    Is there some reason why you just aren't using the XSQL stuff by itself? It seems
    to be designed specifically for making SQL queries over HTTP, using XML ;-) Why
    do you need to create a Web service to "front-end" this capability? Seems like
    extra overhead (i.e. SOAP message processing, etc.) with no real "value-added",
    if you know what I mean ;-) Is it because you want (or need) to introduce a "layer"
    or facade pattern for XSQL, or something?
    Regards,
    Mike Wooten
    "Madhuri" <[email protected]> wrote:
    >
    Hi Mike!
    Thanks for the help. Is there any other way, I mean without using EJBs
    can I achieve
    the task?
    ...Madhuri
    "Michael Wooten" <[email protected]> wrote:
    Hi Madhuri,
    Unfortunately, it sounds like you will need more help than I can offer
    at this
    time. From your original post, I was under the impression that you knew
    about
    EJBs, Java XML parsers/XSLT processors, etc. I scoped out XSQL a bit
    more, and
    it looks like fairly powerful technology, but it requires knowledgeof
    XML/XSLT.
    Personally, I think you might need some "training" help to create aXSQLService
    with a WebLogic Web Service ;-) If you don't have time for that, perhaps
    you can
    search the Web for example code, and start from there.
    Regards,
    Mike Wooten
    "Madhuri" <[email protected]> wrote:
    Hi Mike !
    Do you have any sample code for the EJB where the method that accepts
    an org.w3c.dom.Element
    (or org.w3c.dom.Document) as a parameter, and returned the same, asI
    am new for
    the EJB or direct me the link where I can get info.. I really appresite
    your help.
    Thanks
    ..Madhuri
    "Michael Wooten" <[email protected]> wrote:
    Yeah, that's what I thought ;-)
    If you want the party that submitted to wait while the XSQL file isbeing
    processed,
    you'll want to build a RPC-style WebLogic Web Service, using the Literal
    XML encoding
    style. For this, you would have the Stateless Session EJB that actsas
    the entry-point
    into your Web service "implementation", have a method that accepts
    an
    org.w3c.dom.Element
    (or org.w3c.dom.Document) as a parameter, and returned the same. The
    remote interface
    for this SS would look something like this:
    public interface XSQLService extends javax.ejb.EJBObject
         public org.w3c.dom.Element process(org.w3c.dom.Element xsqlParameters)
    throws
    java.rmi.RemoteException, org.xml.sax.SAXException;
    From the information posted on Oracle's OTN site, the .xsql file(s)will
    live
    on the "server side", so all you need the Web service client to send
    is the parameters
    for the .xsql, right? That's why I called the input argument "xsqlParameters"
    in the method signature above ;-) Okay, so now we need a way for the
    client to
    tell us which .xsql file to use, right? If the client knows this,
    it's
    probably
    simpler if they put that in the parameter file too! So using the flighFinder
    example
    on OTN, that leaves us with a parameter file that looks kind of like
    this:
    <query uri="fly.xsql" stylesheet="none">
    <parameters>
         <FROM>LAX</FROM>
         <TO>SFO</TO>
    </parameters>
    </query>
    The implementation for the process(org.w3c.dom.Element xsqlQuery)method,
    is where
    you want to create the java.net.URL and java.net.URLConnection toconnect
    to the
    actual XSQL Servlet, I think. You could them use the getOutputStream()
    method
    on URLConnection, to get the XML returned by the XSQL Servlet, andmake
    it the
    return value. Knowing Oracle, they have defined a MIME-type extension
    for xsql,
    which is how they can "automagically" route http://localhost:7070/fly.xsql
    to
    the XSQL Servlet. Anyway, I haven't worked with XSQL Servlet before,
    but I would
    hope it is just a J2EE Web Application (.war file) that can be deployed
    into WLS.
    If so, it should be relatively simple to do what you want to do.
    Regards,
    Mike Wooten
    "Madhuri" <[email protected]> wrote:
    Hi Mike, Thanks for your prompt reply. I would like to send the XSQL
    file to a
    Web Service, and have it send it to the Oracle XSQL Servlet for processing.
    As
    XSQL Servlet processes SQL queries and outputs the result set as
    XML,and
    servlet
    takes an XML file containing embedded SQL queries (XSQL file), asits
    input. It
    returns the data in XML format and that's what exactly I would liketo
    do.
    Thanks ..Madhuri
    "Michael Wooten" <[email protected]> wrote:
    Hi Madhuri,
    What kind of WebLogic Web Service do you want to use? Document-oriented
    (i.e.
    where you pass in an XML document/well-formed fragment), or RPC-style
    (i.e. where
    you pass in function arguments)? What does the client pass to the
    Web
    Service?
    What, if anything, does it get back?
    From what I know, the Oracle XSQL Servlet processes SQL queries
    and
    outputs
    the
    result set as XML. This servlet takes an XML file containing embedded
    SQL queries
    (XSQL file), as its input. Do you want to send the XSQL file to
    a
    Web
    Service,
    and have it send it to the Oracle XSQL Servlet for processing? Doyou
    want the
    Web Service to create the XSQL file, from arguments passed in theSOAP
    Body element?
    Sorry to ask so many questions, but the answers will help me answeryour
    "original"
    question ;-)
    Regards,
    Mike Wooten
    "Madhuri" <[email protected]> wrote:
    Hi!
    I have a question: I would like to use Oracle's XSQL servlet. I
    have
    a .xsql file
    which calls a function and returns a data in XML format. Now howcan
    I use this
    in weblogic using webservices?
    Anybody has an idea?
    Thanks in advance
    ...Madhuri

  • Passing Parameter to XSL document (in XDK forPL/SQL)

    Here i' trying to pass parameters to my XSL document.But the value is not getting populated in the final document, can anyone help me on this.,.?
    // This is how i 'm passing parameter value to the XSL
    xslprocessor.setParam (styles,'p_batch_name','batch1');
    // Applyting stylesheet(xsl) with XMLdoc and storing it in a DOM node
    docn := xmldom.makeNode(xslprocessor.processXSL(engine,styles,doc));
    My XSL is like this
    <INSERT xsl:version="1.0" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="p_batch_name"/>
    <ROWSET table="abc">
    <xsl:for-each select="rowset/row">
    <ROW>
    <batch_name>"{$p_batch_name}"</batch_name>
    </ROW>
    <xsl:for-each>
    </ROWSET>
    <INSERT>
    But in the final document, the value (batch1) is not getting
    populated. it is coming as null .
    Can anyone help me ...
    null

    This does not work because of the following two things:
    [list=1]
    [*]The value of a parameter is interpreted as an XPath expression. Passing a value of batch1 will be interpreted as the XPath expression batch1 that will try to match any <batch1> child elements of the root of the source document. You need to include the value in quotes to have it be interpreted as a literal string:xslprocessor.setParam (styles,'p_batch_name','"batch1"');[*] The setParam method can only set the value of "top-level" stylesheet parameters. In your stylesheet, you've illegally used <xsl:param> inside a template. You need to switch from the "simple form" of a stylesheet to the "normal form" of the stylesheet to use a top-level parameter. So instead of:<INSERT>
    </INSERT>
    [code]
    you need instead:
    [code]
    <xsl:stylesheet>
    <xsl:template match="/">
    <INSERT>
    </INSERT>
    </xsl:insert>
    </xsl:stylesheet>[list]
    null

  • Application containing only resources and no run target

    HI Gentlemen,
    I have a set of web applications with XSQL sheets. These reference different subsets of stylesheets, and XML files as lookups from a large pool. Now it happens several times that a stylesheet or XML file is referenced in many different applications and it is physically placed in every corresponding project.
    I would like to store them in only one copy at a central place. A possible solution would be XMLDB repository, but JDeveloper does not find them as resources.
    Question: Is it possible to gather them in one application (or some kind of custom library or page etc.) together, so that I only have them occurring once? This would be very beneficial for later maintenance as well. The whole will then be deployed first in the integrated Weblogic server for porting some production server later.
    Please try to find a way if there exists one.
    Thanks, regards
    Miklos HERBOLY

    HI Timo,
    Many thanks. The idea of a custom shared library is almost as good as using resources. I have only one problem: The library members are all standalone XML instances, a single tree each. That is, both stylesheet and lookups are at the moment XML/XSLT files. I could store them in an XMLTYPE table but how to get them into a library? And how to access the library members thru href=... from a JDeveloper XSQL page (the stylesheet), and from an XSL stylesheet (the lookups)? Referencing goes as XSQL -> stylesheet -> lookups.
    Can you give me a hint?
    Thanks, regards
    Miklos

  • Passing parameters to an included xsql file (using xsql:include-xsql)

    Hi,
    because I want to use different stylesheets for my transformations I use the setup with including the actual query xsql file from a sort of wrapper xsql files around it with a different stylesheet instruction.
    All is fine but request parameters given to the wrapper xsql file are not visible in the actual query xsql file.
    I pass values to the included file as follows:
    <xsql:include href="url_off_file_to_include?p_par1={@p_par1}" reparse="yes" />
    The wrapper file has received the p_par1 parameter first.
    The value of the parameter does not end up in the included file.
    Any ideas ??
    Cumquat
    Dave Ruzius

    The include directive <%@ include %> adds the included file inline into including JSP.
    You probably would want to use the include action: <jsp:include page="includedPage.jsp" />. This will add the response of the included page at that location.
    However, keep in mind that the var in <c:forEach> would be scoped to within the tag, so it won't be accessible to the included page. What you can do, is use <c:set var="anotherVar" value="${vf}" scope="request" />. This will allow the contents of vf to be accessible in the included page via "anotherVar".
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Chaining stylesheets with XSQL!

    I am attemping to post a form to an XSQL page and insert the parameters into an Oracle database. The easiest way to do the tranformation is to apply a stylesheet to the XML generated automatically by the XSQL servelet and then apply another stylesheet to the result of the first transformation. I guess my real question is how can I apply a series of XSLT stylesheets in succession with each one operating on the results of the previous transformation?
    Thank you in advance for your time,
    Jason Long

    Dear Steve,
    My problem is that the <OPTIONS>...</OPTIONS> is not present in the orginal post. I am having a problem selecting this node in order to apply ext:xmlMarkup. The following is the exact code I am trying to use:
    This is the stylesheet that I am applying to the posted request. This works just fine.
    addItem.xsl
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ext="http://www.oracle.com/XSL/Transform/java/MarkupExtensions"
    exclude-result-prefixes="ext">
    <xsl:output method="xml" indent="no" />
    <!-- Root template -->
    <xsl:variable name="sku" select="//sku" />
    <xsl:template match="/">
    <ROWSET>
    <ROW>
    <xsl:apply-templates select="//sku | //quantity | //specialRequests | //customerID"/>
    <OPTIONS>
    <xsl:apply-templates select="//dropDown | //checkbox | //addOn"/>
    </OPTIONS>
    </ROW>
    </ROWSET>
    </xsl:template>
    <xsl:template match="dropDown">
    <dropdown id="{substring-before(text(),'|')}" value="{substring-after(text(),'|')}" />
    </xsl:template>
    <xsl:template match="OPTIONS">
    <OPTIONS>
    <xsl:value-of select="ext:xmlMarkup(*)" />
    </OPTIONS>
    </xsl:template>
    <xsl:template match="addOn">
    <addOn sku="{text()}" />
    </xsl:template>
    <xsl:template match="checkbox">
    <checkbox value="{text()}" />
    </xsl:template>
    <xsl:template match="dropDown">
    <dropdown id="{substring-before(text(),'|')}" value="{substring-after(text(),'|')}" />
    </xsl:template>
    <xsl:template match="quantity">
    <QUANTITY><xsl:value-of select="//quantity" /></QUANTITY>
    </xsl:template>
    <xsl:template match="specialRequests">
    <SPECIAL_REQUESTS><xsl:copy-of select="//specialRequests/text()" /></SPECIAL_REQUESTS>
    </xsl:template>
    <xsl:template match="customerID">
    <CUSTOMER_ID><xsl:value-of select="//customerID" /></CUSTOMER_ID>
    </xsl:template>
    <xsl:template match="sku">
    <SKU><xsl:value-of select="//sku" /></SKU>
    </xsl:template>
    <xsl:template match="submit" />
    </xsl:stylesheet>This is the XSQL page I am sending the request to for insert into the DB.
    addItem.xsql
    <?xml version = '1.0'?>
    <root xmlns:xsql="urn:oracle-xsql" connection="connJMLIE">
    <xsql:insert-request
    table="cart"
    transform="addItem.xsl" />
    </root>Every column is added except OPTIONS. This is null if any "<" are present. This is why I am trying to use ext:xmlMarkup.
    My problem is how do I apply the OPTIONS template to the results of the addItem.xsl in order to escape "<" and add the data as I intended?
    Thank you for your time Steve,
    Jason

  • XSQL with optional parameters

    I am trying to create an XSQL page that has optional parameters.
    What I mean is, I would like the page to return all records for a query when the following url is used http://myserver.com/my_inventory.xsql
    And I would like the page to return limited records for a query when the following url is used http://myserver.com/my_inventory.xsql?item=123
    I have been trying the following with no success. Any suggestions?
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rowset2inventorylevel.xsl"?>
    <xsql:if-param name="item" exists="no">
    <xsql:query connection="myconn" tag-case="lower" xmlns:xsql="urn:oracle-xsql">
    select m.item_no
    , m.description
    , m.qty_on_hand
    , nvl(p.gross_wt,0) weight
    from item_master m
    , item_price p
    where m.item_no = p.item_no
    and m.status_flag='A'
    and m.discontinue_flag = 'N'
    order by m.item_no
    </xsql:query>
    </xsql:if-param>
    <xsql:if-param name="item" exists="yes">
    <xsql:query connection="myconn" tag-case="lower" xmlns:xsql="urn:oracle-xsql">
    select m.item_no
    , m.description
    , m.qty_on_hand
    , nvl(p.gross_wt,0) weight
    from item_master m
    , item_price p
    where m.item_no = p.item_no
    and m.status_flag='A'
    and m.discontinue_flag = 'N'
    and m.item_no = ?
    order by m.item_no
    </xsql:query>
    </xsql:if-param>

    The easy, but less optimal way, is to use OR in your where clause:
    rewrite "and m.item_no = ?" to "and m.item_no = ? or ? is null" - and remember to include the parameter twice in bind-params.
    The "right" way to do this, meaning a more optimal access path, is to use stored procedures that returns REF CURSORs. Then in the stored procedure you look for NULL and change the where clause accordingly.

  • XSQL command line parameters

    I have a situation where I am generating some XML from a query in an XSQL and I want to use some command line parameters. This ony seems to work inside queries, e.g. given the command line "xsql quote.xsql quotetype=carhire quotenum=123" this will substitute 123 for "{@quotenum}" given the command line and leave "{@quotetype}" untouched.
    <pre>
    <quote type="{@quotetype}">
    <xsql:query>
    select price from quotes where number={@quotenum}
    </xsql:query>
    </quote>
    </pre>
    Is there a way to substitute the {@quotetype} part in XSQL?

    I'm already using XSLT and I've put <xsl:param name="type"> in the stylesheet, but references to $type don't seem to get any result, e.g.
    <xsl:value-of select="$type"/> is blank
    and
    <xsl:if test="$type='carhire'">
    <xsl:text>car hire</xsl:text>
    </xsl:if>
    doesn't generate any output either, so either I've got my syntax for parameters wrong, or the parameters don't get passed from the XSQL front end to the XSLT back end.

  • XSQL DTD, XSQL command line, XSL parameters

    I have three quick XSQL questions:
    1. Is there a DTD available for XSQL? I'd like to feed it to Emacs' PSGML mode (http://www.lysator.liu.se/projects/about_psgml.html). What do you other Emacsers use to edit XSQL and XSL files?
    2. XSQL is working fine under Apache/jserv, but the command line isn't finding my DB connections as defined in XSQLConfig.xml:
    XSQL-004: Could not acquire a database connection named: lcbean@isis
    Does this mean XSQL couldn't find the connection description, or couldn't connect to it after finding it? It does use CLASSPATH to locate XSQLConfig.xml, right?
    3. I'm trying to use parameters in an XSL stylesheet as follows:
    <html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:param name="store_code" select="'999'"/>
    <head><title>Test</title></head>
    <body><p><xsl:value-of select="$store_code"/></p></body>
    </html>
    But I keep getting:
    XSL-1031: Variable not defined: 'store_code'
    What am I missing?
    null

    [list=1]
    [*]No. Since XSQL action elements are allowed to appear anywhere in any well-formed XML document, you cannot really describe this in a DTD.
    [*]This means you put a connection="lcbean@isis" attribute on the document element of your XSQL page, but that it could not find a <connectiondef> for that name in XSQLConfig.xml (which is found successfully if it got this far!).
    [*] See Section 11.5 in the XSLT 1.0 specification. <xsl:param> must appear immediately at the top of a template before any literal result elements. This means that <xsl:param> cannot be used in a "simple-form" stylesheet. You can either use <xsl:variable> instead, or you'll have to change to the full-form of the <xsl:stylesheet> and place the <xsl:param> at the top-level of the stylesheet, outside of any <xsl:template>.
    [list]

  • Order of parameters to xsql:insert-request

    I am trying to create a general purpose xsl style sheet to generate a data input form using data from the COLS table. I can generate the form but the order of the parameters returned by the form does not match the column order of the table which xsql:insert-request seems to require. Is there any way of ordering the parameter values to match the column order of the table?
    Also, xsql:insert-request inserted records with null values without returning an error message when the column values were not in the correct order.
    Thanks,
    Kumar

    Can't you use the XSL Transformation that's being used by the xsql:insert-request tag to order the columns correctly?
    The order of the parameters coming in is dependent on the browser and on the servlet. It is likely the same order that they appear in your HTML form, but I don't believe there's a guarantee on the order.
    The next release of the XML SQL Utility (which does the SQL-to-XML and XML-Insert work under the covers for the XSQL Servlet) supports order-insensitive inserting.

  • Imported DocBook stylesheet location for XSQL Page

    Hi all,
    I've got the following XSQL page which queries a DocBook document stored in XMLDB as a schema-based CLOB.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--
    | Uncomment the following processing instruction and replace
    | the stylesheet name to transform output of your XSQL Page using XSLT
    <?xml-stylesheet type="text/xsl" href="YourStylesheet.xsl" ?>
    -->
    <page xmlns:xsql="urn:oracle-xsql" connection="jdbc/DBConnection1DS">
    <xsql:query max-rows="1" null-indicator="yes" tag-case="lower">
    SELECT extractValue(x.DOCBOOKS_DOC, '/book/part/title', 'xmlns="http://docbook.org/ns/docbook"') "BOOK_TITLE",
    extract(x.DOCBOOKS_DOC, '/book/part/chapter/sect1/sect2', 'xmlns="http://docbook.org/ns/docbook"').getStringVal() "BOOK_CONTENT"
    FROM DOCBOOKS_STORE x</xsql:query>
    </page>
    Which outputs the following:
    <!--
    | Uncomment the following processing instruction and replace
    | the stylesheet name to transform output of your XSQL Page using XSLT
    <?xml-stylesheet type="text/xsl" href="YourStylesheet.xsl" ?>
    -->
         <page>
         <rowset>
         <row num="1">
    <book_title>
    This is a test string
    </book_title>
         <book_content>
    <sect2 xmlns="http://docbook.org/ns/docbook"><title>
    This is sect2/title test text.
    </title><para>
    This is sect2/para test text.
    </para></sect2>
    </book_content>
    </row>
    </rowset>
    </page>
    The query runs fine (thanks to help from the XML DB forum). I'm now trying to use the docbook.xsl HTML stylesheet but I'm not sure of the following:
    1) Where do imported stylesheets need to be stored for the XLST processor to find them and can we change the default location (DocBooks has loads of associated stylesheet includes)? I've tried several locations and corresponding hrefs but nothing seems to work.
    2) Since the output contains a mixture of both DocBook and non-DocBook tags, I'm guessing/hoping that the XLST processor can parse the string extract and all what I would need to do is use is the <xsl:import/> and <xsl:apply-import/>. Is this correct?
    Many thanks in advance.
    George.

    Just closing the loop on this one...
    1) After more trial and error, I found that the XLST stylesheet need to be in the same location as the *.xsql page. To check, I wrote a simple XLST to output HTML rather than confuse the issue with applying the docbook imported stylesheets. This worked as expected with the resulting HTML output, bar the fact that I now have a security issue with my stylesheet sitting in the /PUBLIC_HTML folder. For the moment this is OK since the application is for internal prototyping purposes.
    2) If I want the XLST processor to parse the underlying XML tags, then the data needs to be returned as XMLType and not a VARCHAR2 string which my <xsl:query extract().getStringVal())> does.
    Unfortunately I now have an enviromental problem retrieving XMLType data through my XSQL query. I believe this has something to do with my JDBC driver and/or missing libraries.
    Cheers

  • How to bind korean parameters in XSQL????

    Hi,
    I am binding english parameters in XSQL very well.
    But when I am trying to bind japaneese or korean it is not displaying rows.
    I am giving the sample code.
    hello.xsql
    <?xml version="1.0" encoding="euc-kr"?>
    <xsql:query connection="scs" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:xsql="urn:oracle-xsql" row-element="ADDRESSES_ROW">
    select * from emp where name='{@name}'
    </xsql:query>
    Request: http://hello.xsql?name=JOHN ::: working fine
    Request: http://hello.xsql?name=koreanName :::Not working
    Please help me in this regard.
    How to bind name in korean in XSQL servlet..
    Regards,
    sudhi

    Do you have nlscharset_12.jar in your classpath?
    what web server are you using XSQL with?
    Have you tried using real bind variables like this:
    <xsql:query bind-params="name">
    select * from emp where ename = ?
    </xsql:query>
    Does a query like:
    <xsql:query bind-params="name">
    select * from emp
    </xsql:query>
    return the korean data to the browser correctly?

Maybe you are looking for

  • Valid image url not working in jtooltip

    Hello, I am displaying information in a tooltip via html. When I paste the html from the tooltip into a textpad and save it as an html file the images display fine. The same html in the jtooltip is displaying broken images in place of the actual imag

  • Problem with processor

    Hello! I have a pavlion dv-5 1160-ev I usually play PES 2012,but three days ago started going slow. I checked the settings and said that my computer is inappropriate because i have only one core. I checked the task manager and and it also show sthe o

  • MacBook Air 2013 Camera Problems

    I have a MacBook Air 2013 and recently, after the most current update my built-in camera not only does not work with Skype but does not work with Facetime or Photobooth either. Under "Camera" in System Report my camera does not show up. I have reboot

  • Sorting a vector of pairs in Solaris Studio 12.4 beta July refresh

    The following C++ program doesn't compile in C++11 mode with the Solaris Studio 12.4 beta July refresh compiler: #include <algorithm> #include <string> #include <utility> #include <vector> int main(int, char **)     std::vector<std::pair<int, std::st

  • How do I import my mbox file for Apple Mail?

    I just did a clean install of my mac os on an iMac. Prior to the install, I exported my mail account to an external drive. I got an INBOX.mbox file/folder that's 4.32GBs. When I click the file, there is an "mbox" file and a "table_of_contents" file.