next up previous contents index
Next: 5.4.3 Integrating your customized Up: 5.4 Customizing the Broker's Previous: List of Definitions

5.4.2 Example BrokerQuery.cf customization file

The following definitions demonstrate how to change the BrokerQuery.pl.cgi output. The <PrintObject> specification prints the object number, description, and indexing data all on the first line. The description is wrapped around HMTL anchor tags so that it is a link to the object originally gathered. The words ``indexing data'' are a link to the DisplayObject program which will format the content summary for HTML browsers. The object number is formatted as a number in parenthesis such that the whole thing takes up four spaces.

The <MatchedLineSub> definition includes four substitution expressions. The first removes the words ``Matched line:'' from the beginning of each matched line. The second removes SOIF attributes of the form ``partial-text{43}:'' from the beginning of a line. The third displays the attribute names (e.g. partial-text#) in italics. The last expression indents each line by five spaces to align it with the description line. The definition for <EndBrokerResults> slightly modifies the report of how many objects were matched.

        <PrintObject>
        $objectnum <A HREF="$url"><STRONG>$desc</STRONG></A> \
        [<A HREF="$cs_a://$cs_h/Harvest/cgi-bin/DisplayObject.cgi?object=$cs_p">\
        indexing data</A>]
        $opaque
        
        </PrintObject>
        
        <ObjectNumPrintf>
        (%2d)
        </ObjectNumPrintf>
        
        <MatchedLineSub>
        s/^Matched line: *//;
        s/^([\w-]+# )[\w-]+{\d+}:\t/\1/;
        s/^([\w-]+#)/<I>\1<\/I>/;
        s/^.*/     $&/;
        </MatchedLineSub>
    
        <EndBrokerResults>
        <STRONG>Found $nopaquelines matched lines, $nobjects objects.</STRONG>
        <P>\n
        </EndBrokerResults>



Duane Wessels
Wed Jan 31 23:46:21 PST 1996