This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: DOCBOOK: What DocBook element for name of aprogramming langauge?
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Re: DOCBOOK: What DocBook element for name of aprogramming langauge?
- From: Michael Smith <smith at xml-doc dot org>
- Date: Mon, 11 Dec 2000 12:23:06 -0800
- References: <Pine.LNX.4.21.0012111235470.7092-100000@suneidesis.demon.co.uk>
Trevor Jenkins <trevor@suneidesis.com> writes:
> The DocBook DTD has many inline elements for use with programming
> languages, e.g. ClassName, ReturnValue. However, I can't find anything
> appropriate for the name of the programming language itself. :-( It would
> not be correct to use either the Application or Command elements unless
> one were tagging the compiler for that langauge, which in the instance
> here I'm not. Using WordAsWord doesn't feel right either.
As a workaround, maybe edit the ATTLIST declaration for the
<application> element so that <application class="language"> is valid?
<!ATTLIST application
class (hardware
|software
|language) #IMPLIED
...
Seems like though the <application> element may not be completely
precise for tagging the name of a programming language, it's not
totally incorrect.
Also, processing apps won't typically render <application>-tagged
words in any special way (e.g. bold, italic, monospace), which is just
how you want it to be -- should have no special character formatting.
Alternatives you might consider -- <wordasword>, <command>, others --
all those are typically rendered with special character formatting.
It would be nice to have a <programminglanguage> element, though. Did
you know you can file DocBook enhancement requests? Take a look at:
http://www.docbook.org/rfe/view/cgi-bin/dbrfe.pl
...whoops, although I think you could file RFEs before, now I notice
the "Create a new RFE" option says "Temporarily disabled." Looks like
you may need to wait if you want to request an enhancement.
Anyway -- just my opinion of course -- but I think that for now, the
<application class="language"> customization seems a relatively
painless solution in terms of DTD tweaking required to make the
change, compatibility concerns, and rendering considerations.
--Mike Smith
--
Michael Smith mailto:smith@xml-doc.org
XML-DOC http://www.xml-doc.org/