Ladislav Lhotka <lho...@nic.cz> wrote: > On Mon, 2019-10-21 at 13:40 +0200, Martin Bjorklund wrote: > > Hi, > > > > Ladislav Lhotka <lho...@nic.cz> wrote: > > > Hi, > > > > > > consider the following situation: > > > > > > module A { > > > ... > > > prefix a > > > identity X; > > > leaf foo { > > > type identityref { > > > base X; > > > } > > > } > > > } > > > > > > module B { > > > ... > > > import A { > > > prefix a; > > > } > > > leaf fooref { > > > type leafref { > > > path "/a:foo"; > > > } > > > } > > > } > > > > > > What is now a correct lexical form of fooref's value? Could it be just > > > 'X', or is the prefix required, i.e. 'a:X'? > > > > > > This is not very clear from RFC 7950 (sections 9.9.4 and 9.10.3). I am > > > inclined to require the prefix. > > > > 9.10.3 says: > > > > If the prefix is not > > present, the namespace of the identityref is the default namespace > > in effect on the element that contains the identityref value. > > > > > > so the interpretation of a missing prefix in "fooref" is that the > > identity is defined in module B. > > > > (a missing prefix in "foo" means that the identity is defined in > > module A) > > To be more specific, here is an example instance: > > <foo xmlns="...namespace of A...">X</foo> > <fooref xmlns="...namespace of B...">X</fooref> > > It can be argued that this is correct because (sec. 9.9.4): > > A leafref value is lexically represented the same way as the leaf it > references represents its value. > > That is, the same lexical representation is assumed, which is exactly what we > have in the example.
It doesn't say that the lexical value is exactly the same, but "represented the same way" - so when the lexical representation is context dependent we have this situation. > It seems that we agree that it is incorrect, but then sec. 9.9.4 should be > clarified. /martin _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod