{"action":"created","comment":{"url":"https://api.github.com/repos/motech/modules/pulls/comments/51010220","id":51010220,"diff_hunk":"@@ -0,0 +1,206 @@\n+package org.motechproject.odk.parser.impl;\n+\n+import org.motechproject.odk.constant.FieldTypeConstants;\n+import org.motechproject.odk.domain.FormDefinition;\n+import org.motechproject.odk.domain.FormElement;\n+import org.motechproject.odk.domain.builder.FormElementBuilder;\n+import org.motechproject.odk.parser.XformParser;\n+import org.springframework.util.xml.SimpleNamespaceContext;\n+import org.w3c.dom.NamedNodeMap;\n+import org.w3c.dom.Node;\n+import org.w3c.dom.NodeList;\n+import org.xml.sax.InputSource;\n+\n+import javax.xml.xpath.XPath;\n+import javax.xml.xpath.XPathConstants;\n+import javax.xml.xpath.XPathExpressionException;\n+import javax.xml.xpath.XPathFactory;\n+import java.io.ByteArrayInputStream;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+public class XformParserODK implements XformParser {\n+\n+    protected static final String TITLE_PATH = \"/h:html/h:head/h:title\";\n+    protected static final String BIND_ELEMENTS = \"/h:html/h:head/xForms:model/xForms:bind\";\n+    protected static final String FORM_ELEMENTS_PARENT_PATH = \"/h:html/h:head/xForms:model/xForms:instance/*[@id]\";\n+    protected static final String ROOT_PATH = \"/\";\n+    protected static final String NODE_SET = \"nodeset\";\n+    protected static final String TYPE = \"type\";\n+    protected static final String STRING = \"string\";\n+\n+    private XPath xPath;","path":"odk/src/main/java/org/motechproject/odk/parser/impl/XformParserODK.java","position":34,"original_position":34,"commit_id":"4af2fe8b1046787db7adf17e441a11426f13a9fd","original_commit_id":"4af2fe8b1046787db7adf17e441a11426f13a9fd","user":{"login":"pgesek","id":1384169,"avatar_url":"https://avatars.githubusercontent.com/u/1384169?v=3","gravatar_id":"","url":"https://api.github.com/users/pgesek","html_url":"https://github.com/pgesek","followers_url":"https://api.github.com/users/pgesek/followers","following_url":"https://api.github.com/users/pgesek/following{/other_user}","gists_url":"https://api.github.com/users/pgesek/gists{/gist_id}","starred_url":"https://api.github.com/users/pgesek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgesek/subscriptions","organizations_url":"https://api.github.com/users/pgesek/orgs","repos_url":"https://api.github.com/users/pgesek/repos","events_url":"https://api.github.com/users/pgesek/events{/privacy}","received_events_url":"https://api.github.com/users/pgesek/received_events","type":"User","site_admin":false},"body":"move this variable below all static code","created_at":"2016-01-27T16:35:45Z","updated_at":"2016-01-27T16:35:45Z","html_url":"https://github.com/motech/modules/pull/114#discussion_r51010220","pull_request_url":"https://api.github.com/repos/motech/modules/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/motech/modules/pulls/comments/51010220"},"html":{"href":"https://github.com/motech/modules/pull/114#discussion_r51010220"},"pull_request":{"href":"https://api.github.com/repos/motech/modules/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/motech/modules/pulls/114","id":56637545,"html_url":"https://github.com/motech/modules/pull/114","diff_url":"https://github.com/motech/modules/pull/114.diff","patch_url":"https://github.com/motech/modules/pull/114.patch","issue_url":"https://api.github.com/repos/motech/modules/issues/114","number":114,"state":"open","locked":false,"title":"MOTECH-610 Integration of MOTECH with ODK 1","user":{"login":"ScottKimball","id":6171153,"avatar_url":"https://avatars.githubusercontent.com/u/6171153?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottKimball","html_url":"https://github.com/ScottKimball","followers_url":"https://api.github.com/users/ScottKimball/followers","following_url":"https://api.github.com/users/ScottKimball/following{/other_user}","gists_url":"https://api.github.com/users/ScottKimball/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottKimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottKimball/subscriptions","organizations_url":"https://api.github.com/users/ScottKimball/orgs","repos_url":"https://api.github.com/users/ScottKimball/repos","events_url":"https://api.github.com/users/ScottKimball/events{/privacy}","received_events_url":"https://api.github.com/users/ScottKimball/received_events","type":"User","site_admin":false},"body":"Adds the ODK module to the modules repository.","created_at":"2016-01-20T17:09:32Z","updated_at":"2016-01-27T16:35:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f3335243457eed7db3b1e9acac8ecb15ed89e1d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/motech/modules/pulls/114/commits","review_comments_url":"https://api.github.com/repos/motech/modules/pulls/114/comments","review_comment_url":"https://api.github.com/repos/motech/modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/motech/modules/issues/114/comments","statuses_url":"https://api.github.com/repos/motech/modules/statuses/4af2fe8b1046787db7adf17e441a11426f13a9fd","head":{"label":"ScottKimball:MOTECH-610","ref":"MOTECH-610","sha":"4af2fe8b1046787db7adf17e441a11426f13a9fd","user":{"login":"ScottKimball","id":6171153,"avatar_url":"https://avatars.githubusercontent.com/u/6171153?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottKimball","html_url":"https://github.com/ScottKimball","followers_url":"https://api.github.com/users/ScottKimball/followers","following_url":"https://api.github.com/users/ScottKimball/following{/other_user}","gists_url":"https://api.github.com/users/ScottKimball/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottKimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottKimball/subscriptions","organizations_url":"https://api.github.com/users/ScottKimball/orgs","repos_url":"https://api.github.com/users/ScottKimball/repos","events_url":"https://api.github.com/users/ScottKimball/events{/privacy}","received_events_url":"https://api.github.com/users/ScottKimball/received_events","type":"User","site_admin":false},"repo":{"id":50035476,"name":"modules","full_name":"ScottKimball/modules","owner":{"login":"ScottKimball","id":6171153,"avatar_url":"https://avatars.githubusercontent.com/u/6171153?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottKimball","html_url":"https://github.com/ScottKimball","followers_url":"https://api.github.com/users/ScottKimball/followers","following_url":"https://api.github.com/users/ScottKimball/following{/other_user}","gists_url":"https://api.github.com/users/ScottKimball/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottKimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottKimball/subscriptions","organizations_url":"https://api.github.com/users/ScottKimball/orgs","repos_url":"https://api.github.com/users/ScottKimball/repos","events_url":"https://api.github.com/users/ScottKimball/events{/privacy}","received_events_url":"https://api.github.com/users/ScottKimball/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ScottKimball/modules","description":" Mobile Technology for Community Health - Modules","fork":true,"url":"https://api.github.com/repos/ScottKimball/modules","forks_url":"https://api.github.com/repos/ScottKimball/modules/forks","keys_url":"https://api.github.com/repos/ScottKimball/modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScottKimball/modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScottKimball/modules/teams","hooks_url":"https://api.github.com/repos/ScottKimball/modules/hooks","issue_events_url":"https://api.github.com/repos/ScottKimball/modules/issues/events{/number}","events_url":"https://api.github.com/repos/ScottKimball/modules/events","assignees_url":"https://api.github.com/repos/ScottKimball/modules/assignees{/user}","branches_url":"https://api.github.com/repos/ScottKimball/modules/branches{/branch}","tags_url":"https://api.github.com/repos/ScottKimball/modules/tags","blobs_url":"https://api.github.com/repos/ScottKimball/modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScottKimball/modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScottKimball/modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScottKimball/modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScottKimball/modules/statuses/{sha}","languages_url":"https://api.github.com/repos/ScottKimball/modules/languages","stargazers_url":"https://api.github.com/repos/ScottKimball/modules/stargazers","contributors_url":"https://api.github.com/repos/ScottKimball/modules/contributors","subscribers_url":"https://api.github.com/repos/ScottKimball/modules/subscribers","subscription_url":"https://api.github.com/repos/ScottKimball/modules/subscription","commits_url":"https://api.github.com/repos/ScottKimball/modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScottKimball/modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScottKimball/modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScottKimball/modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScottKimball/modules/contents/{+path}","compare_url":"https://api.github.com/repos/ScottKimball/modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScottKimball/modules/merges","archive_url":"https://api.github.com/repos/ScottKimball/modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScottKimball/modules/downloads","issues_url":"https://api.github.com/repos/ScottKimball/modules/issues{/number}","pulls_url":"https://api.github.com/repos/ScottKimball/modules/pulls{/number}","milestones_url":"https://api.github.com/repos/ScottKimball/modules/milestones{/number}","notifications_url":"https://api.github.com/repos/ScottKimball/modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScottKimball/modules/labels{/name}","releases_url":"https://api.github.com/repos/ScottKimball/modules/releases{/id}","deployments_url":"https://api.github.com/repos/ScottKimball/modules/deployments","created_at":"2016-01-20T14:30:36Z","updated_at":"2016-01-20T14:30:40Z","pushed_at":"2016-01-25T17:05:34Z","git_url":"git://github.com/ScottKimball/modules.git","ssh_url":"git@github.com:ScottKimball/modules.git","clone_url":"https://github.com/ScottKimball/modules.git","svn_url":"https://github.com/ScottKimball/modules","homepage":"http://modules.motechproject.org","size":31408,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"motech:master","ref":"master","sha":"2b8474125b82786f71e2f09f31e308e862965bfd","user":{"login":"motech","id":477919,"avatar_url":"https://avatars.githubusercontent.com/u/477919?v=3","gravatar_id":"","url":"https://api.github.com/users/motech","html_url":"https://github.com/motech","followers_url":"https://api.github.com/users/motech/followers","following_url":"https://api.github.com/users/motech/following{/other_user}","gists_url":"https://api.github.com/users/motech/gists{/gist_id}","starred_url":"https://api.github.com/users/motech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech/subscriptions","organizations_url":"https://api.github.com/users/motech/orgs","repos_url":"https://api.github.com/users/motech/repos","events_url":"https://api.github.com/users/motech/events{/privacy}","received_events_url":"https://api.github.com/users/motech/received_events","type":"Organization","site_admin":false},"repo":{"id":19785525,"name":"modules","full_name":"motech/modules","owner":{"login":"motech","id":477919,"avatar_url":"https://avatars.githubusercontent.com/u/477919?v=3","gravatar_id":"","url":"https://api.github.com/users/motech","html_url":"https://github.com/motech","followers_url":"https://api.github.com/users/motech/followers","following_url":"https://api.github.com/users/motech/following{/other_user}","gists_url":"https://api.github.com/users/motech/gists{/gist_id}","starred_url":"https://api.github.com/users/motech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech/subscriptions","organizations_url":"https://api.github.com/users/motech/orgs","repos_url":"https://api.github.com/users/motech/repos","events_url":"https://api.github.com/users/motech/events{/privacy}","received_events_url":"https://api.github.com/users/motech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech/modules","description":" Mobile Technology for Community Health - Modules","fork":false,"url":"https://api.github.com/repos/motech/modules","forks_url":"https://api.github.com/repos/motech/modules/forks","keys_url":"https://api.github.com/repos/motech/modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech/modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech/modules/teams","hooks_url":"https://api.github.com/repos/motech/modules/hooks","issue_events_url":"https://api.github.com/repos/motech/modules/issues/events{/number}","events_url":"https://api.github.com/repos/motech/modules/events","assignees_url":"https://api.github.com/repos/motech/modules/assignees{/user}","branches_url":"https://api.github.com/repos/motech/modules/branches{/branch}","tags_url":"https://api.github.com/repos/motech/modules/tags","blobs_url":"https://api.github.com/repos/motech/modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech/modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech/modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech/modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech/modules/statuses/{sha}","languages_url":"https://api.github.com/repos/motech/modules/languages","stargazers_url":"https://api.github.com/repos/motech/modules/stargazers","contributors_url":"https://api.github.com/repos/motech/modules/contributors","subscribers_url":"https://api.github.com/repos/motech/modules/subscribers","subscription_url":"https://api.github.com/repos/motech/modules/subscription","commits_url":"https://api.github.com/repos/motech/modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech/modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech/modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech/modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech/modules/contents/{+path}","compare_url":"https://api.github.com/repos/motech/modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech/modules/merges","archive_url":"https://api.github.com/repos/motech/modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech/modules/downloads","issues_url":"https://api.github.com/repos/motech/modules/issues{/number}","pulls_url":"https://api.github.com/repos/motech/modules/pulls{/number}","milestones_url":"https://api.github.com/repos/motech/modules/milestones{/number}","notifications_url":"https://api.github.com/repos/motech/modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech/modules/labels{/name}","releases_url":"https://api.github.com/repos/motech/modules/releases{/id}","deployments_url":"https://api.github.com/repos/motech/modules/deployments","created_at":"2014-05-14T15:41:17Z","updated_at":"2016-01-13T08:57:18Z","pushed_at":"2016-01-26T10:44:36Z","git_url":"git://github.com/motech/modules.git","ssh_url":"git@github.com:motech/modules.git","clone_url":"https://github.com/motech/modules.git","svn_url":"https://github.com/motech/modules","homepage":"http://modules.motechproject.org","size":31463,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":4,"forks":26,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/motech/modules/pulls/114"},"html":{"href":"https://github.com/motech/modules/pull/114"},"issue":{"href":"https://api.github.com/repos/motech/modules/issues/114"},"comments":{"href":"https://api.github.com/repos/motech/modules/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/motech/modules/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/motech/modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/motech/modules/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/motech/modules/statuses/4af2fe8b1046787db7adf17e441a11426f13a9fd"}}}}