[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XML DTD/XSD parser library sought
- From: richard@inf.ed.ac.uk (Richard Tobin)
- To: xml-dev@lists.xml.org
- Date: Mon, 30 Jul 2007 12:49:11 +0100 (BST)
In article <77tqa3pt5frtavrja4tbi6gv608m1qh7e1@4ax.com> 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.
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]