cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfred Nathaniel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COCOON-350) ESQL <get-xml/> doesn't support namespaces
Date Tue, 11 Apr 2006 23:03:46 GMT
     [ http://issues.apache.org/jira/browse/COCOON-350?page=all ]

Alfred Nathaniel updated COCOON-350:
------------------------------------

    Bugzilla Id:   (was: 10827)
      Component: Blocks: Databases
                     (was: Blocks: XSP)

ESQL logicsheet belongs to databases block.

> ESQL <get-xml/> doesn't support namespaces
> ------------------------------------------
>
>          Key: COCOON-350
>          URL: http://issues.apache.org/jira/browse/COCOON-350
>      Project: Cocoon
>         Type: Improvement

>   Components: Blocks: Databases
>     Versions: 2.0.2
>  Environment: Operating System: Linux
> Platform: PC
>     Reporter: sterling
>     Assignee: Cocoon Developers Team
>     Priority: Minor

>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message