Create a valid OpenRosa FormList of xforms see https://bitbucket.org/javarosa/javarosa/wiki/FormListAPI
Last updated 3 years ago by scdf .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @medic/openrosa-formlist 
SYNC missed versions from official npm registry.


build status

Create a valid JavaRosa FormList of xforms see https://bitbucket.org/javarosa/javarosa/wiki/FormListAPI

defaults(mediaRe, namePath, instancePath)

Default options


parameter type description
mediaRe RegExp RegExp to match any external media referenced in the xForm
namePath String xPath style path to the XML tag that contains the xForm name
instancePath String xPath style path to XML tag that contains the instance (which has the form id and version as attributes)

createFormList(forms, [options], callback)

Creates a valid FormList XML document according to https://bitbucket.org/javarosa/javarosa/wiki/FormListAPI


parameter type description
forms Array An array of Urls for each form, streams (could be a file read stream or a response stream), or full XML text of the form
[options] Object optional: options.downloadUrl is a template for the url where the form is located, in the format http://example.com/forms/${formId}.xml. ${formId} will be replaced by the actual form Id of each form. options.manifestUrl is the url template for the location of the manifest xml document (only included if external media is referenced in the xForm)
callback Function Called with (err, data) where data is a valid formListAPI Xml document


var createFormList = require('openrosa-formlist');

var forms = [

createFormList(forms, function(err, data) {
  console.log(data) // outputs formList Xml


Requires nodejs.

$ npm install openrosa-formlist


$ npm test

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

1 Versions

  • 1.0.1                                ...           3 years ago
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (8)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |