Re: [xml] Accessing {DTD, RelaxNG, X-Schema} Structure using libxml2

On Sun, Sep 11, 2005 at 01:01:54AM +0200, Oliver Schonefeld wrote:

I am currently in need of parsing xml schema languages and using the result
to implement a validation for xml-like documents[1].
Basically I want to parse the grammar (DTD, RelaxNG or XSchema) and my
parser should be able to ask: given grammer a,
1) is element x valid in my current processing context y
2) is attribute x valid on element y
I tried to check the API docs, but it seems libxml does not allow this kind
of access pattern or only using xmlDocPtr structures.
Did I miss something? If not, does anybody know some alterantives?

  Question 1) and 2) are way to generic to get an answer. For example
you may just can't answer in the absolute in some Relax-NG schemas. For DTD
there are functions to do this. In XSD we don't export this kind of
API though they exist internally. 


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]