Version: | 0.5x |
---|---|
Creator: | Stig E Sandø |
PublicId: | -//SDS//CSF DTD 0.5x//EN |
The CSF DTD is used to represent information about Code Structure. The format is not really meant to be written by humans, but should be output by various tools. The format is also pretty raw and as-is will require some effort by the tool which uses the information from a CSF document. It is suggested that you tailour a DTD for your need and make a conversion tool from CSF to your format. This has been done for SDS-documentation (SDOC)
access | Describes access |
arg | Describes a method-argument/parameter |
class | Describes a class |
comment | Describes a comment |
csf | The root element. |
directive | A special directive |
enum | Describes an enum |
enumval | Describes an enum value |
info | Context-specific placeholder for info |
inherit | Describes what is inherited |
location | Describes a location |
method | Describes a method |
package | Describes a package |
retval | Describes a method's return value |
text | contains text |
typespec | Describes a typedef/typespecification |
variable | Describes a variable |
where | Describes the whereabouts of a function |
Describes access The access element contains information about how some object may be accessed (in class or file).
class enum method typespec variable
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
scope | CDATA | #DEFAULT | The scope can be class, file, function, ... | |
visibility | CDATA | #DEFAULT | Whether we have public, protected, private, package (Java) or global visibility. Please use public and not global for anything in a class, e.g an accessor in a CLOS class is public. |
Describes a method-argument/parameter The arg element contains information about a parameter or argument to a method. This is done through the info-elements which are described in the CSF specification.
Describes a class The class element contains information about a class and it's content. It contains some C++isms but is somewhat general.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #IMPLIED | The name |
Describes a comment The comment element contains information about a comment in code and includes the location and the text. This element is basically included for systems getting extra information from comments.
The root element. The csf element is just the root element of the DTD and it's only significance is the lang attribute.
Must appear as the root element.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
language | CDATA | #DEFAULT | Names the language the CSF-data is generated from. This information may be used e.g by the linker who e.g will probably refuse to link together lisp and c++ code. |
A special directive The directive element is used for various directives found in code and which should be included. Examples are #include, #define and #pragma in C/C+. Refer to the spec.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
info | CDATA | #DEFAULT | extra info. | |
name | CDATA | #DEFAULT | the name/type of directive. | |
value | CDATA | #DEFAULT | the value of the directive. |
Describes an enum The enum element contains information about an enum object and it's values. C/C++ style.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #DEFAULT | The name |
Describes an enum value The enumval element contains information about a value which is part of an enum. C/C++ style.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
name | CDATA | #DEFAULT | The name | |
value | CDATA | #DEFAULT | A specified value |
Context-specific placeholder for info The info element is a place holder for info. what the info means depends on where it is used and the CSF Specification is a good place to start searching for that info.
arg class inherit method package retval typespec variable
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
info | CDATA | #IMPLIED | extra info. | |
type | CDATA | #IMPLIED | what type of info object it is. | |
value | CDATA | #IMPLIED | the value of the type. |
Describes what is inherited The inherit element contains information about what a class inherits, mostly through the info-fields.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
name | CDATA | #DEFAULT | The name of the other class/object inherited |
Describes a location The location element contains information about the location of some object in a file. It is line/column based.
class comment directive enum package typespec variable where
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
endcol | CDATA | #DEFAULT | -1 | The end column |
endline | CDATA | #DEFAULT | -1 | The end line |
file | CDATA | #DEFAULT | The name of the file | |
position | CDATA | #DEFAULT | -1 | The absolute position in the file |
startcol | CDATA | #DEFAULT | -1 | The start column |
startline | CDATA | #DEFAULT | -1 | The start line |
Describes a method The method element contains information about a method and it's content. It contains some C++isms but is somewhat general.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #DEFAULT | The name |
Describes a package The package element contains information about a package object and it's content. It's mostly equal to a package in Java or Common Lisp.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #IMPLIED | The name |
Describes a method's return value The retval element contains information about a method's return value. This is done through the info-elements which are described in the CSF specification.
contains text The text element contains text for a comment.. normal #PCDATA basically.
Describes a typedef/typespecification The typespec element contains information about a typedef or type-alias object and it's content. The info-fields are described in the specification.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #REQUIRED | The name |
Describes a variable The variable element contains information about a variable object and it's content. This is a feature found in most languages.
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
id | CDATA | #REQUIRED | An id to refer to | |
name | CDATA | #DEFAULT | The name |
Describes the whereabouts of a function The where element contains information about where a method was found and what kind of method-info was found there (e.g declaration, definition, etc).
Name | Type | Declaration | Default | Description |
---|---|---|---|---|
what | ['declaration', 'definition', 'unknown'] | #DEFAULT | unknown | what describes what kind of method-info was found. It can be declaration, definition or unknown where the default is unknown. |