> ----- 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
|