N0 namespace

Is ODK Collect, or a certain previous version of it, adding the "n0"
namespace to meta nodes and their children?

I'm seeing:

<n0:meta xmlns:n0="http://openrosa.org/xforms">
n0:instanceIDuuid:0cebd4fa-06bc-4bb4-99c4-d3754bda78a5</n0:instanceID></n0:meta>

Note that 'n0' is an arbitrary string that is a qualifying prefix for the
namespace "http://openrosa.org/xforms"

You shouldn't rely on the qualifying prefix having any particular name, but
should confirm a namespace match. See
http://www.w3schools.com/xml/xml_namespaces.asp

Yes -- I forget exactly where this comes into play. I think there are 2
places:
(1) in ODK Collect, when the encrypted submission 'wrapper' form is
constructed.
(2) in ODK Aggregate, when a submission is downloaded to ODK Briefcase

In both cases, I am using an XML library to build up the submissions, and
this 'n0' prefix is what it chooses to use (it does not appear to offer an
API where I can specify the prefix).

Note that:

  • ODK Collect respects and preserves namespaces and qualifying prefixes
    when it writes the submission XML
  • ODK Aggregate ignores all namespaces. To conform to OpenRosa, it
    assumes that any incoming meta block should be in the OpenRosa namespace,
    and forces it to be in that namespace when the block is written in XML
    format for, e.g., pull requests from ODK Briefcase.
  • ODK Briefcase is agnostic to namespaces. It is just shipping files
    around.

Mitch

··· On Thu, Feb 13, 2014 at 10:01 AM, Martijn van de Rijdt wrote:

Is ODK Collect, or a certain previous version of it, adding the "n0"
namespace to meta nodes and their children?

I'm seeing:

<n0:meta xmlns:n0="http://openrosa.org/xforms">
n0:instanceIDuuid:0cebd4fa-06bc-4bb4-99c4-d3754bda78a5</n0:instanceID></n0:meta>

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Ah yes, the prefix for the namespace indeed.

I'll need to deal with this when an instance served to enketo for editing
contains this, either by properly preserving or stripping them. Will do
that.

Thanks,
Martijn

··· On Thu, Feb 13, 2014 at 11:16 AM, Mitch Sundt wrote:

Note that 'n0' is an arbitrary string that is a qualifying prefix for the
namespace "http://openrosa.org/xforms"

You shouldn't rely on the qualifying prefix having any particular name,
but should confirm a namespace match. See
http://www.w3schools.com/xml/xml_namespaces.asp

Yes -- I forget exactly where this comes into play. I think there are 2
places:
(1) in ODK Collect, when the encrypted submission 'wrapper' form is
constructed.
(2) in ODK Aggregate, when a submission is downloaded to ODK Briefcase

In both cases, I am using an XML library to build up the submissions, and
this 'n0' prefix is what it chooses to use (it does not appear to offer an
API where I can specify the prefix).

Note that:

  • ODK Collect respects and preserves namespaces and qualifying
    prefixes when it writes the submission XML
  • ODK Aggregate ignores all namespaces. To conform to OpenRosa, it
    assumes that any incoming meta block should be in the OpenRosa namespace,
    and forces it to be in that namespace when the block is written in XML
    format for, e.g., pull requests from ODK Briefcase.
  • ODK Briefcase is agnostic to namespaces. It is just shipping files
    around.

Mitch

On Thu, Feb 13, 2014 at 10:01 AM, Martijn van de Rijdt <martijn@enketo.org wrote:

Is ODK Collect, or a certain previous version of it, adding the "n0"
namespace to meta nodes and their children?

I'm seeing:

<n0:meta xmlns:n0="http://openrosa.org/xforms">
n0:instanceIDuuid:0cebd4fa-06bc-4bb4-99c4-d3754bda78a5</n0:instanceID></n0:meta>

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/Z17Vu1kSifQ/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Did you know that Enketo Smart Paper has now become the #1 tool for data
collection? Don't fall behind. Use it!

Enketo https://enketo.org |
LinkedInhttp://www.linkedin.com/company/enketo-llc |
GitHub https://github.com/MartijnR | Twitterhttps://twitter.com/enketo