Subject: Re: [netmod] prefixes in groupings example

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 17 Aug 2009 16:50:35 +0200

Hi,

after two weeks of vacations I don't dare to reply to any particular
post in this loooong thread. While I do believe the rules below could
work, I have to agree with Andy and Tom that they are far from
intuitive. Perhaps some simplification options should be considered, for
example: What if typedefs were only allowed at the top level of a
module? What are the use cases for having them elsewhere?

Lada

Martin Bjorklund píše v Pá 31. 07. 2009 v 16:55 +0200:
> Andy Bierman <[email-masked]> wrote:
> > I updated my example to show some of the ambiguities
> > that need to be cleared up.
> > 
> > It would be nice if there was a simple consistent rule
> > that applied to all statements, inside or outside a grouping,
> > and regardless of which module contains the uses-stmt.
> 
> This is what we came up with:
> 
>    o  The set of namespace declarations is the set of all "import"
>       statements' prefix and namespace pairs in the module where the
>       XPath expression is specified, and the "prefix" statement's prefix
>       for the "namespace" statement's URI.
> 
> This says that the prefix is bound to a namespace in the module where
> the must/when expression occurs.
> 
>    o  Names without a namespace prefix belong to the same namespace as
>       the identifier of the current node.  Inside a grouping that
>       namespace is affected by where the grouping is used (see
>       Section 7.12).
> 
> And in section 7.12:
> 
>    The identifiers defined in the grouping are not bound to a namespace
>    until the contents of the grouping are added to the schema tree via a
>    "uses" statement that does not appear inside a "grouping" statement,
>    a which point they are bound to the namespace of the current module.
> 
> 
> /martin
-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C