dartrosa 0.1.2
dartrosa: ^0.1.2 copied to clipboard
Pure-Dart ODK XForms engine (a port of JavaRosa): parsing, recalculation, validation, repeats, navigation and submission serialization.
0.1.2 #
Submission.attachmentslists the file names answered tobinaryquestions (image, audio, video, file, signature, drawing, annotation), as the Flutter renderer stores them, in addition toPointerValueanswers: relevant answers only, in document order, without duplicates. It used to be empty for forms filled with text answers.FormDefinition.parsethrowsXFormParseExceptionfor a form without a main instance (no<model>, no<instance>, or the body before the head) and for ajr:itext()reference in a form without<itext>, instead of aTypeError(JavaRosa crashes with aNullPointerException; seeconformance/DEVIATIONS.md).package:dartrosa/dartrosa.dartexportsTriggerableEvaluationExceptionandUnregisteredLocaleException, and the docs ofFormDefinition.parse,createSession,FormSession.answer,finalize,languageandaddRepeatInstancesay what they throw.createSession(existingInstance:)andgetXmlDocumentthrowXFormParseExceptionfor malformed XML, as JavaRosa'sgetXMLDocumentdoes, instead ofpackage:xmlexceptions.
0.1.1 #
- API docs: tested code examples for the library and for
FormDefinition,FormSession,FormNavigator,DartRosaConfigandAnswerResult. - API docs: the default constructors of 17 classes (
ReferenceManager, the filter strategies, the range hints, ...) are documented; no API change. - API docs: one-sentence summaries where a summary ran on, and no reference to the internal roadmap in
FormDefinition. - README: pub.dev, CI and license badges and a link to the API reference.
0.1.0 #
- Initial release: a pure-Dart port of JavaRosa 6.0.0.
- XPath 1.0 parser and the full JavaRosa function library (dates, geo, digest, randomize, extract-signed, ...).
- XForm parsing (body controls, binds, itext, secondary XML/CSV/GeoJSON/last-saved instances, actions and events, submission profiles).
- Dependency graph recalculation, validation, preloaders and predicate filter strategies.
- Session API (
FormDefinition,FormSession,FormNavigator,FormNodetree, sealedAnswerResult/FinalizeResult) and the JavaRosa-compatible API (package:dartrosa/javarosa.dart). - Submission serialization, drafts and resume, and the
FormDefCodecform-definition cache. - Plugin points through
DartRosaConfig(functions, filter strategies, parse/finalization processors, preload handlers, external instance parsers,FormLoadPlugins, resource resolver). package:dartrosa/testing.dart: JavaRosa'sScenarioand XForm builder DSL.- Checked against JavaRosa 6.0.0 oracle traces on a 401-form conformance corpus.
FormSession.close()andisClosed: a closed session'schangesstream is done and it no longer receives the form's events.FormDefinition.createSessioncloses the session it created before, since both share the definition's form.FormSession.answerreturnsAnswerRejectedfor text that doesn't fit the question's type or choices.- Performance (AOT, desktop): a 1,000-question form parses in about 40 ms and an answer recomputes its dependents in about 0.02 ms; forms and external XML instances are built from XML events, without an intermediate DOM.