tags:

views:

96

answers:

1

Hi

I have simple xsql

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="zad1.xsl" ?>

<page xmlns:xsql="urn:oracle-xsql" connection="java:comp/env/jdbc/mondialDS">
    <xsql:query max-rows="-1" null-indicator="no" tag-case="lower" rowset-element="continents">
        select name as continent 
        from mondial_user.Continent
        order by 1
    </xsql:query>
</page>

which gives me a list of continents with "australia/oceania" among them

i use XSL on above xsql :

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  <!-- Root template -->
 <res>
  <xsl:template match="/continents">
    <xsl:for-each select="row">
      <re>
        <xsl:value-of select="continent"/>
      </re>
    </xsl:for-each>
  </xsl:template>
</res>
</xsl:stylesheet>

Firefox throws an error on "wrong formated xml document" with:

AfricaAmericaAsiaAustralia/OceaniaEurope

-----------------------------------^

Help appreciated.

A: 

It appears that somehow you are processing not the XML shown above, but the result from the SQL Query.

Also, your XSLT code is not valid XSLT (although it appears to be wellformed XML) because of the res element that is not within any template and is in no namespace..

There is also possibility that the reported error could be in your XSLT code -- in the parts of the code that you have not shown.

Please, provide a complete (but minimal possible) example of the XML document and the XSLT stylesheet that when run will really produce the error.

Dimitre Novatchev
thoose two are complete documents ( imean xsl and xsql ) . Should i provide separate namespace for res element ?
Peter Kaleta
@Peter-Kaleta: If you don't provide a complete example, how can people repro the issue and then investigate it? The chances of getting help are thus minimal...
Dimitre Novatchev
again , those documents are Complete. Ty for help I managed to get this working by adding root element to xsl
Peter Kaleta