<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:19 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-787] New XML parser design flaw</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-787</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;New XML parser (residing in yang-data-codec-xml) assumes that yang-modeled data in the parsed XML source are wrapped in a yang-independent root element which is not correct. Actually, the root element of such XML document should represent a specific yang data node defined in the provided yang model.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23207">YANGTOOLS-787</key>
            <summary>New XML parser design flaw</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="ifoltin">Igor Foltin</assignee>
                                    <reporter username="ifoltin">Igor Foltin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Jun 2017 09:05:05 +0000</created>
                <updated>Sun, 10 Apr 2022 18:36:00 +0000</updated>
                            <resolved>Mon, 24 Jul 2017 07:58:43 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="44441" author="ifoltin" created="Fri, 16 Jun 2017 07:19:19 +0000"  >&lt;p&gt;Another issue with the XML parser is the SchemaNode parameter that is used when&lt;br/&gt;
creating an XmlParserStream instance. Currently, it represents a schema&lt;br/&gt;
node that is the parent node of the root XML element. However, this&lt;br/&gt;
parameter should correspond to the root XML element itself.&lt;/p&gt;</comment>
                            <comment id="44442" author="ifoltin" created="Fri, 16 Jun 2017 07:26:21 +0000"  >&lt;p&gt;Fix: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/59036/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/59036/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44443" author="ifoltin" created="Wed, 21 Jun 2017 13:23:31 +0000"  >&lt;p&gt;Follow-up fix for the BGPCEP project:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/59268/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/59268/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44444" author="ifoltin" created="Wed, 12 Jul 2017 14:56:53 +0000"  >&lt;p&gt;Actually, ignore the first two comments.&lt;/p&gt;

&lt;p&gt;It is irrelevant if the root XML element corresponds to the SchemaNode parentNode parameter or not. The SchemaNode parameter represents the parent SchemaNode of the YANG-modeled data that are wrapped inside the root XML element.&lt;/p&gt;

&lt;p&gt;The actual flaw is that the parser wraps the parentNode parameter inside a CompositeNodeDataWithSchema which emits only its child nodes into the provided NormalizedNodeStreamWriter. The parentNode itself is not emitted which is a problem.&lt;/p&gt;

&lt;p&gt;Here is an example which illustrates the issue.&lt;br/&gt;
Let&apos;s say we have a YANG module which looks like this:&lt;/p&gt;

&lt;p&gt;module foo {&lt;/p&gt;

&lt;p&gt;    ...&lt;/p&gt;

&lt;p&gt;    container foo-cont { list foo-list &lt;/p&gt;
{...}
&lt;p&gt; }&lt;/p&gt;

&lt;p&gt;    ...&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;We want to parse the foo-cont node, so we provide a corresponding foo-cont ContainerSchemaNode as the parentNode parameter to the XmlParserStream.&lt;/p&gt;

&lt;p&gt;Now, imagine we have an XML source which looks like this:&lt;/p&gt;

&lt;p&gt;&amp;lt;foo-cont xmlns=&quot;foo&quot;&amp;gt; &lt;br/&gt;
    &amp;lt;foo-list&amp;gt; ...some other nodes... &amp;lt;/foo-list&amp;gt;&lt;br/&gt;
&amp;lt;/foo-cont&amp;gt;&lt;/p&gt;


&lt;p&gt;If we parse this XML into a NormalizedNode tree, we will end up with a root NormalizedNode which corresponds to the foo-list node. However, it should be the foo-cont node.&lt;/p&gt;

&lt;p&gt;Therefore we need to check the parentNode type and put it into a corresponding ...NodeDataWithSchema.&lt;br/&gt;
In the example above, it would be a ContainerNodeDataWithSchema.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8675</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=8675]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10320"><![CDATA[Nitrogen]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i029dr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>