[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK: Re: class extends superclass
At 6:34 AM -0500 3/22/02, Norman Walsh wrote: >No, that won't work because all the modifiers have to come first. What you >want is: > > <classsynopsis language="Java"> > <ooclass> > <modifier>public</modifier> > <modifier>abstract</modifier> > <classname>SAXParserFactory</classname> > </ooclass> > <ooclass> > <classname>Object</classname> > </ooclass> > </classsynopsis> > >Not exactly intuitive, but it avoids having markup names like >"extends" that are specific to a given programming language. > OK. That will work, and I can see how to extend it for interfaces too. Thanks! I still wonder if this shouldn't be an element of its own though. The notion of superclasses is pretty fundamental to object oriented languages. It could be written in a non language specific way like this: <classsynopsis language="Java"> <ooclass> <modifier>public</modifier> <modifier>abstract</modifier> <classname>SAXParserFactory</classname> <superclass>Object</superclass> </ooclass> </classsynopsis> The stylesheets could figure out whether to make that "extends Object" or "::Object" or something else. Interfaces are trickier, mostly because they're really Java-specific, but I would like to have something like: <classsynopsis language="Java"> <ooclass> <modifier>public</modifier> <modifier>abstract</modifier> <classname>SAXParserFactory</classname> <superclass>Object</superclass> <interface>Serializable</interface> </ooclass> </classsynopsis> And why'll we're at it, it's mildly annoying that the paragraphs of my manuscript are littered with <classname>String</classname>, <interfacename>ContentHandler</interfacename>, and <exceptionname>SAXException</exceptionname> but <literal>org.xml.sax</literal>. It's not a major problem, just a minor annoyance and inconsistency. Right now I'm working on a Doclet that produces DocBook markup so a packagename element and possibly a whole packagesynopsis element would be convenient. But that's really Java-specific, so if you think it's out of scope, I wouldn't scream too loudly. Should I file RFEs on this stuff, or is this just getting too deep in the Java mire? -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible, 2nd Edition (Hungry Minds, 2001) | | http://www.cafeconleche.org/books/bible2/ | | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.cafeconleche.org/ | +----------------------------------+---------------------------------+
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC