-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple instances of fontoxpath #406
Comments
Hey Reuben, This would indeed be very useful. We are working on a project in Fonto that will bring this, but I cannot give a clear timeline when we are shipping this. For context: right now, a Fonto editor will globally declare a prefix (ie This is a big refactoring that will likely cause breaking API changes (or imho be a good reason to finally break some APIs to simplify them). Long story short: we are planning to work on this, no timeframe yet. Thanks! Martin |
Thanks for the update, @DrRataplan! I don't know if it would be easier, but simply being able to reset fontoxpath's global state would be helpful; for example, in writing tests (where it would be nice to be able to reset the state between each in a series of tests). |
Cool. That would be something that can be implemented relatively easily. We currently have global state in declared functions, declared modules, and something in namespaces where undeclared prefixes will sometimes generate their own URI. Backwards compatibility from when we did not understand namespaces yet... This will also make a lot of tests a bit easier to write (just a |
I would like to be able to have multiple instances of fontoxpath, but this doesn't appear to be possible at present: for example,
registerCustomXPathFunction
affects the global state. See #398.The text was updated successfully, but these errors were encountered: