Giter VIP home page Giter VIP logo

Comments (6)

FelixSchwarz avatar FelixSchwarz commented on August 23, 2024

I think like option 1 as it seems this will require the last amount of changes for existing users and reordering could be useful for similar cases in the future. Option 2 doesn't sound too bad either, option 3 seems to be a very narrow solution (but might be worth it if the result code is ok to read).

Disclaimer: Please take these thoughts with a grain of salt. In the end we mostly need tests and maintainable code. I didn't dig too deep into the current code. If you feel that implementing nr 1 or so results in messy code, feel free to go after one of the other options. Also feel free to share "work in progress" code (e.g. by mail or in this ticket). I can't promise any timely feedback but at least I'll try.

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

I didn't started it yet, but I think the option 1 is the best. Will try it this week and send some work in progress.

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

It is done in my branch: FelixSchwarz/soapfish@master...iurisilvio:xsd_reordering

I don't like the solution yet. It works for my test, but I know some failing corner cases.

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

I rewrote my implementation, using the default Python .sort(cmp). It looks better now.

I don't know every XSD schema detail, maybe it fails in specific cases (can I have a xsd:extension and xsd:restriction in the same complexType?), but I think it is good enough.

I'm trying it with my really complicated WSDLs to check if it fix my problem.

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

Python 3 doesn't have the sort(cmp=) kwarg, but functools.cmp_to_key handle the problem nicely.

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

I did the PR. It fixed my test and works with my WSDLs.

from soapfish.

Related Issues (20)

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.