Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 64701 invoked from network); 13 Jan 2004 21:04:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Jan 2004 21:04:33 -0000 Received: (qmail 67952 invoked by uid 500); 13 Jan 2004 21:04:19 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 67923 invoked by uid 500); 13 Jan 2004 21:04:18 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 67910 invoked from network); 13 Jan 2004 21:04:18 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 13 Jan 2004 21:04:18 -0000 Received: (qmail 41 invoked by uid 50); 13 Jan 2004 21:04:29 -0000 Date: 13 Jan 2004 21:04:29 -0000 Message-ID: <20040113210429.40.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@cocoon.apache.org Cc: Subject: DO NOT REPLY [Bug 26107] New: - Logic sheet docs fail to mention that namespaces must be declared at top level X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=26107 Logic sheet docs fail to mention that namespaces must be declared at top level Summary: Logic sheet docs fail to mention that namespaces must be declared at top level Product: Cocoon 2 Version: 2.1 Platform: Other URL: http://cocoon.apache.org/2.1/userdocs/xsp/logicsheet.htm l OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Documentation AssignedTo: dev@cocoon.apache.org ReportedBy: lars@huttar.net The XSP Logicsheet Guide, http://cocoon.apache.org/2.1/userdocs/xsp/logicsheet.html, tells us that the namespaces of logicsheets used in an XSP page must be declared in the XSP page file. ("To use the request taglib, you must declare the request namespace in your XSP file:") What it doesn't specify is that they must be declared on the xsp:page element itself. (At least, I think this is true because of the behavior I'm observing.) Actually, this is not an ideal state of affairs, because according to the XML Namespaces spec, the actual location of namespace declarations should be transparent to applications; all that should matter is what namespace-uri any given element or attribute is in. Because of this mismatch, it is not straightforward to generate an XSP page that uses a logicsheet; to force a namespace declaration to appear on the xsp:page element, one has to resort to creating dummy attributes. I've tried to think of a way to change the way this *should* be specified without breaking old logicsheets, but I haven't come up with anything at this point. Anyway, regarding the logicsheet behavior that leads me to believe logicsheet namespaces have to be declared on the xsp:page element in order to be effective, here is an email I sent to cocoon user list. > Sent: Mon 1/5/2004 2:59 PM > Subject: bug: logicsheet not invoked unless namespace declaration is on the document element? Dear Cocooners, Running Cocoon 2.1.2, we have the following XSP page: Ethnologue Country SELECT Ethnologue_Country_Id id, Ethnologue_Country_Lb label FROM Ethnologue_Country_admin WHERE Parent_Id IS NULL This page uses the "sil" logicsheet, declared in cocoon.xconf. When used as above, the SIL logicsheet does not seem to get invoked; the output of the page is the same as its content, except that xsp:page is removed: Ethnologue Country SELECT Ethnologue_Country_Id id, Ethnologue_Country_Lb label FROM Ethnologue_Country_admin WHERE Parent_Id IS NULL However, if I move the sil namespace declaration from the sil:query element to the xsp:page element, as follows: Ethnologue Country SELECT Ethnologue_Country_Id id, Ethnologue_Country_Lb label FROM Ethnologue_Country_admin WHERE Parent_Id IS NULL then the XSP page works, producing data such as Ethnologue Country 35 ... ! If I'm not mistaken, the above change shouldn't make any difference to a namespace-aware XML application; no element is in a different namespace than it was before. Nevertheless this seems to be making a crucial difference to the logicsheet processor. This is significant because this XSP page is generated by a stylesheet; it's not very easy to force the generated code to have the sil namespace declaration on the xsp:page element rather than on the sil:query element, since the latter is the only place it's needed. Am I missing something, or is this indeed a bug? Thanks, Lars P.S. The logicsheet begins like this: so this template should match any that's in the right namespace, regardless of whether the namespace declaration occurs on the element itself, or an ancestor. (In fact the XSL processor shouldn't even know the difference!) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org [end of email quote] Of course, it may be decided that the documentation is right, and the logicsheet behavior is wrong. That would be fine with me!