开发者

Forward slash problem in xsl and xsql

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 a开发者_开发技巧s 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">
  <!-- 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜