You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/11/22 07:01:11 UTC
DO NOT REPLY [Bug 32342] New: -
Inconsistent Handling on empty element namespace uri
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32342>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32342
Summary: Inconsistent Handling on empty element namespace uri
Product: Cocoon 2
Version: 2.1.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: sitemap components
AssignedTo: dev@cocoon.apache.org
ReportedBy: dean.cording@kaz-group.com
I'm using FragmentExtractorTransformer to extract xml fragments from the
stream. The element identifying the fragment has no namespace associated with
it (ie <base64>), so the FragmentExtractorTransformer has been configured with:
<map:transformer logger="sitemap.transformer.base64extractor"
name="base64extractor"
src="org.apache.cocoon.transformation.FragmentExtractorTransformer">
<extract-uri> </extract-uri>
<extract-element>base64</extract-element>
</map:transformer>
Most of the time this works okay but for some cases it fails to identify the
end of the fragment element and fails.
I added some debugging code to the startElement and endElement methods of the
transformer to output the element uri and names as they were processed. This
produced the following for a failed case:
Start element: :base64
extractLevel now 1.
End element: null:base64
Start element: :base64
extractLevel now 2.
End element: :base64
extractLevel now 1.
As can be seen, sometimes an empty uri is returned as an empty string and
sometimes it is returned as a null. The fragmentExtractorTransformer does a
simple
if (this.extractURI.equals(uri) && this.extractElement.equals(loc))
to test elements, which fails when the uri is returned as null.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.