cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14466] New: - SQLTransformer doubles namespace declarations in output
Date Tue, 12 Nov 2002 09:23:52 GMT
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=14466>.
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=14466

SQLTransformer doubles namespace declarations in output

           Summary: SQLTransformer doubles namespace declarations in output
           Product: Cocoon 2
           Version: 2.0.3
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: lmorandini@ieee.org


When SQLTransformer's output is fed into an XSLT transformation, the following 
namespace declarations is inserted: 
xmlns:xmlns:sql="http://apache.org/cocoon/SQL/2.0".
The doubling of "xmlns" causes the XSLT transformation to fail, of course.
This is due to the the prefix mapping, which is not properly closed sometimes. 
I envisaged a rather crude, but used in some other transformers, solution: 
start and end prefix mapping whenever there is a valid ContentHandler, without 
other checks.
The code that works for me (taken from SQLTransformer.java) follows:

   public void startPrefixMapping( String prefix, String uri )
        throws SAXException {
        if (super.contentHandler!=null) {
            super.contentHandler.startPrefixMapping(prefix,uri);
        }
    }
    public void endPrefixMapping( String prefix )
    throws SAXException {
        if (super.contentHandler!=null) {
            super.contentHandler.endPrefixMapping(prefix);
        }
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message