DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10827>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10827 ESQL <get-xml/> doesn't support namespaces Summary: ESQL <get-xml/> doesn't support namespaces Product: Cocoon 2 Version: 2.0.2 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If the <get-xml/> ESQL tag is used inside of a namespace context, The root and child nodes do not have a namespace associated with them. ESQL should allow the inheritance of current xmlns declarations and apply those declarations to the XML content read from the database. Perhaps a special syntax can be used to specify the namespace definitions for elements within the database entry as well. This document will reproduce the problem: <?xml version="1.0"?> <xsp:page xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns="http://sterling.hanenkamp.com/bugzilla" create-session="true"> <root> <esql:connection> <esql:pool>somepool</esql:pool> <esql:execute-query> <esql:query> select * from sometable </esql:query> <esql:results> <esql:row-results> <row> <normal-element>This is in a namespace</normal-element> <esql:get-xml column="somecolumn" root="bad-element"/> </row> </esql:row-results> </esql:results> </esql:execute-query> </esql:connection> </root> </xsp:page> A hack I have created to work around the problem is to modify org/apache/cocoon/components/language/markup/xsp/java/esql.xsl: 992a993,997 > <xsl:if test="@ns"> > <xsl:text> xmlns=\"</xsl:text> > <xsl:value-of select="@ns"/> > <xsl:text>\"</xsl:text> > </xsl:if> This allows me to specify a namespace for the root node which suffices for my purposes. A more comprehensive solution is probably necessary. A better solution would probably involve treating the database entry as an XML fragment instead of a complete self-contained document. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]