Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: confused by XSL confused by XSLTo: NULL Date: 6/17/2008 11:37:00 AM 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=3D"1.0"?>
<?xml-stylesheet type=3D"text/xsl" href=3D"rowset2shipconf.xsl"?>
<xsql:query connection=3D"ofgproducts"
bind-params=3D"order"
tag-case=3D"lower"
xmlns:xsql=3D"urn:oracle-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 =3D c.order_no(+)
and h.order_suffix =3D c.order_suffix(+)
and h.tenant_id =3D c.ff_schema(+)
and h.src_doc_id =3D ?
<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=3D"1.0"?>
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
version=3D"1.0">
<xsl:template match=3D"//rowset" xml:space=3D"preserve">
<ship_confirmation client_id=3D"OFGPRODUCTS">
<xsl:apply-templates/>
</ship_confirmation>
</xsl:template>
<xsl:template match=3D"//row" xml:space=3D"preserve">
<item>
<xsl:for-each select=3D"*">
<xsl:copy-of select=3D"."/>
</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.
---------------------------------------------------------------------------=
=AD-----
Invalid at the top level of the document.
<?xml version =3D '1.0'?>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
