Re: [xml] Where can I get the declaration of a non global element in xmlSchema (using libxml2-2.6.22) ?



On Wed, Sep 14, 2005 at 03:28:15PM +0200, GUY Fabrice wrote:
Hi,

With libxml2 version 2.6.21 I could retrieve the declaration of an element 
(using xmlHashScan(schema->elemDecl, ..., ...).

Unfortunately, it doesn't seem to be possible with the new release (I can 
get only global element declarations with this method).

The xmlSchemaDump fonction uses this method, (and testSchemas uses 
xmlSchemaDump) and with the following schema :
[...]
The local elements are not listed.

I tried to define ENABLE_NAMED_LOCALS (in xmlschemas.c) but it gave me
the same result.

Is there a mean to retrieve all the element declarations ?

  I can't answer specifically on this problem, Kasimier changed some of
the internals between 2.6.21 and 2.6.22. In general as we are getting 
closer to completion of XSD support, it start to make sense to add more
introspection APIs, and increasingly rely on them, but this is still a
work in progress. The problem is to find the right APIs, this proved
to be a problem even for something as simple as DTD support. 
  PSVI, content model, what can be inserted at a given point in an element
content, etc. there is a lot of informations that can be provided, the
problem is to do so in a reliable and clean fashion, and then add that to
the regression tests.
  There is still a bit of work ahead ;-), help is welcome as usual !

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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