xls confusion

Discussion in 'XML' started by hmmmmm, Jun 17, 2008.

  1. hmmmmm

    hmmmmm Guest

    I have an .xsql page that references an .xsl template. (both listed
    below) The problem comes when the query in the .xsql page has no
    results and uses the no-rows-query.

    At this point I get an error message (also listed below). To me this
    error message says there is a problem with the .xsl page.

    If I remove the xml-stylesheet from the XSQL page I get the expected
    results for queries have results as well as queries that have no
    results.

    Any insight would be appreciated!

    ******************
    XSQL page
    ******************
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rowset2shipconf.xsl"?>
    <xsql:query connection="ofgproducts"
    bind-params="order"
    tag-case="lower"
    xmlns:xsql="urn:eek:racle-xsql">

    select h.order_no
    , h.order_suffix
    , h.order_status
    , c.track
    , c.weight
    , c.freight
    , c.trx_date
    from clipper c
    , oehead h
    where h.order_no = c.order_no(+)
    and h.order_suffix = c.order_suffix(+)
    and h.tenant_id = c.ff_schema(+)
    and h.src_doc_id = ?

    <xsql:no-rows-query>

    select '0' as order_no
    , '0' as order_suffix
    , 'Unknown' as order_status
    , 'No Information' as track
    , 0 as weight
    , 0 as freight
    , sysdate as trx_date
    from dual

    </xsql:no-rows-query>
    </xsql:query>

    ******************
    XSL page
    ******************
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">

    <xsl:template match="//rowset" xml:space="preserve">
    <ship_confirmation client_id="OFGPRODUCTS">
    <xsl:apply-templates/>
    </ship_confirmation>
    </xsl:template>

    <xsl:template match="//row" xml:space="preserve">
    <item>
    <xsl:for-each select="*">
    <xsl:copy-of select="."/>
    </xsl:for-each>
    </item>
    </xsl:template>

    </xsl:stylesheet>

    ******************
    Error Message
    ******************
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and
    then click the Refresh button, or try again later.
    --------------------------------------------------------------------------------
    Invalid at the top level of the document.

    <?xml version = '1.0'?>
     
    hmmmmm, Jun 17, 2008
    #1
    1. Advertising

  2. hmmmmm

    hmmmmm Guest

    I found my problem.

    I needed to have tag-case="lower" in the no-rows-query as well.
     
    hmmmmm, Jun 17, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.M

    Creating an MDB/XLS file

    A.M, Oct 28, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    4,212
    Chris Becker
    Oct 30, 2003
  2. =?Utf-8?B?QmVybmFyZG8gR29tZXM=?=

    Displaying a XML using XLS

    =?Utf-8?B?QmVybmFyZG8gR29tZXM=?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,474
    Felbrigg
    Feb 4, 2004
  3. A B
    Replies:
    1
    Views:
    2,910
    Peter O'Reilly
    May 13, 2004
  4. =?Utf-8?B?c21lbg==?=

    only upload *.xls files...

    =?Utf-8?B?c21lbg==?=, Jun 2, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    453
    Steve C. Orr [MVP, MCSD]
    Jun 2, 2004
  5. =?Utf-8?B?QXNoYQ==?=

    upload only *.xls file...

    =?Utf-8?B?QXNoYQ==?=, Jun 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    589
    Kevin Spencer
    Jun 11, 2004
Loading...

Share This Page