marvin-zhao / pyang

Automatically exported from code.google.com/p/pyang
0 stars 0 forks source link

Collision of type's identifiers after applied 'uses' statement #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According to the specification:
'The effect of a "uses" reference to a grouping is that the nodes defined
by the grouping are copied into the current schema tree'.

So, if I get it correctly, in the example below after the statement 'uses
testGrouping;' is processed, we will have a collision of identifiers
'type1'. But pyang finds it correct.

module grouping 
{
    namespace "urn:test";
    prefix grop;

    container container1 {
    typedef type1 {
        type string;
    }
    }

    uses testGrouping;

    grouping testGrouping {
        typedef type1 {
        type string;
    }
    }
}

What version of the product are you using? On what operating system?
pyang 0.9.3

Original issue reported on code.google.com by kur...@gmail.com on 18 Apr 2009 at 6:40

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry, it seems I was wrong and pyang works correctly in that case, since 
'typedef' is
not a node. This issue should be closed.

Original comment by kur...@gmail.com on 18 Apr 2009 at 8:33

GoogleCodeExporter commented 9 years ago
You're right; only data nodes are copied by the uses.

Original comment by mbj4...@gmail.com on 19 Apr 2009 at 6:29