OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 name
> for the top level and then the field names of the Person class for the child
> 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!)


                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software