[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|