HTML tag inspectors

Another way to avoid using the html indexed property is to use the html tag inspectors:

<?relevance html tag "h1" of name of company?>

that returns:


The html tag embeds the requested text in the specified HTML tag. The requested text can be either a string or html. If it is a string, it is HTML-escaped. The index parameter can also include attributes that are separated from the tag name by whitespace:

<?relevance html tag "h1 id='companyName'" of name of company?>

that returns:

"<h1 id='companyName'>Big&amp;Bad</h1>"

You can also nest tags:

<?relevance html tag "div id='header'" of html tag "h1" of name of company?>

That returns:

"<div id='header'><h1>Big&amp;Bad</h1></div>"

Most common HTML elements have a shorthand tag property:

<?relevance h1 of name of company?>

That returns:


Like the generic html tag inspector, each shorthand tag property can embed both strings and html. The shorthand tags also accept HTML attributes:

<?relevance h1 "id='companyName' class='header'" of name of company?>

That returns:

"<h1 id='companyName' class='header'>Big&amp;Bad</h1>"

The following shorthand tags are supported:

html 			head 			title 		meta 			body 			div 
span 			address 	h1 				h2 				h3 				h4 
h5 				h6 				em 				strong 		dfn 			code 
samp 			kbd 			var 			cite 			abbr 			acronym 
blockquote q 				sub 			sup 			p 				pre 
ins 			del 			ul 				ol 				li 				dt 
dd				table 		caption 	thead 		tfoot 		tbody 
colgroup 	col 			tr 				th 				td 				link 
base 			tt 				i 				b 				big 			small 

Because a is ignored by the relevance evaluator, the a shorthand property is represented by anchor.

<?relevance anchor "href=''" of "BigFix"?>

That returns:

"<a href=''>BigFix</a>"

There are a few special-purpose aggregating properties:

  • Ordered list
  • Unordered list
  • Definition list

These produce HTML lists (of the respective types) of their plural string or html direct object. For example an ordered (numbered) list can be specified like this:

<?relevance ordered list of ("<"; ">"; "&")?>

That returns:


A simple bulleted list can be specified like this:

<?relevance unordered list of ("<"; ">"; "&")?>

That returns:


Definition lists alternate between dt and dd elements. They are used where you have a natural set of name-value pairs:

<?relevance definition list of (name of it; free space of it as string) of
drives whose (exists free space of it)?>

That returns: