Skip to content

Commit ddca030

Browse files
authored
Update Fix-User-Guide.md
1 parent 05a0d81 commit ddca030

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

docs/fix/Fix-User-Guide.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Flux-Example:
2525
```
2626

2727
- when using the FLUX:
28-
- - address the `fix`-module
29-
- - you can add variables
30-
- - The Fix transformation can be part of the FLUX `|fix("retain('245??')")` - usually useful for short fixes
31-
- - or it can be separated in an external file, that is called in the FLUX-Process as in the code snippet above
28+
- address the `fix`-module
29+
- you can add variables
30+
- The Fix transformation can be part of the FLUX `|fix("retain('245??')")` - usually useful for short fixes
31+
- or it can be separated in an external file, that is called in the FLUX-Process as in the code snippet above
3232
- when using it in a Java process, just add the library to your process
3333

3434
## Record-based and metadata manipulating approach
@@ -126,7 +126,7 @@ k : l : m : o : deepNestedField
126126
```
127127

128128
The path for a simple string element is addressed by stating the element name: `a`
129-
For the fields with deeper structure you add a dot ‘.’. The path for elements in nested objects is stated by: `b.c` or `k.l.m.o`
129+
For the fields with deeper structure you add a dot `.`. The path for elements in nested objects is stated by: `b.c` or `k.l.m.o`
130130

131131
Sometimes an element can have multiple instances. Different data models solve this possibility differently. In XML records element repetition is possible and (partly) allowed in many schemas. Repeatable elements also exist in JSON and YAML but are unusual.
132132

@@ -139,21 +139,18 @@ When working with nested structures and combinations of arrays and objects the p
139139

140140
You do not only need the path name for your source element but also if you want to create a new element. But remember that fix, as in catmandu, is using repeated fields and arrays as lists so if you want to create a repeated field you have to create an array without suffix [].
141141

142-
e.g.:
143-
```PERL
144-
copy_field("a", "z.y.x")
145-
```
142+
e.g.: `copy_field("a", "z.y.x")`
146143

147144
This would copy the value of z in a nested object:
148145

149-
```
146+
```YAML
150147
z :
151148
y:
152149
x : simpleField
153150
```
154151
155152
156-
To address paths you can use wildcards. For instance the star-wildcard: `person*` would match all simple literals with element names starting with 'person': 'person\_name', 'person\_age', etc.
153+
To address paths you can use wildcards. For instance the star-wildcard: `person*` would match all simple literals with element names starting with `'person'`: `'person\_name'`, `'person\_age'`, etc.
157154
Apart from the `*` wildcard, the `?` wildcard is supported. It matches exactly one arbitrary character.
158155

159156
Not fully supported yet is alteration of pathes.
@@ -166,7 +163,7 @@ Since FIX is not constructing a new record stream but is manipulating the existi
166163

167164
e.g.: if you transform MARC21 to JSON but you want to keep only certain elements that you created, you state them in a `retain` function:
168165

169-
```
166+
```perl
170167
retain("all",
171168
elements",
172169
"that",

0 commit comments

Comments
 (0)