xls confusion

H

hmmmmm

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top