Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 40003 invoked from network); 18 Jun 2007 11:55:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2007 11:55:49 -0000 Received: (qmail 65868 invoked by uid 500); 18 Jun 2007 11:55:51 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 65613 invoked by uid 500); 18 Jun 2007 11:55:50 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 65574 invoked by uid 99); 18 Jun 2007 11:55:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 04:55:50 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 04:55:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E9E3671403E for ; Mon, 18 Jun 2007 04:55:25 -0700 (PDT) Message-ID: <12282614.1182167725938.JavaMail.jira@brutus> Date: Mon, 18 Jun 2007 04:55:25 -0700 (PDT) From: "Ellis Pritchard (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Updated: (COCOON-2075) BrowserUpdateTransformer should not drop namespace declarations itself in any circumstance In-Reply-To: <1389299.1181213245870.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ellis Pritchard updated COCOON-2075: ------------------------------------ Attachment: browser-update.xsl Stylesheet which is functionally equivalent to BrowserUpdateTransformer.java > BrowserUpdateTransformer should not drop namespace declarations itself in any circumstance > ------------------------------------------------------------------------------------------ > > Key: COCOON-2075 > URL: https://issues.apache.org/jira/browse/COCOON-2075 > Project: Cocoon > Issue Type: Bug > Components: Blocks: Ajax > Affects Versions: 2.1.10, 2.1.11-dev (Current SVN), 2.2-dev (Current SVN) > Reporter: Ellis Pritchard > Attachments: browser-update.xsl > > > The org.apache.cocoon.ajax.BrowseUpdateTransformer does not pass on startPrefixMapping()/endPrefixMapping() in an ajaxRequest when not in a bu:replace; however this may mean that a namespace declared on an ancestor element of a bu:replace never gets declared in the output despite its use inside the bu:replace, and results in weird output behaviour after further processing, e.g. missing element names. > This problem seems to manifest itself only when using elements declared in the default namespace, e.g. if I wrap the whole form in a div with a default namespace declaration for xhtml: >
xmlns:ft="http://apache.org/cocoon/forms/1.0#template" > xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" > xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"> > >
> > > The div and span elements will not be output correctly after further processing (empty element name) e.g.: > < > > < class="x"> > You need to insert at least an identity XSL transform after the browser-update transformer to see this; a cocoon-view label doing a serialize to XML on the transformer itself does not seem to be enough; presumably it is the XSL processor that's going wrong when processing the corrupt output of the transformer, not the browser-update transformer itself. > The NamespacesTable used by the transformer declares the empty namespace (prefix="",ns="") itself, so html markup with no-namespace declaration (as in the forms-styling XSL) will work, but correct use an element in a default namespace will not work. > Adding default namespace declarations on the XHTML or the ft: elements themselves does not work (not being passed through somehow: jx/jx-macro problem?), however declaring a prefix for those elements does work, despite the mappings not being declared, which I presume is some kind of XML-legacy side-effect, outputting the effected tags with their prefix and local-name intact, although this might still produce problems. > In summary, elements declared in a default (uri but no-prefix) namespace are mangled by the transformer/pipeline because the namespace prefix is not declared. The lack of declaration may also be a general problem, depending on how your template file is marked up. > The fix is to remove the conditional from the startPrefixMapping() and endPrefixMapping() methods of BrowserUpdateTransformer, to allow all prefix declarations to reach the NamespaceTable, and allow it to do the optimization/de-duping work. I can't see that this could have any bad effects, since the NamespaceTable/RedundantNamespacesFilter is designed to handle all the namespace issues, which is why it is there in the first place. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.