[Home] [By Thread] [By Date] [Recent Entries]

  • From: Al Snell <alaric@a...>
  • To: Martin Gudgin <marting@d...>
  • Date: Sat, 19 May 2001 12:35:07 +0100 (BST)

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
definition.

http://asn1.elibel.tm.fr/xml/example.htm

Note:

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!)

ABS

-- 
                               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  


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member