[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Namespace: what's the correct usage?
- From: Martin Gudgin <firstname.lastname@example.org>
- To: Al Snell <email@example.com>
- Date: Sat, 19 May 2001 14:43:45 +0100
----- Original Message -----
From: "Al Snell" <firstname.lastname@example.org>
To: "Martin Gudgin" <email@example.com>
Cc: "Kohsuke KAWAGUCHI" <firstname.lastname@example.org>;
Sent: Saturday, May 19, 2001 12:35 PM
Subject: Re: Namespace: what's the correct usage?
> On Sat, 19 May 2001, Martin Gudgin wrote:
> [sample code]
> > In the above the Person instance is sometimes bound to the local name
> > 'martin' and sometimes bound to the local name 'o'. So I use the type
> > for the top level and then the field names of the Person class for the
> > elements.
> ASN.1/XER's approach to this problem is to use a set of rules to see which
> names to use when mapping from a programming-language-style type
> 1) The top level element is named after the "class"
> 2) Everything else is generally named from the field names
> 3) The <children> element is defined as a sequence of ChildInformation
> "objects", and some way of delimiting each of them is again needed, so
> they are put into ChildInformation wrappers in the absence of a field name
> (you could also go for multiple <children> elements, but that would look
> odd - it's a plural, dammit!)
Looks like we have a similar approach, modulo the <children> element ( is
that basically used for arrays/collections? ).