Scale Intelligence■ Docs
Docs / The model / FieldSpec

FieldSpec.

One field of an extraction: its name, how it is found (a CSS selector, an XPath, a regular expression, a JSON path), the attribute read, its type, whether many, and nested fields

Figure 1FieldSpecspecified
FIELDSPECvalue at none scopenametextselector_kindenum:css|xpath|regex|json pathselectortexttext by default; for a pattern, where it runs: the visible text by default, address (the page's own address), nodes (the text nodes joined by a bar) or html (the page's markup, or the item's inside a list, so an identity kept in a data attribute or a link is read the same way on every surface)attributetextoptionala type of the registertypetextmanyboolnestedfields[FieldSpec]optionalpoints at no other object
FieldSpec is a value at none scope. The drawing shows its fields and the objects that they point at.
kind
value
scope
none
key
none
store
none
family
sources

Fields#

fieldtyperequirednote
nametextyes
selector_kindone of css | xpath | regex | json pathyes
selectortextyes
attributetextnotext by default; for a pattern, where it runs: the visible text by default, address (the page’s own address), nodes (the text nodes joined by a bar) or html (the page’s markup, or the item’s inside a list, so an identity kept in a data attribute or a link is read the same way on every surface)
typetextyesa type of the register
manyboolyes
fieldsFieldSpecnonested

Routes that use it#

No route takes or returns FieldSpec directly. The record holds it, and the objects that point at it reach it.