[ https://issues.apache.org/jira/browse/FELIX-2685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929505#action_12929505 ]
Guillaume Sauthier commented on FELIX-2685: ------------------------------------------- hmmm That was not exactly what I was expecting :) The namespace should ends at the last ':', not the first one So when I have this in the XML: <rules:configuration xmlns:rules="http://jasmine.ow2.org/rules/1.0.0" /> I have this in the metadata format http://jasmine.ow2.org/rules/1.0.0:configuration {} And I expect such an Element: Element @name=configuration @namespace=http://jasmine.ow2.org/rules/1.0.0 So, just changing from n.indexOf(':') to n.lastIndexOf(':') should do the trick. Thanks > Wrong Element name when XML namespace contains ':' > -------------------------------------------------- > > Key: FELIX-2685 > URL: https://issues.apache.org/jira/browse/FELIX-2685 > Project: Felix > Issue Type: Bug > Components: iPOJO > Affects Versions: iPOJO-1.6.0 > Reporter: Guillaume Sauthier > Fix For: iPOJO-1.8.0 > > > Here here my metadata.xml > {noformat} > <session name="session" > type="stateful" > base="my-super-base" > xmlns="http://jasmine.ow2.org/rules/1.0.0" /> > {noformat} > Notice that the XML namespace is "http://jasmine.ow2.org/rules/1.0.0". > When I parse the Element/Attribute structure generated from this XML, i > cannot access my "configuration" element. > An Element.toString() gives the fiollowing result: > {noformat} > //jasmine.ow2.org/rules/1.0.0:knowledge-base name="my-super-base" > //jasmine.ow2.org/rules/1.0.0:configuration > //jasmine.ow2.org/rules/1.0.0:property > name="drools.multiThreadEvaluation" value="true" > //jasmine.ow2.org/rules/1.0.0:property > name="drools.eventProcessingMode" value="stream" > {noformat} > Element name is "//jasmine.ow2.org/rules/1.0.0:configuration", not only > "configuration" :'( > The problem is probably due to a bug in > ManifestMetadataParser.parseElements(String), where we considere that the > namespace stops at the first ':' character. > The easiest solution will probably to gather the composite element name > (namespace+name) completely, and then get the index of the last ':', then > split the string. > WDYT ? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.