Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2685

Wrong Element name when XML namespace contains ':'

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: iPOJO-1.6.0
    • Fix Version/s: iPOJO-1.8.0
    • Component/s: iPOJO
    • Labels:
      None

      Description

      Here here my metadata.xml

        <session name="session"
                 type="stateful"
                 base="my-super-base"
                 xmlns="http://jasmine.ow2.org/rules/1.0.0" />
      

      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:

      //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"
      

      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 ?

        Attachments

          Activity

            People

            • Assignee:
              clement.escoffier Clement Escoffier
              Reporter:
              sauthieg Guillaume Sauthier
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: