cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject RE: ESQL bug? (fwd)
Date Fri, 20 Oct 2000 01:22:33 GMT
probly belongs on cocoon-dev. ricardo? what was your motivation here?

- donald

---------- Forwarded message ----------
Date: Thu, 19 Oct 2000 20:25:12 -0400
From: Per Kreipke <per@onclave.com>
Reply-To: cocoon-users@xml.apache.org
To: cocoon-users@xml.apache.org
Subject: RE: ESQL bug?

Ok, so the bug isn't in the esql taglib, the extra namespace attributes are
coming from the xsp processor itself, in xsp-java.xsl. The following block
adds the code that generates the namespace attributes:

    <!-- Add namespace declarations -->
    <xsl:for-each select="namespace::*">
      ((Element) xspCurrentNode).setAttribute(
        "xmlns:<xsl:value-of select="local-name(.)"/>",
        "<xsl:value-of select="."/>"
      );
    </xsl:for-each>

I still don't think the objects shown below need namespace declarations on
each of them. Where are the namespaces that are being copied here coming
from? 

Suggestions? Comments?

Per
>  -----Original Message-----
> From: 	Per Kreipke [mailto:per@onclave.com] 
> Sent:	Thursday, October 19, 2000 6:07 PM
> To:	cocoon-users@xml.apache.org
> Subject:	ESQL bug?
> 
> The following simple example:
> 
> <?xml version="1.0"?>
> <?cocoon-format type="text/xml"?>
> <?cocoon-process type="xsp"?>
> <?xml-logicsheet
> href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
> 
> <xsp:page
>   language="java"
>   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>   xmlns:testing="http://bogus/uri"
> >
>   <page>Testing
>    	<esql:execute-query inner-method="yes">
> 		<esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
> 		<esql:dburl>jdbc:odbc:ProjectPlan2</esql:dburl>
> 		<esql:max-rows>20</esql:max-rows>
> 		<esql:query>select * from simple</esql:query>
> 		<esql:results>
> 		 <name><esql:get-string column="Name"/></name>
> 		</esql:results>
> 	</esql:execute-query> 
>   </page>
> </xsp:page>
> 
> creates the following:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <page xmlns:testing="http://bogus/uri">Testing
>     <name xmlns:testing="http://bogus/uri">Configure beta server</name>
>     <name xmlns:testing="http://bogus/uri">COPPA compliance check?</name>
>     <name xmlns:testing="http://bogus/uri">Robot exclusion policy?</name>
> </page>
> 
> Note that each row returned from the database is tagged with a namespace
> tag. I think that's wrong. If not, what is the reason for this?
> 
> I've tried to figure out why and found that the error doesn't occur when
> the 'inner-method' attribute on <esql:execute-query> is "no".
> 
> I've tried to track it further and can only surmise that there is
> something in 'generate-code' in that copies the attributes. However, no
> matter what I comment out, I can't get it to go away. E.g. I can't offer a
> patch.
> 
> Per. << File: ATT00087.txt >> 

Mime
View raw message