Giter VIP home page Giter VIP logo

xsd's People

Contributors

krolaw avatar tmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xsd's Issues

Error callback idea

Did some research and it looks like callbacks are possible, and I think the reason the go code won't work is because you can't send a go function pointer into a CGo call without a custom wrapper, this fella talks about a sample implementation here.

I don't understand enough about how libxml works (and my C is rusty at best), so I'm not sure if I can replicate it using C.xmlSchemaGetValidErrors(), but i think the trick is:

  • Create a wrapper for C.xmlSchemaGetValidErrors and define it some C code (included with the package), call it xmlSchemaGetValidErrorsWrapper
  • xmlSchemaGetValidErrorsWrapper does not need a callback parameter, instead, it calls xmlSchemaGetValidErrors directly, explicitly naming the pointer to the exported Golang function
  • In the go code, call the wrapper instead of xmlSchemaGetValidErrors

I just can't figure out al the types for the wrapper function...

Just an idea, what do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.