Clarity

 View Only
  • 1.  Namespace Issue in Gel Parse

    Posted Aug 12, 2020 09:51 PM
    Hi All,

    I am facing a strange issue while building an XML using xpath.

    I am trying to create a task using xpath, i mean initially having a project xml and then inserting the task inside the Project xml using xml.

    while doing this i am seeing namespace in the NikuDataBus  Root Tag and also for Task Root Tag for Example as below:

    This is my Project XML

    <gel:parse var="prjxml">  <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd"> 
    <Header action="write" externalSource="NIKU" objectType="project" version="15.8.1"/> 
    <Projects> 
    <Project name="${PROJECT_NAME}" projectID="${PROJECT_CODE}"> 
    </Project> 
    </Projects> 
    </NikuDataBus> 
    </gel:parse>


    My Task Tag:

    <gel:parse var="TaskInst">
    <Tasks>
    </Tasks>
    </gel:parse>

    Updating the Task Tag

    <gel:parse var="TaskXog">
    <Task finish="${v_TaskEndDATE}" name="${TaskName}" start="${v_TaskStartDATE}" taskID="${taskiD}"></Task> </gel:parse>

    <gel:set value="${TaskXog}" select="$TaskInst/Tasks" insert='true'/>

    My End Result is looking like this


    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:ns1="http://soap.rpc.Rally.atlassian.com"
    xmlns:ns2="http://beans.soap.rpc.Rally.atlassian.com"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xog="http://www.niku.com/xog"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
    <Header action="write" externalSource="NIKU" objectType="project" version="15.8.1"/>
    <Projects> <Project name="testq" projectID="430987">
    <Tasks xmlns:ns1="http://soap.rpc.Rally.atlassian.com" xmlns:ns2="http://beans.soap.rpc.Rally.atlassian.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xog="http://www.niku.com/xog"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


    Task finish="2020-09-01T05:59:59" name="TaskTest" start="2020-08-01T06:00:00" taskID="0984526"/>
    </Tasks>
    </Project>
    </Projects>
    </NikuDataBus>

    I am not sure why the parse is duplicating the namespace when preparing the xml. any pointers would be much appreciated.

    Thanks





    ------------------------------
    Shanti Swaroop
    ------------------------------


  • 2.  RE: Namespace Issue in Gel Parse
    Best Answer

    Broadcom Employee
    Posted Aug 14, 2020 10:25 AM
    Hi Shanti,
    Please see:
    https://knowledge.broadcom.com/external/article?articleId=196722
    Regards
    Joxi