In article <> you write:
>I'm looking for a parser library in C/C++ with which I can
>read fairly complex DTDs (like those for DITA and DocBook)
>and extract content models for all elements for further
>analysis and manipulation.
You could use RXP for this. It should be able to handle any legal
DTD. It represents content models as C structures in a fairly
straightforward way:
enum cp_type {
CP_pcdata, CP_name, CP_seq, CP_choice
};
typedef enum cp_type CPType;
struct content_particle {
enum cp_type type;
char repetition;
const Char *name;
ElementDefinition element;
int nchildren;
struct content_particle **children;
};
It doesn't have much documentation, unfortunately.
See http://www.cogsci.ed.ac.uk/~richard/rxp.html
-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.