sheng 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +1 -0
- data/.gitignore +18 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.watchr +99 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +62 -0
- data/Rakefile +10 -0
- data/docs/creating_templates.docx +0 -0
- data/docs/creating_templates.md +392 -0
- data/lib/sheng/block.rb +59 -0
- data/lib/sheng/check_box.rb +43 -0
- data/lib/sheng/conditional_block.rb +30 -0
- data/lib/sheng/data_set.rb +45 -0
- data/lib/sheng/docx.rb +75 -0
- data/lib/sheng/merge_field.rb +208 -0
- data/lib/sheng/merge_field_set.rb +90 -0
- data/lib/sheng/path_helpers.rb +15 -0
- data/lib/sheng/sequence.rb +66 -0
- data/lib/sheng/support.rb +57 -0
- data/lib/sheng/version.rb +3 -0
- data/lib/sheng/wml_file.rb +47 -0
- data/lib/sheng.rb +21 -0
- data/sheng.gemspec +31 -0
- data/spec/fixtures/bad_docx_files/with_field_not_in_dataset.docx +0 -0
- data/spec/fixtures/bad_docx_files/with_missing_sequence_start.docx +0 -0
- data/spec/fixtures/bad_docx_files/with_old_mergefields.docx +0 -0
- data/spec/fixtures/bad_docx_files/with_poorly_nested_sequences.docx +0 -0
- data/spec/fixtures/bad_docx_files/with_unended_sequence.docx +0 -0
- data/spec/fixtures/docx_files/input_document.docx +0 -0
- data/spec/fixtures/docx_files/old_style/input_document.docx +0 -0
- data/spec/fixtures/docx_files/old_style/output_document.docx +0 -0
- data/spec/fixtures/docx_files/output_document.docx +0 -0
- data/spec/fixtures/inputs/complete.json +61 -0
- data/spec/fixtures/inputs/incomplete.json +52 -0
- data/spec/fixtures/trees/embedded_sequence.yml +13 -0
- data/spec/fixtures/trees/merge_field_set.yml +16 -0
- data/spec/fixtures/xml_fragments/input/check_box/check_box.xml +11 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/bad/badly_nested_conditional.xml +105 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/bad/unclosed_conditional.xml +35 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/conditional_block_if.xml +84 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/conditional_block_inline.xml +59 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/conditional_block_unless.xml +51 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/conditional_in_table.xml +176 -0
- data/spec/fixtures/xml_fragments/input/conditional_block/embedded_conditional.xml +79 -0
- data/spec/fixtures/xml_fragments/input/merge_field/bad/not_a_real_mergefield_new.xml +19 -0
- data/spec/fixtures/xml_fragments/input/merge_field/bad/not_a_real_mergefield_old.xml +9 -0
- data/spec/fixtures/xml_fragments/input/merge_field/bad/unclosed_merge_field.xml +25 -0
- data/spec/fixtures/xml_fragments/input/merge_field/inline_merge_field.xml +26 -0
- data/spec/fixtures/xml_fragments/input/merge_field/merge_field.xml +14 -0
- data/spec/fixtures/xml_fragments/input/merge_field/new_merge_field.xml +28 -0
- data/spec/fixtures/xml_fragments/input/merge_field/split_merge_field.xml +33 -0
- data/spec/fixtures/xml_fragments/input/merge_field_set/complex_nesting_and_reuse.xml +231 -0
- data/spec/fixtures/xml_fragments/input/merge_field_set/merge_field_set.xml +89 -0
- data/spec/fixtures/xml_fragments/input/merge_field_set/with_non_mergefield_fields.xml +43 -0
- data/spec/fixtures/xml_fragments/input/sequence/array_sequence.xml +23 -0
- data/spec/fixtures/xml_fragments/input/sequence/bad/badly_nested_sequence.xml +62 -0
- data/spec/fixtures/xml_fragments/input/sequence/bad/unclosed_sequence.xml +32 -0
- data/spec/fixtures/xml_fragments/input/sequence/embedded_sequence.xml +68 -0
- data/spec/fixtures/xml_fragments/input/sequence/inline_sequence.xml +24 -0
- data/spec/fixtures/xml_fragments/input/sequence/overridden_iterator_array_sequence.xml +23 -0
- data/spec/fixtures/xml_fragments/input/sequence/sequence.xml +39 -0
- data/spec/fixtures/xml_fragments/input/sequence/sequence_in_table.xml +125 -0
- data/spec/fixtures/xml_fragments/input/sequence/sequence_with_section_formatting.xml +41 -0
- data/spec/fixtures/xml_fragments/input/sequence/series_with_commas.xml +73 -0
- data/spec/fixtures/xml_fragments/output/check_box/check_box.xml +11 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/conditional_in_table_does_not_exist.xml +52 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/conditional_in_table_exists.xml +84 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/embedded_conditional_both.xml +11 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/embedded_conditional_inside.xml +5 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/embedded_conditional_outside.xml +8 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/if_does_not_exist.xml +5 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/if_exists.xml +19 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/inline_does_not_exist.xml +10 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/inline_exists.xml +13 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/unless_does_not_exist.xml +11 -0
- data/spec/fixtures/xml_fragments/output/conditional_block/unless_exists.xml +5 -0
- data/spec/fixtures/xml_fragments/output/merge_field/inline_merge_field.xml +11 -0
- data/spec/fixtures/xml_fragments/output/merge_field/merge_field.xml +12 -0
- data/spec/fixtures/xml_fragments/output/merge_field/split_merge_field.xml +10 -0
- data/spec/fixtures/xml_fragments/output/merge_field_set/complex_nesting_and_reuse.xml +190 -0
- data/spec/fixtures/xml_fragments/output/merge_field_set/merge_field_set.xml +75 -0
- data/spec/fixtures/xml_fragments/output/merge_field_set/with_non_mergefield_fields.xml +31 -0
- data/spec/fixtures/xml_fragments/output/sequence/array_sequence.xml +17 -0
- data/spec/fixtures/xml_fragments/output/sequence/embedded_sequence.xml +56 -0
- data/spec/fixtures/xml_fragments/output/sequence/inline_sequence.xml +16 -0
- data/spec/fixtures/xml_fragments/output/sequence/overridden_iterator_array_sequence.xml +12 -0
- data/spec/fixtures/xml_fragments/output/sequence/sequence.xml +28 -0
- data/spec/fixtures/xml_fragments/output/sequence/sequence_in_table.xml +120 -0
- data/spec/fixtures/xml_fragments/output/sequence/sequence_with_section_formatting.xml +46 -0
- data/spec/fixtures/xml_fragments/output/sequence/series_with_commas.xml +43 -0
- data/spec/fixtures/xml_fragments/output/sequence/series_with_commas_two_items.xml +31 -0
- data/spec/lib/sheng/check_box_spec.rb +87 -0
- data/spec/lib/sheng/conditional_block_spec.rb +151 -0
- data/spec/lib/sheng/data_set_spec.rb +65 -0
- data/spec/lib/sheng/docx_spec.rb +146 -0
- data/spec/lib/sheng/merge_field_set_spec.rb +165 -0
- data/spec/lib/sheng/merge_field_spec.rb +276 -0
- data/spec/lib/sheng/sequence_spec.rb +201 -0
- data/spec/lib/sheng/wml_file_spec.rb +38 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/path_helper.rb +15 -0
- data/spec/support/xml_helper.rb +28 -0
- metadata +355 -0
@@ -0,0 +1,176 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:tbl>
|
3
|
+
<w:tr>
|
4
|
+
<w:tc>
|
5
|
+
<w:p>
|
6
|
+
<w:r>
|
7
|
+
<w:t>Name</w:t>
|
8
|
+
</w:r>
|
9
|
+
</w:p>
|
10
|
+
</w:tc>
|
11
|
+
<w:tc>
|
12
|
+
<w:p>
|
13
|
+
<w:r>
|
14
|
+
<w:t>Favorite Megaphone</w:t>
|
15
|
+
</w:r>
|
16
|
+
</w:p>
|
17
|
+
</w:tc>
|
18
|
+
</w:tr>
|
19
|
+
<w:tr>
|
20
|
+
<w:tc>
|
21
|
+
<w:p>
|
22
|
+
<w:r>
|
23
|
+
<w:fldChar w:fldCharType="begin"/>
|
24
|
+
</w:r>
|
25
|
+
<w:r>
|
26
|
+
<w:instrText xml:space="preserve">MERGEFIELD if:include_dogs \* MERGEFORMAT </w:instrText>
|
27
|
+
</w:r>
|
28
|
+
<w:r>
|
29
|
+
<w:fldChar w:fldCharType="separate"/>
|
30
|
+
</w:r>
|
31
|
+
<w:r>
|
32
|
+
<w:t>«if:include_dogs»</w:t>
|
33
|
+
</w:r>
|
34
|
+
<w:r>
|
35
|
+
<w:rPr>
|
36
|
+
<w:noProof/>
|
37
|
+
</w:rPr>
|
38
|
+
<w:fldChar w:fldCharType="end"/>
|
39
|
+
</w:r>
|
40
|
+
</w:p>
|
41
|
+
</w:tc>
|
42
|
+
<w:tc>
|
43
|
+
</w:tc>
|
44
|
+
</w:tr>
|
45
|
+
<w:tr>
|
46
|
+
<w:tc>
|
47
|
+
<w:p>
|
48
|
+
<w:r>
|
49
|
+
<w:fldChar w:fldCharType="begin"/>
|
50
|
+
</w:r>
|
51
|
+
<w:r>
|
52
|
+
<w:instrText xml:space="preserve">MERGEFIELD start:dog_favorites \* MERGEFORMAT </w:instrText>
|
53
|
+
</w:r>
|
54
|
+
<w:r>
|
55
|
+
<w:fldChar w:fldCharType="separate"/>
|
56
|
+
</w:r>
|
57
|
+
<w:r>
|
58
|
+
<w:t>«start:dog_favorites»</w:t>
|
59
|
+
</w:r>
|
60
|
+
<w:r>
|
61
|
+
<w:rPr>
|
62
|
+
<w:noProof/>
|
63
|
+
</w:rPr>
|
64
|
+
<w:fldChar w:fldCharType="end"/>
|
65
|
+
</w:r>
|
66
|
+
</w:p>
|
67
|
+
</w:tc>
|
68
|
+
<w:tc>
|
69
|
+
</w:tc>
|
70
|
+
</w:tr>
|
71
|
+
<w:tr>
|
72
|
+
<w:tc>
|
73
|
+
<w:p>
|
74
|
+
<w:fldSimple w:instr=" MERGEFIELD name \* MERGEFORMAT ">
|
75
|
+
<w:r w:rsidR="00623574">
|
76
|
+
<w:t>«name»</w:t>
|
77
|
+
</w:r>
|
78
|
+
</w:fldSimple>
|
79
|
+
</w:p>
|
80
|
+
</w:tc>
|
81
|
+
<w:tc>
|
82
|
+
<w:p>
|
83
|
+
<w:fldSimple w:instr=" MERGEFIELD megaphone \* MERGEFORMAT ">
|
84
|
+
<w:r w:rsidR="00623574">
|
85
|
+
<w:t>«megaphone»</w:t>
|
86
|
+
</w:r>
|
87
|
+
</w:fldSimple>
|
88
|
+
</w:p>
|
89
|
+
</w:tc>
|
90
|
+
</w:tr>
|
91
|
+
<w:tr>
|
92
|
+
<w:tc>
|
93
|
+
<w:p>
|
94
|
+
<w:r>
|
95
|
+
<w:fldChar w:fldCharType="begin"/>
|
96
|
+
</w:r>
|
97
|
+
<w:r>
|
98
|
+
<w:instrText xml:space="preserve">MERGEFIELD end:dog_favorites \* MERGEFORMAT </w:instrText>
|
99
|
+
</w:r>
|
100
|
+
<w:r>
|
101
|
+
<w:fldChar w:fldCharType="separate"/>
|
102
|
+
</w:r>
|
103
|
+
<w:r>
|
104
|
+
<w:t>«end:dog_favorites»</w:t>
|
105
|
+
</w:r>
|
106
|
+
<w:r>
|
107
|
+
<w:rPr>
|
108
|
+
<w:noProof/>
|
109
|
+
</w:rPr>
|
110
|
+
<w:fldChar w:fldCharType="end"/>
|
111
|
+
</w:r>
|
112
|
+
</w:p>
|
113
|
+
</w:tc>
|
114
|
+
<w:tc>
|
115
|
+
</w:tc>
|
116
|
+
</w:tr>
|
117
|
+
<w:tr>
|
118
|
+
<w:tc>
|
119
|
+
<w:p>
|
120
|
+
<w:r>
|
121
|
+
<w:fldChar w:fldCharType="begin"/>
|
122
|
+
</w:r>
|
123
|
+
<w:r>
|
124
|
+
<w:instrText xml:space="preserve">MERGEFIELD end_if:include_dogs \* MERGEFORMAT </w:instrText>
|
125
|
+
</w:r>
|
126
|
+
<w:r>
|
127
|
+
<w:fldChar w:fldCharType="separate"/>
|
128
|
+
</w:r>
|
129
|
+
<w:r>
|
130
|
+
<w:t>«end_if:include_dogs»</w:t>
|
131
|
+
</w:r>
|
132
|
+
<w:r>
|
133
|
+
<w:rPr>
|
134
|
+
<w:noProof/>
|
135
|
+
</w:rPr>
|
136
|
+
<w:fldChar w:fldCharType="end"/>
|
137
|
+
</w:r>
|
138
|
+
</w:p>
|
139
|
+
</w:tc>
|
140
|
+
<w:tc>
|
141
|
+
</w:tc>
|
142
|
+
</w:tr>
|
143
|
+
<w:tr>
|
144
|
+
<w:tc>
|
145
|
+
<w:p>
|
146
|
+
<w:r>
|
147
|
+
<w:t>Mr. Humanface</w:t>
|
148
|
+
</w:r>
|
149
|
+
</w:p>
|
150
|
+
</w:tc>
|
151
|
+
<w:tc>
|
152
|
+
<w:p>
|
153
|
+
<w:r>
|
154
|
+
<w:t>NoMoreQuiets</w:t>
|
155
|
+
</w:r>
|
156
|
+
</w:p>
|
157
|
+
</w:tc>
|
158
|
+
</w:tr>
|
159
|
+
<w:tr>
|
160
|
+
<w:tc>
|
161
|
+
<w:p>
|
162
|
+
<w:r>
|
163
|
+
<w:t>Lady Notdog</w:t>
|
164
|
+
</w:r>
|
165
|
+
</w:p>
|
166
|
+
</w:tc>
|
167
|
+
<w:tc>
|
168
|
+
<w:p>
|
169
|
+
<w:r>
|
170
|
+
<w:t>iNoise</w:t>
|
171
|
+
</w:r>
|
172
|
+
</w:p>
|
173
|
+
</w:tc>
|
174
|
+
</w:tr>
|
175
|
+
</w:tbl>
|
176
|
+
</w:document>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:r>
|
3
|
+
<w:t>What are your hobbies?</w:t>
|
4
|
+
</w:r>
|
5
|
+
<w:p>
|
6
|
+
<w:r>
|
7
|
+
<w:fldChar w:fldCharType="begin"/>
|
8
|
+
</w:r>
|
9
|
+
<w:r>
|
10
|
+
<w:instrText xml:space="preserve">MERGEFIELD if:alicorns \* MERGEFORMAT </w:instrText>
|
11
|
+
</w:r>
|
12
|
+
<w:r>
|
13
|
+
<w:fldChar w:fldCharType="separate"/>
|
14
|
+
</w:r>
|
15
|
+
<w:r>
|
16
|
+
<w:t>«if:alicorns»</w:t>
|
17
|
+
</w:r>
|
18
|
+
<w:r>
|
19
|
+
<w:fldChar w:fldCharType="end"/>
|
20
|
+
</w:r>
|
21
|
+
</w:p>
|
22
|
+
<w:r>
|
23
|
+
<w:t>Alicorns, of course, don't be silly.</w:t>
|
24
|
+
</w:r>
|
25
|
+
<w:p>
|
26
|
+
<w:r>
|
27
|
+
<w:fldChar w:fldCharType="begin"/>
|
28
|
+
</w:r>
|
29
|
+
<w:r>
|
30
|
+
<w:instrText xml:space="preserve">MERGEFIELD if:scubas \* MERGEFORMAT </w:instrText>
|
31
|
+
</w:r>
|
32
|
+
<w:r>
|
33
|
+
<w:fldChar w:fldCharType="separate"/>
|
34
|
+
</w:r>
|
35
|
+
<w:r>
|
36
|
+
<w:t>«if:scubas»</w:t>
|
37
|
+
</w:r>
|
38
|
+
<w:r>
|
39
|
+
<w:fldChar w:fldCharType="end"/>
|
40
|
+
</w:r>
|
41
|
+
</w:p>
|
42
|
+
<w:r>
|
43
|
+
<w:t>...but also scubas!!</w:t>
|
44
|
+
</w:r>
|
45
|
+
<w:p>
|
46
|
+
<w:r>
|
47
|
+
<w:fldChar w:fldCharType="begin"/>
|
48
|
+
</w:r>
|
49
|
+
<w:r>
|
50
|
+
<w:instrText xml:space="preserve">MERGEFIELD end_if:scubas \* MERGEFORMAT </w:instrText>
|
51
|
+
</w:r>
|
52
|
+
<w:r>
|
53
|
+
<w:fldChar w:fldCharType="separate"/>
|
54
|
+
</w:r>
|
55
|
+
<w:r>
|
56
|
+
<w:t>«end_if:scubas»</w:t>
|
57
|
+
</w:r>
|
58
|
+
<w:r>
|
59
|
+
<w:fldChar w:fldCharType="end"/>
|
60
|
+
</w:r>
|
61
|
+
</w:p>
|
62
|
+
<w:p>
|
63
|
+
<w:r>
|
64
|
+
<w:fldChar w:fldCharType="begin"/>
|
65
|
+
</w:r>
|
66
|
+
<w:r>
|
67
|
+
<w:instrText xml:space="preserve">MERGEFIELD end_if:alicorns \* MERGEFORMAT </w:instrText>
|
68
|
+
</w:r>
|
69
|
+
<w:r>
|
70
|
+
<w:fldChar w:fldCharType="separate"/>
|
71
|
+
</w:r>
|
72
|
+
<w:r>
|
73
|
+
<w:t>«end_if:alicorns»</w:t>
|
74
|
+
</w:r>
|
75
|
+
<w:r>
|
76
|
+
<w:fldChar w:fldCharType="end"/>
|
77
|
+
</w:r>
|
78
|
+
</w:p>
|
79
|
+
</w:document>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:p>
|
3
|
+
<w:r>
|
4
|
+
<w:fldChar w:fldCharType="begin"/>
|
5
|
+
</w:r>
|
6
|
+
<w:r>
|
7
|
+
<w:instrText xml:space="preserve">PAGE \* MERGEFORMAT </w:instrText>
|
8
|
+
</w:r>
|
9
|
+
<w:r>
|
10
|
+
<w:fldChar w:fldCharType="separate"/>
|
11
|
+
</w:r>
|
12
|
+
<w:r>
|
13
|
+
<w:t>1</w:t>
|
14
|
+
</w:r>
|
15
|
+
<w:r>
|
16
|
+
<w:fldChar w:fldCharType="end"/>
|
17
|
+
</w:r>
|
18
|
+
</w:p>
|
19
|
+
</w:document>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:r>
|
3
|
+
<w:fldChar w:fldCharType="begin"/>
|
4
|
+
</w:r>
|
5
|
+
<w:r>
|
6
|
+
<w:instrText xml:space="preserve">MERGEFIELD this_has_a_</w:instrText>
|
7
|
+
</w:r>
|
8
|
+
<w:r>
|
9
|
+
<w:instrText>beginning_but_no_</w:instrText>
|
10
|
+
</w:r>
|
11
|
+
<w:r>
|
12
|
+
<w:fldChar w:fldCharType="separate"/>
|
13
|
+
</w:r>
|
14
|
+
<w:r>
|
15
|
+
<w:rPr>
|
16
|
+
<w:b/>
|
17
|
+
<w:i/>
|
18
|
+
<w:noProof/>
|
19
|
+
</w:rPr>
|
20
|
+
<w:t>«project_amount»</w:t>
|
21
|
+
</w:r>
|
22
|
+
<w:r>
|
23
|
+
<w:fldChar w:fldCharType="end"/>
|
24
|
+
</w:r>
|
25
|
+
</w:document>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:p>
|
3
|
+
<w:r>
|
4
|
+
<w:fldChar w:fldCharType="begin"/>
|
5
|
+
</w:r>
|
6
|
+
<w:r>
|
7
|
+
<w:instrText xml:space="preserve">MERGEFIELD prefix \* MERGEFORMAT </w:instrText>
|
8
|
+
</w:r>
|
9
|
+
<w:r>
|
10
|
+
<w:fldChar w:fldCharType="separate"/>
|
11
|
+
</w:r>
|
12
|
+
<w:r>
|
13
|
+
<w:t>«prefix»</w:t>
|
14
|
+
</w:r>
|
15
|
+
<w:r>
|
16
|
+
<w:rPr>
|
17
|
+
<w:noProof/>
|
18
|
+
</w:rPr>
|
19
|
+
<w:fldChar w:fldCharType="end"/>
|
20
|
+
</w:r>
|
21
|
+
<w:r>
|
22
|
+
<w:t>-headed</w:t>
|
23
|
+
</w:r>
|
24
|
+
</w:p>
|
25
|
+
</w:document>
|
26
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:p>
|
3
|
+
<w:fldSimple w:instr=" MERGEFIELD ocean.fishy \* MERGEFORMAT ">
|
4
|
+
<w:r>
|
5
|
+
<w:rPr>
|
6
|
+
<w:b/>
|
7
|
+
<w:i/>
|
8
|
+
<w:noProof/>
|
9
|
+
</w:rPr>
|
10
|
+
<w:t>«ocean.fishy»</w:t>
|
11
|
+
</w:r>
|
12
|
+
</w:fldSimple>
|
13
|
+
</w:p>
|
14
|
+
</w:document>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:p>
|
3
|
+
<w:r>
|
4
|
+
<w:fldChar w:fldCharType="begin"/>
|
5
|
+
</w:r>
|
6
|
+
<w:r>
|
7
|
+
<w:instrText xml:space="preserve">MERGEFIELD ocean.fishy \* MERGEFORMAT </w:instrText>
|
8
|
+
</w:r>
|
9
|
+
<w:r>
|
10
|
+
<w:fldChar w:fldCharType="separate"/>
|
11
|
+
</w:r>
|
12
|
+
<w:r>
|
13
|
+
<w:rPr>
|
14
|
+
<w:b/>
|
15
|
+
<w:i/>
|
16
|
+
<w:noProof/>
|
17
|
+
</w:rPr>
|
18
|
+
<w:t>«ocean.fishy»</w:t>
|
19
|
+
</w:r>
|
20
|
+
<w:r>
|
21
|
+
<w:rPr>
|
22
|
+
<w:noProof/>
|
23
|
+
</w:rPr>
|
24
|
+
<w:fldChar w:fldCharType="end"/>
|
25
|
+
</w:r>
|
26
|
+
</w:p>
|
27
|
+
</w:document>
|
28
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:r>
|
3
|
+
<w:fldChar w:fldCharType="begin"/>
|
4
|
+
</w:r>
|
5
|
+
<w:r>
|
6
|
+
<w:instrText xml:space="preserve">MERGE</w:instrText>
|
7
|
+
</w:r>
|
8
|
+
<w:r>
|
9
|
+
<w:instrText xml:space="preserve">FIELD persim</w:instrText>
|
10
|
+
</w:r>
|
11
|
+
<w:r>
|
12
|
+
<w:instrText>mon_</w:instrText>
|
13
|
+
</w:r>
|
14
|
+
<w:bookmarkStart w:id="0" w:name="_GoBack"/>
|
15
|
+
<w:bookmarkEnd w:id="0"/>
|
16
|
+
<w:r>
|
17
|
+
<w:instrText xml:space="preserve">face \* MERGEFORMAT </w:instrText>
|
18
|
+
</w:r>
|
19
|
+
<w:r>
|
20
|
+
<w:fldChar w:fldCharType="separate"/>
|
21
|
+
</w:r>
|
22
|
+
<w:r>
|
23
|
+
<w:rPr>
|
24
|
+
<w:b/>
|
25
|
+
<w:i/>
|
26
|
+
<w:noProof/>
|
27
|
+
</w:rPr>
|
28
|
+
<w:t>«project_amount»</w:t>
|
29
|
+
</w:r>
|
30
|
+
<w:r>
|
31
|
+
<w:fldChar w:fldCharType="end"/>
|
32
|
+
</w:r>
|
33
|
+
</w:document>
|
@@ -0,0 +1,231 @@
|
|
1
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
2
|
+
<w:p>
|
3
|
+
<w:fldSimple w:instr=" MERGEFIELD if:people \* MERGEFORMAT ">
|
4
|
+
<w:r>
|
5
|
+
<w:t>«if:people»</w:t>
|
6
|
+
</w:r>
|
7
|
+
</w:fldSimple>
|
8
|
+
</w:p>
|
9
|
+
<w:p>
|
10
|
+
<w:r>
|
11
|
+
<w:t>Yay, there are people.</w:t>
|
12
|
+
</w:r>
|
13
|
+
</w:p>
|
14
|
+
<w:p>
|
15
|
+
<w:fldSimple w:instr=" MERGEFIELD end_if:people \* MERGEFORMAT ">
|
16
|
+
<w:r>
|
17
|
+
<w:t>«end_if:people»</w:t>
|
18
|
+
</w:r>
|
19
|
+
</w:fldSimple>
|
20
|
+
</w:p>
|
21
|
+
<w:p>
|
22
|
+
<w:r>
|
23
|
+
<w:t xml:space="preserve">People: </w:t>
|
24
|
+
</w:r>
|
25
|
+
<w:fldSimple w:instr=" MERGEFIELD start:people|series_with_commas \* MERGEFORMAT ">
|
26
|
+
<w:r>
|
27
|
+
<w:t>«start:people|series_with_commas»</w:t>
|
28
|
+
</w:r>
|
29
|
+
</w:fldSimple>
|
30
|
+
<w:fldSimple w:instr=" MERGEFIELD first_name \* MERGEFORMAT ">
|
31
|
+
<w:r>
|
32
|
+
<w:t>«first_name»</w:t>
|
33
|
+
</w:r>
|
34
|
+
</w:fldSimple>
|
35
|
+
<w:r>
|
36
|
+
<w:t xml:space="preserve"> </w:t>
|
37
|
+
</w:r>
|
38
|
+
<w:fldSimple w:instr=" MERGEFIELD last_name \* MERGEFORMAT ">
|
39
|
+
<w:r>
|
40
|
+
<w:t>«last_name»</w:t>
|
41
|
+
</w:r>
|
42
|
+
</w:fldSimple>
|
43
|
+
<w:fldSimple w:instr=" MERGEFIELD end:people \* MERGEFORMAT ">
|
44
|
+
<w:r>
|
45
|
+
<w:t>«end:people»</w:t>
|
46
|
+
</w:r>
|
47
|
+
</w:fldSimple>
|
48
|
+
<w:r>
|
49
|
+
<w:t xml:space="preserve">.</w:t>
|
50
|
+
</w:r>
|
51
|
+
</w:p>
|
52
|
+
<w:p>
|
53
|
+
<w:r>
|
54
|
+
<w:t xml:space="preserve">Oh, I forgot their favorites: </w:t>
|
55
|
+
</w:r>
|
56
|
+
</w:p>
|
57
|
+
<w:p>
|
58
|
+
<w:fldSimple w:instr=" MERGEFIELD start:people \* MERGEFORMAT ">
|
59
|
+
<w:r>
|
60
|
+
<w:t>«start:people»</w:t>
|
61
|
+
</w:r>
|
62
|
+
</w:fldSimple>
|
63
|
+
</w:p>
|
64
|
+
<w:p>
|
65
|
+
<w:fldSimple w:instr=" MERGEFIELD first_name \* MERGEFORMAT ">
|
66
|
+
<w:r>
|
67
|
+
<w:t>«first_name»</w:t>
|
68
|
+
</w:r>
|
69
|
+
</w:fldSimple>
|
70
|
+
<w:fldSimple w:instr=" MERGEFIELD if:favorites.color \* MERGEFORMAT ">
|
71
|
+
<w:r>
|
72
|
+
<w:t>«if:favorites.color»</w:t>
|
73
|
+
</w:r>
|
74
|
+
</w:fldSimple>
|
75
|
+
<w:r>
|
76
|
+
<w:t xml:space="preserve"> loves the color </w:t>
|
77
|
+
</w:r>
|
78
|
+
<w:fldSimple w:instr=" MERGEFIELD favorites.color \* MERGEFORMAT ">
|
79
|
+
<w:r>
|
80
|
+
<w:t>«favorites.color»</w:t>
|
81
|
+
</w:r>
|
82
|
+
</w:fldSimple>
|
83
|
+
<w:fldSimple w:instr=" MERGEFIELD end_if:favorites.color \* MERGEFORMAT ">
|
84
|
+
<w:r>
|
85
|
+
<w:t>«end_if:favorites.color»</w:t>
|
86
|
+
</w:r>
|
87
|
+
</w:fldSimple>
|
88
|
+
<w:r>
|
89
|
+
<w:t xml:space="preserve"> and loves the numbers </w:t>
|
90
|
+
</w:r>
|
91
|
+
<w:fldSimple w:instr=" MERGEFIELD start:favorites.numbers|series_with_commas|as(number) \* MERGEFORMAT ">
|
92
|
+
<w:r>
|
93
|
+
<w:t>«start:favorites.numbers»</w:t>
|
94
|
+
</w:r>
|
95
|
+
</w:fldSimple>
|
96
|
+
<w:fldSimple w:instr=" MERGEFIELD number \* MERGEFORMAT ">
|
97
|
+
<w:r>
|
98
|
+
<w:t>«number»</w:t>
|
99
|
+
</w:r>
|
100
|
+
</w:fldSimple>
|
101
|
+
<w:fldSimple w:instr=" MERGEFIELD end:favorites.numbers \* MERGEFORMAT ">
|
102
|
+
<w:r>
|
103
|
+
<w:t>«end:favorites.numbers»</w:t>
|
104
|
+
</w:r>
|
105
|
+
</w:fldSimple>
|
106
|
+
<w:r>
|
107
|
+
<w:t xml:space="preserve">. Do they love candy? </w:t>
|
108
|
+
</w:r>
|
109
|
+
<w:ffData>
|
110
|
+
<w:name w:val="favorites.loves_candy"/>
|
111
|
+
<w:enabled/>
|
112
|
+
<w:calcOnExit w:val="0"/>
|
113
|
+
<w:checkBox>
|
114
|
+
<w:sizeAuto/>
|
115
|
+
<w:default w:val="0"/>
|
116
|
+
</w:checkBox>
|
117
|
+
</w:ffData>
|
118
|
+
</w:p>
|
119
|
+
<w:p>
|
120
|
+
<w:fldSimple w:instr=" MERGEFIELD end:people \* MERGEFORMAT ">
|
121
|
+
<w:r>
|
122
|
+
<w:t>«end:people»</w:t>
|
123
|
+
</w:r>
|
124
|
+
</w:fldSimple>
|
125
|
+
</w:p>
|
126
|
+
<w:p>
|
127
|
+
<w:r>
|
128
|
+
<w:t>Now let's talk about frogs!</w:t>
|
129
|
+
</w:r>
|
130
|
+
</w:p>
|
131
|
+
<w:p>
|
132
|
+
<w:fldSimple w:instr=" MERGEFIELD if:frogs \* MERGEFORMAT ">
|
133
|
+
<w:r>
|
134
|
+
<w:t>«if:frogs»</w:t>
|
135
|
+
</w:r>
|
136
|
+
</w:fldSimple>
|
137
|
+
</w:p>
|
138
|
+
<w:p>
|
139
|
+
<w:fldSimple w:instr=" MERGEFIELD start:frogs \* MERGEFORMAT ">
|
140
|
+
<w:r>
|
141
|
+
<w:t>«start:frogs»</w:t>
|
142
|
+
</w:r>
|
143
|
+
</w:fldSimple>
|
144
|
+
<w:r>
|
145
|
+
<w:t xml:space="preserve">We have a frog with </w:t>
|
146
|
+
</w:r>
|
147
|
+
<w:fldSimple w:instr=" MERGEFIELD warts \* MERGEFORMAT ">
|
148
|
+
<w:r>
|
149
|
+
<w:t>«warts»</w:t>
|
150
|
+
</w:r>
|
151
|
+
</w:fldSimple>
|
152
|
+
<w:r>
|
153
|
+
<w:t xml:space="preserve"> warts, </w:t>
|
154
|
+
</w:r>
|
155
|
+
<w:fldSimple w:instr=" MERGEFIELD legs \* MERGEFORMAT ">
|
156
|
+
<w:r>
|
157
|
+
<w:t>«legs»</w:t>
|
158
|
+
</w:r>
|
159
|
+
</w:fldSimple>
|
160
|
+
<w:r>
|
161
|
+
<w:t xml:space="preserve"> legs, and whose feelings are </w:t>
|
162
|
+
</w:r>
|
163
|
+
<w:fldSimple w:instr=" MERGEFIELD start:feelings|series_with_commas \* MERGEFORMAT ">
|
164
|
+
<w:r>
|
165
|
+
<w:t>«start:feelings|series_with_commas»</w:t>
|
166
|
+
</w:r>
|
167
|
+
</w:fldSimple>
|
168
|
+
<w:fldSimple w:instr=" MERGEFIELD item \* MERGEFORMAT ">
|
169
|
+
<w:r>
|
170
|
+
<w:t>«item»</w:t>
|
171
|
+
</w:r>
|
172
|
+
</w:fldSimple>
|
173
|
+
<w:fldSimple w:instr=" MERGEFIELD end:feelings \* MERGEFORMAT ">
|
174
|
+
<w:r>
|
175
|
+
<w:t>«end:feelings»</w:t>
|
176
|
+
</w:r>
|
177
|
+
</w:fldSimple>
|
178
|
+
<w:fldSimple w:instr=" MERGEFIELD end:frogs \* MERGEFORMAT ">
|
179
|
+
<w:r>
|
180
|
+
<w:t>«end:frogs»</w:t>
|
181
|
+
</w:r>
|
182
|
+
</w:fldSimple>
|
183
|
+
</w:p>
|
184
|
+
<w:p>
|
185
|
+
<w:fldSimple w:instr=" MERGEFIELD end_if:frogs \* MERGEFORMAT ">
|
186
|
+
<w:r>
|
187
|
+
<w:t>«end_if:frogs»</w:t>
|
188
|
+
</w:r>
|
189
|
+
</w:fldSimple>
|
190
|
+
</w:p>
|
191
|
+
<w:p>
|
192
|
+
<w:fldSimple w:instr=" MERGEFIELD unless:frogs \* MERGEFORMAT ">
|
193
|
+
<w:r>
|
194
|
+
<w:t>«unless:frogs»</w:t>
|
195
|
+
</w:r>
|
196
|
+
</w:fldSimple>
|
197
|
+
</w:p>
|
198
|
+
<w:p>
|
199
|
+
<w:r>
|
200
|
+
<w:t>Oh, never mind, there are no frogs. :(</w:t>
|
201
|
+
</w:r>
|
202
|
+
</w:p>
|
203
|
+
<w:p>
|
204
|
+
<w:fldSimple w:instr=" MERGEFIELD end_unless:frogs \* MERGEFORMAT ">
|
205
|
+
<w:r>
|
206
|
+
<w:t>«end_unless:frogs»</w:t>
|
207
|
+
</w:r>
|
208
|
+
</w:fldSimple>
|
209
|
+
</w:p>
|
210
|
+
<w:p>
|
211
|
+
<w:r>
|
212
|
+
<w:t xml:space="preserve">The king's house has </w:t>
|
213
|
+
</w:r>
|
214
|
+
<w:fldSimple w:instr=" MERGEFIELD king.house.windows \* MERGEFORMAT ">
|
215
|
+
<w:r>
|
216
|
+
<w:t>«king.house.windows»</w:t>
|
217
|
+
</w:r>
|
218
|
+
</w:fldSimple>
|
219
|
+
<w:r>
|
220
|
+
<w:t xml:space="preserve"> windows and </w:t>
|
221
|
+
</w:r>
|
222
|
+
<w:fldSimple w:instr=" MERGEFIELD king.house.doors \* MERGEFORMAT ">
|
223
|
+
<w:r>
|
224
|
+
<w:t>«king.house.doors»</w:t>
|
225
|
+
</w:r>
|
226
|
+
</w:fldSimple>
|
227
|
+
<w:r>
|
228
|
+
<w:t xml:space="preserve"> doors.</w:t>
|
229
|
+
</w:r>
|
230
|
+
</w:p>
|
231
|
+
</w:document>
|