Skip to content

Some struct bindings are missing XML Schema #79

Open
@Ameobea

Description

@Ameobea

I am using your crate for parsing XML schema (XDS), and ran into the need to traverse the raw parsed schema tree. There are a few cases where libxml2 does explicit casts between pointer types (says it's a xmlSchemaType * when it's actually a xmlSchemaParticle *).

This is fine; the generated bindings properly reflect the type of the struct itself and can't do anything about their casting it. However, I think this has caused some structs to not be included in the bindings. The ones that I encountered and had to generate bindings for manually were:

  • _xmlSchemaTreeItem
  • xmlSchemaTreeItemPtr
  • _xmlSchemaParticle

_xmlSchemaTreeItem is a bit of a weird case since it's "The abstract base type for tree-like structured schema components". You may be against including that in the bindings which I'd understand, but I do think adding at least adding _xmlSchemaParticle to the bindings would be valuable since users can obtain pointers to them via the existing API (even though the libxml2 types may lie about what kind of pointer they are).

I don't know if this was something that was manually removed from the generated bindings or if the bindgen tool simply missed them for some reason, but either way if this is something you'd like to add I could go about making a PR to implement that if it's easier for you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions