Skip to content

Commit 30829c7

Browse files
committed
fixup entities xmlns
1 parent 554ebab commit 30829c7

File tree

8 files changed

+57
-57
lines changed

8 files changed

+57
-57
lines changed

test/data/xml.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ module.exports = {
346346
</h:html>`,
347347

348348
simpleEntity: `<?xml version="1.0"?>
349-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities">
349+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
350350
<h:head>
351351
<model entities:entities-version="2024.1.0">
352352
<instance>
@@ -370,7 +370,7 @@ module.exports = {
370370

371371
// Copy of the above form with the original entities-version
372372
simpleEntity2022: `<?xml version="1.0"?>
373-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
373+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
374374
<h:head>
375375
<model entities:entities-version="2022.1.0">
376376
<instance>
@@ -393,7 +393,7 @@ module.exports = {
393393
</h:html>`,
394394

395395
multiPropertyEntity: `<?xml version="1.0"?>
396-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
396+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
397397
<h:head>
398398
<model entities:entities-version="2024.1.0">
399399
<instance>
@@ -418,7 +418,7 @@ module.exports = {
418418
</h:html>`,
419419

420420
updateEntity: `<?xml version="1.0"?>
421-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
421+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
422422
<h:head>
423423
<model entities:entities-version="2024.1.0">
424424
<instance>
@@ -441,7 +441,7 @@ module.exports = {
441441

442442
// Copy of the above form with the original entities-version spec
443443
updateEntity2023: `<?xml version="1.0"?>
444-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
444+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
445445
<h:head>
446446
<model entities:entities-version="2023.1.0">
447447
<instance>
@@ -463,7 +463,7 @@ module.exports = {
463463
</h:html>`,
464464

465465
offlineEntity: `<?xml version="1.0"?>
466-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
466+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
467467
<h:head>
468468
<model entities:entities-version="2024.1.0">
469469
<instance>
@@ -1122,7 +1122,7 @@ module.exports = {
11221122
three: instance('selectMultiple', 'three', '<q1> b c</q1>')
11231123
},
11241124
simpleEntity: {
1125-
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="simpleEntity" version="1.0">
1125+
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="simpleEntity" version="1.0">
11261126
<meta>
11271127
<instanceID>one</instanceID>
11281128
<entities:entity dataset="people" id="uuid:12345678-1234-4123-8234-123456789abc" create="1">
@@ -1134,7 +1134,7 @@ module.exports = {
11341134
<age>88</age>
11351135
<hometown>Chicago</hometown>
11361136
</data>`,
1137-
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="simpleEntity" version="1.0">
1137+
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="simpleEntity" version="1.0">
11381138
<meta>
11391139
<instanceID>two</instanceID>
11401140
<entities:entity dataset="people" id="uuid:12345678-1234-4123-8234-123456789aaa" create="1">
@@ -1146,7 +1146,7 @@ module.exports = {
11461146
<age>30</age>
11471147
<hometown>Boston</hometown>
11481148
</data>`,
1149-
three: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="simpleEntity" version="1.0">
1149+
three: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="simpleEntity" version="1.0">
11501150
<meta>
11511151
<instanceID>three</instanceID>
11521152
<entities:entity dataset="people" id="uuid:12345678-1234-4123-8234-123456789bbb" create="1">
@@ -1158,7 +1158,7 @@ module.exports = {
11581158
<age>40</age>
11591159
<hometown>Toronto</hometown>
11601160
</data>`,
1161-
four: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="simpleEntity" version="1.0">
1161+
four: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="simpleEntity" version="1.0">
11621162
<meta>
11631163
<instanceID>four</instanceID>
11641164
<entities:entity dataset="people" id="uuid:12345678-1234-4123-8234-123456789ccc" create="1">
@@ -1172,7 +1172,7 @@ module.exports = {
11721172
</data>`
11731173
},
11741174
multiPropertyEntity: {
1175-
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="multiPropertyEntity" version="1.0">
1175+
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="multiPropertyEntity" version="1.0">
11761176
<meta>
11771177
<instanceID>one</instanceID>
11781178
<entities:entity dataset="foo" id="uuid:12345678-1234-4123-8234-123456789aaa" create="1">
@@ -1184,7 +1184,7 @@ module.exports = {
11841184
<q3>y</q3>
11851185
<q4>z</q4>
11861186
</data>`,
1187-
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="multiPropertyEntity" version="1.0">
1187+
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="multiPropertyEntity" version="1.0">
11881188
<meta>
11891189
<instanceID>two</instanceID>
11901190
<entities:entity dataset="foo" id="uuid:12345678-1234-4123-8234-123456789bbb" create="1">
@@ -1198,7 +1198,7 @@ module.exports = {
11981198
</data>`,
11991199
},
12001200
updateEntity: {
1201-
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="updateEntity" version="1.0">
1201+
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="updateEntity" version="1.0">
12021202
<meta>
12031203
<instanceID>one</instanceID>
12041204
<orx:instanceName>one</orx:instanceName>
@@ -1209,7 +1209,7 @@ module.exports = {
12091209
<name>Alicia</name>
12101210
<age>85</age>
12111211
</data>`,
1212-
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="updateEntity" version="1.0">
1212+
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="updateEntity" version="1.0">
12131213
<meta>
12141214
<instanceID>two</instanceID>
12151215
<orx:instanceName>two</orx:instanceName>
@@ -1218,7 +1218,7 @@ module.exports = {
12181218
</entity>
12191219
</meta>
12201220
</data>`,
1221-
three: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="updateEntity" version="1.0">
1221+
three: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="updateEntity" version="1.0">
12221222
<meta>
12231223
<instanceID>three</instanceID>
12241224
<orx:instanceName>three</orx:instanceName>
@@ -1229,7 +1229,7 @@ module.exports = {
12291229
</data>`
12301230
},
12311231
offlineEntity: {
1232-
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="offlineEntity" version="1.0">
1232+
one: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="offlineEntity" version="1.0">
12331233
<meta>
12341234
<instanceID>one</instanceID>
12351235
<orx:instanceName>one</orx:instanceName>
@@ -1240,7 +1240,7 @@ module.exports = {
12401240
</meta>
12411241
<status>arrived</status>
12421242
</data>`,
1243-
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" id="offlineEntity" version="1.0">
1243+
two: `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="offlineEntity" version="1.0">
12441244
<meta>
12451245
<instanceID>two</instanceID>
12461246
<orx:instanceName>two</orx:instanceName>

test/integration/api/datasets.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ describe('datasets and entities', () => {
23922392
describe('autolink when publishing form that creates and consumes new dataset', () => {
23932393
// update form that consumes dataset
23942394
const updateForm = `<?xml version="1.0"?>
2395-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
2395+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
23962396
<h:head>
23972397
<model entities:entities-version="2024.1.0">
23982398
<instance>
@@ -2483,7 +2483,7 @@ describe('datasets and entities', () => {
24832483
const asAlice = await service.login('alice');
24842484

24852485
const differentDataset = `<?xml version="1.0"?>
2486-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
2486+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
24872487
<h:head>
24882488
<model entities:entities-version="2024.1.0">
24892489
<instance>
@@ -2631,7 +2631,7 @@ describe('datasets and entities', () => {
26312631
const asAlice = await service.login('alice');
26322632

26332633
const noDataset = `<?xml version="1.0"?>
2634-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
2634+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
26352635
<h:head>
26362636
<model entities:entities-version="2024.1.0">
26372637
<instance>
@@ -2675,7 +2675,7 @@ describe('datasets and entities', () => {
26752675
const asAlice = await service.login('alice');
26762676

26772677
const caseChange = `<?xml version="1.0"?>
2678-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
2678+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
26792679
<h:head>
26802680
<model entities:entities-version="2024.1.0">
26812681
<instance>
@@ -2726,7 +2726,7 @@ describe('datasets and entities', () => {
27262726
.expect(200);
27272727

27282728
const caseChange = `<?xml version="1.0"?>
2729-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
2729+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
27302730
<h:head>
27312731
<model entities:entities-version="2024.1.0">
27322732
<instance>
@@ -3765,7 +3765,7 @@ describe('datasets and entities', () => {
37653765
}))));
37663766

37673767
it('should accept entity form and save dataset with no binds', testService((service) => {
3768-
const xml = `<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
3768+
const xml = `<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
37693769
<h:head>
37703770
<h:title>nobinds</h:title>
37713771
<model entities:entities-version='2024.1.0'>
@@ -3808,7 +3808,7 @@ describe('datasets and entities', () => {
38083808

38093809
it('should ignore a saveto incorrrectly placed on a bind on a structural field', testService(async (service) => {
38103810
const alice = await service.login('alice');
3811-
const xml = `<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms">
3811+
const xml = `<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities">
38123812
<h:head>
38133813
<model entities:entities-version='2024.1.0'>
38143814
<instance>
@@ -4891,7 +4891,7 @@ describe('datasets and entities', () => {
48914891
const asAlice = await service.login('alice');
48924892

48934893
const form = `<?xml version="1.0"?>
4894-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
4894+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
48954895
<h:head>
48964896
<model entities:entities-version="2024.1.0">
48974897
<instance>
@@ -4920,7 +4920,7 @@ describe('datasets and entities', () => {
49204920
})
49214921
.expect(200);
49224922

4923-
const sub = `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms" id="brokenForm" version="1.0">
4923+
const sub = `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="brokenForm" version="1.0">
49244924
<meta>
49254925
<instanceID>one</instanceID>
49264926
<orx:instanceName>one</orx:instanceName>
@@ -4956,7 +4956,7 @@ describe('datasets and entities', () => {
49564956
const asAlice = await service.login('alice');
49574957

49584958
const form = `<?xml version="1.0"?>
4959-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
4959+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
49604960
<h:head>
49614961
<model entities:entities-version="2024.1.0">
49624962
<instance>
@@ -4973,7 +4973,7 @@ describe('datasets and entities', () => {
49734973
</h:html>`;
49744974

49754975
const form2 = `<?xml version="1.0"?>
4976-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
4976+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
49774977
<h:head>
49784978
<model entities:entities-version="2024.1.0">
49794979
<instance>
@@ -5008,7 +5008,7 @@ describe('datasets and entities', () => {
50085008
const asAlice = await service.login('alice');
50095009

50105010
const form = `<?xml version="1.0"?>
5011-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
5011+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
50125012
<h:head>
50135013
<model entities:entities-version="2024.1.0">
50145014
<instance>
@@ -5031,7 +5031,7 @@ describe('datasets and entities', () => {
50315031

50325032
// Form with label nested under entity
50335033
const form2 = `<?xml version="1.0"?>
5034-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
5034+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
50355035
<h:head>
50365036
<model entities:entities-version="2024.1.0">
50375037
<instance>
@@ -5077,7 +5077,7 @@ describe('datasets and entities', () => {
50775077
const asAlice = await service.login('alice');
50785078

50795079
const form = `<?xml version="1.0"?>
5080-
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
5080+
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:orx="http://openrosa.org/xforms">
50815081
<h:head>
50825082
<model entities:entities-version="2024.1.0">
50835083
<instance>
@@ -5106,7 +5106,7 @@ describe('datasets and entities', () => {
51065106
})
51075107
.expect(200);
51085108

5109-
const sub = `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms" id="brokenForm" version="1.0">
5109+
const sub = `<data xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/xforms/entities" id="brokenForm" version="1.0">
51105110
<meta>
51115111
<instanceID>one</instanceID>
51125112
<orx:instanceName>one</orx:instanceName>

0 commit comments

Comments
 (0)