When you convert documents to HTML you can highlight link terms in the returned documents.
Set the Links
parameter in a View
action to the name of the terms that you want to highlight.
Set the StartTag
and EndTag
parameters to the HTML tags to use to highlight the term.
For example:
action=View&Reference=C:\Documents\report.doc&NoACI=True&Links=price&StartTag=<font color="red">&EndTag=</font>
When the View service receives this action, it sends the document text to the Content component as part of a Highlight
action. For example:
action=Highlight&Text=<document text>&Links=price&StartTag=<font color="red">&EndTag=</font>
The response from Content contains the specified HTML tags around the link terms, which View incorporates into the HTML conversion of the document.
In this example, View converts report.doc
to HTML for viewing directly by the Web browser. In the returned document, all instances of the term price
are highlighted using the HTML tags <font color="red">
and </font>
. For example:
In some cases the <font color="red">price</font> has risen considerably.
When you view this document in a Web browser, these terms display in red text.
To use Boolean expressions in your link terms, set the Boolean
parameter to True
in the View
action. This process is similar to setting the Boolean
parameter to True
for a Highlight
action. HPE IDOL Server then treats terms in the Links
parameter as query text, rather than a list of terms. For example:
action=View&Reference=C:\Documents\report.doc&NoACI=True&Boolean=True&Links=price AND risen&StartTag=<font color="red">&EndTag=</font>
This action highlights the terms price
and risen
, if both terms appear in the document.
You can specify the language type of the text in the Links
parameter by adding the LanguageType
parameter to the View
action. This setting ensures that HPE IDOL Server stems words correctly before highlighting.
Use this parameter if the language type of the text to highlight is not the same as the language type you set in the DefaultLanguageType
configuration parameter. For example:
action=View&Reference=C:\Documents\report.doc&NoACI=True&Links=price&StartTag=<font color="red">&EndTag=</font>&LanguageType=EnglishUTF8
You can use the MultiHighlight
action parameter to highlight different link terms with different HTML tags.
In the View
action, set MultiHighlight
to True
.
Set Links
to a semicolon-separated list of terms or groups of terms.
Set StartTag
and EndTag
to a semicolon-separated list of opening and closing HTML tags respectively. The first pair of tags apply to the first link term, the second pair of tags apply to the second link term and so on.
For example:
action=View&MultiHighlight=True&Links=dog+OR+cat;rabbit;"apples and pears"&StartTag=<b>;<i>;<font color="red">&EndTag=</b>;</i>;</font>&Boolean=True
This action highlights the terms dog
or cat
in bold, the term rabbit
in italic, and the phrase apples and pears
in red.
|