The
style.dft
file is used to compose a virtual document "on the fly" that is made up of the body of the real document, plus the text of various fields that were previously extracted from the real document. This virtual document does not actually exist on disk, but is composed every time you view or index the real document. The virtual document allows the user to view all the relevant fields without needing to see all the fields.zone-begin
and zone-end
keywords in the style.dft
file. Each keyword takes one argument, which is the name of the zone to begin and end.style.dft
file that composes a virtual document containing zones.
- $control: 1
- dft:
- {
- # this begins the "headers" zone, which contains all the
- # headers of this virtual document
- zone-begin: headers
- constant: "Title: "
- field: TITLE
- constant: "\nAuthor: "
- field: AUTHOR
- constant: "\nDate: "
- field: DATE
- # This ends the "headers" zone
- zone-end: headers
- # Now comes the actual text of the document as it is read
- # from the gateway. The engine knows to recognize the special
- # "DOC" field and read it from the gateway rather than
- # from the collection.
- #
- # Note that the document is filtered using the zone filter,
- # and the given style.zon instructs the zone filter which
- # zones to extract.
- #
- # Also note that the entire text of the document resides in a
- # zone called "body", separate from the headers zone above.
- zone-begin: body
- field: DOC
- /filter="zone"
- zone-end: body
- }
- $$
style.dft
file and its associated style.zon
file, you can search for text that matches in the headers zone, or only in the body zone.A shorthand notation exists for the
zone-begin
and zone-end
combination. You can use instead the /zone
construct. For example, as an alternative to the following:
- zone-begin: zname
- field: fname
- zone-end: zname
- field: fname
- /zone = zname