On Nov 1, 2007 6:18 PM, Edward Z. Yang <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hannes Magnusson wrote: > > We _could_ store the classname in the classsynopsisinfo element as remap > > <classsynopsisinfo role="comment" remap="baseclassname">Inherited > > methods</classsynopsisinfo> > > <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) > > xpointer(id('class.baseclassname')/db:refentry/db:[EMAIL > > PROTECTED]'description']/descendant::db:methodsynopsis[1])" > > /> > > > > And then use classsynopsis instead of methodsynopsis for the method docs.. > > I don't think, semantically, this makes sense. If we're displaying only > a single method, we should use only methodsynopsis; if we're displaying > a class, we should use classsynopsis with methodsynopsis includes. > > In fact, I think that this would be exactly how the renderer would know > when to drop it. When PhD enters a classsynopsis node, it looks for the > contents <classname> and stores that as currentClass in the tmp array. > Then, as we encounter methodname, we parse the verbose name into a > compact name based on currentClass. And while we're at it, we can check
Thats an excellent point :) > for the presence of a static indicator (I'm not sure which tag > specifically this would be for) and reformat accordingly if necessary. <modifier>static</modifier> > The primary disadvantages I see with this are: > 1. It slightly magical. It doesn't require any spaghetti function call > paths, but it does introduce a little more complexity to the system As you described it, its very simple. The only drawback is that we need to compare the classname from the methodname against the classsynopsis classname to see if its an inherited one or not. > A slightly irrelevant question: How are we handling namespaces? Currently PhD only supports namespaced attributes ($attrs[namespaceUri][local-name]), not elements. -Hannes
