Oh yeah, now I remember that those were removed in DocBook
5. They were
included in the original DocBook when C was the primary
language being
documented and someone asked for them. Now there are many
languages, each
with their own programming components. The DocBook
Technical Committee
decided that providing elements for all components in all
programming
languages would not be practical, and would bloat the
schemas. So the
committee decided that DocBook 5 would provide general
elements that could
be applied to components in all languages, and DocBook 5 was
the
opportunity to remove such specific elements. As you
suggested, using a
role attribute can make the markup more specific so that a
stylesheet can
do something different in formatting it. There is also a
DocBook 5.0: The
Transition Guide:
http://www.docbook
.org/docs/howto/
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill.net
----- Original Message -----
From: "Mauritz Jeanson" <mj johanneberg.com>
To: "'Bob Stayton'" <bobs sagehill.net>; "'Karsten Ohme'"
<widerstand t-online.de>; <docbook lists.oasis-open.org>
Sent: Saturday, August 26, 2006 3:26 AM
Subject: RE: [docbook] documenting c structs
>> ----- Original Message -----
>> From: "Karsten Ohme"
>> >
>> > How can I document C structs? I haven't found
an appropriate
>> > corresponding element to funcsynopsis.
>
>> From: Bob Stayton
>>
>> Did you find these two elements:
>>
>> http:/
/docbook.org/tdg/en/html/structname.html
>> http:
//docbook.org/tdg/en/html/structfield.html
>
>
> The <structname> and <structfield> elements
may well be inappropriate
> here:
>
> * They are inline elements that only identify names.
They are not
> containers
> for struct data similar to the way <funcsynopsis>
is used to capture the
> semantics of a function.
>
> * They are removed in DocBook 5.
>
> Maybe there should be a <structsynopsis> element
in DocBook? For now, my
> suggestion would be to use <synopsis>. Something
like this:
>
> <synopsis language="C"
role="struct">
> struct automobile {
> int year;
> char model[8];
> int engine_power;
> float weight;
> };
> </synopsis>
>
> /MJ
>
>
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
> For additional commands, e-mail: docbook-help lists.oasis-open.org
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|