You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fabricio Chalub <CH...@fgv.br> on 2002/05/02 22:46:13 UTC

SQLTransformer returning empty XML tags

Hello,

I'm using SQLTransformer to convert this simple piece of SQL:

<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
  <query>
    SELECT name
    FROM listing
  </query>
</execute-query>
</page>

into XML file using this code from the DocBook XSLT that prints all unknown
tags in red:

<xsl:template match="*">
  <font color="blue">
    <xsl:text>&lt;</xsl:text>
    <xsl:value-of select="name(.)"/>
    <xsl:text>&gt;</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>&lt;/</xsl:text>
    <xsl:value-of select="name(.)"/>
    <xsl:text>&gt;</xsl:text>
  </font>
</xsl:template>

(the query comes from an Oracle data source)

The problem is that, instead of getting an output like:

- - - - - - - - - -

<rowset nrofrows="2" xmlns="http://apache.org/cocoon/SQL/2.0">
<row>
	<name>Programmers</name>
</row>
<row>
	<name>Loungers</name>
</row>
</rowset>

- - - - - - - - - -

I'm getting this:

- - - - - - - - - -

<>
<>
	<>Programmers</>
</>
<>
	<>Loungers</>
</>
</>

- - - - - - - - - -

That is, all XML tags are empty!  My sitemap is simple:

<map:match pattern="*">
        <map:generate src="documents/{1}.xml" />

        <map:transform type="sql">
          <map:parameter name="use-connection" value="db"/>
        </map:transform>

        <map:transform src="stylesheets/site.xsl" />
[...]

Does anyone know what is causing this?  All other unknown XML tags are
corretly printed by the XSLT code, so I don't thing the problem is there.

fc

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>