@@ -81,10 +81,10 @@ The most common use of `xpath` is for data extraction. Consider again the sample
81
81
```
82
82
83
83
The `xpath` attributes on `"order_id"`, `"customer_id"`, and `"country"` tell omniparser where to get
84
- the field string data from. When `xpath` **not** appearing with `object`, `template`, `custom_func`, or
85
- `custom_parse`, then it is a data extraction directive telling omniparser to extract the text data at the
86
- location specified by the `xpath` query. Note in this situation, omniparser will require the result set of
87
- such `xpath` queries to be of a single node: if such `xpath` query results in more than one node, omniparser
84
+ the field string data from. When `xpath` **not** appearing with `object`, `template`, or `custom_func`,
85
+ then it is a data extraction directive telling omniparser to extract the text data at the location
86
+ specified by the `xpath` query. Note in this situation, omniparser will require the result set of such
87
+ `xpath` queries to be of a single node: if such `xpath` query results in more than one node, omniparser
88
88
will fail the current record transform (but will continue onto the next one as this isn't considered fatal).
89
89
90
90
## Data Context and Anchoring
@@ -191,8 +191,7 @@ Now let's go through the schema and input together to see how `xpath` anchoring
191
191
for a `custom_func`, then everything inside the `custom_func`, namely those argument transforms, are all
192
192
anchored on the cursor position prescribed by the `xpath`.
193
193
194
- When `xpath` is used for anchoring and cursoring, it can appear with `object`, `template`, `custom_func`, and
195
- `custom_parse`.
194
+ When `xpath` is used for anchoring and cursoring, it can appear with `object`, `template`, and `custom_func`.
196
195
197
196
## Static and Dynamic XPath Queries
198
197
@@ -280,8 +279,8 @@ for `color` field in the output, we need to dynamically construct an XPath query
280
279
needed for `size` field data extraction.
281
280
282
281
`xpath_dynamic` is used in such a situation. It basically says, unlike `xpath` is always a constant and static
283
- string value, `xpath_dynamic` is computed, by either `custom_func`, or `custom_parse `, or `template `, or
284
- `external`, or ` const`, or another `xpath` direct data extraction.
282
+ string value, `xpath_dynamic` is computed, by either `custom_func`, or `template `, or `external `, or
283
+ `const`, or another `xpath` direct data extraction.
285
284
286
285
`xpath_dynamic` can be used everywhere `xpath` is used, except on `FINAL_OUTPUT`. `FINAL_OUTPUT` can only
287
286
use `xpath`.
@@ -304,7 +303,7 @@ Depending on which transform is in play, different outcomes, including error, ca
304
303
- Example: `"FINAL_OUTPUT": { "xpath": "/publishers/*", "object": {`
305
304
- The result set can be either empty, or of one node, or of multiple nodes.
306
305
307
- - `xpath`/`xpath_dynamic` used in `object`, `custom_func`, `custom_parse`, ` template` transform
306
+ - `xpath`/`xpath_dynamic` used in `object`, `custom_func`, `template` transform
308
307
(other than `FINAL_OUTPUT` or directly under an `array` transform):
309
308
310
309
- Example: `"contact": { "xpath": "PATH/TO/CONTACT", "object": {`
0 commit comments