From: David Alan Black Date: 2002-02-24T12:55:34+09:00 Subject: Re: rdoc/xml questions Hello -- On Sun, 24 Feb 2002, Sean O'Dell wrote: > "Dave Thomas" wrote in message > news:m2664o3jkw.fsf@zip.local.thomases.com... > > > > I'm wondering about having rdoc generate xml output, and have a couple > > of questions. > > > > 1. Given the Ruby source > > > > # comment 1 > > class A > > # comment 2 > > class B > > end > > end > > > > how should the corresponding XML be generated in terms of > > nesting. Logically, you might want to see [...] > I do things my own way, so this may not make sense in terms of some of the > tools other people use. I tend to use xpath methods, with the occassional > iteration at certain points in an XML document. > > The relationship is "class B inside class A." To me, the most logical, most > navigable way to express this is: > > > comment > > comment > > > > So you can then say things like: > > a/description = "this is the description for class a" > > and: > > a/b/description = "this is the description for class b, which is nested > inside class a" That approach depends on Ruby names and XML identifiers having identical rules of syntax and construction. So, for example, you wouldn't be able to have: or Also, say you had: class A class A end end You'd then get: David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav