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=23434>. 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=23434 [PATCH] fix namespace output of SearchGenerator Summary: [PATCH] fix namespace output of SearchGenerator Product: Cocoon 2 Version: 2.1.1 Platform: Other URL: http://cocoon.apache.org/2.1/userdocs/generators/search- generator.html#Example OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: sitemap components AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The SearchGenerator used namespaces inconsistently. The prefix "search" was mapped to the namespace URI, but at the end of generation, the prefix "" was unmapped from the same namespace URI. But the main problem was that throughout the document, elements and attributes were emitted with the same namespace URI, but without prefixes (i.e. the name and qname were the same). This meant that the namespace URI also became the "default" (unprefixed) namespace, in addition to the namespace prefix mapping, and in contradiction to the documentation, in which the sample XML shows the elements with a "search" prefix, and the attributes in no namespace (not the default namespace). AFAIU, though this could be OK for elements, it's wrong for attributes because if an attribute is not prefixed, then it has NO namespace, not the default namespace. In my patch, the generator emits XML that matches the documentation: the search namespace is bound only to the "search" prefix. All the elements are in this namespace. The attributes are not namespaced at all, and there is no default namespace. Previously I had some real difficulty with the generator, and I was working around it by following the generator in my pipeline with a stylesheet which stripped namespaces. This worked in Xalan, but XSLTC would not run my stylesheet - I assume because of the namespace inconsistency. Cheers! Con
