A match specification in an index item.
Match items form the second level entries in a two level index entry. The entry attribute specifies the text to render in the index. The search attribute specifies the text to be searched for in the document which will correspond to the specified text.
If the entry attribute is absent or the same as the entry attribute in the enclosing <item> element, the match element specifies first level matches.
Indexes are not supported via direct browser loading.
Attribute name | Description |
---|---|
entry | The second level entry text to render in the index. |
search | The text to search for in the document. |
No element descendants are defined for the <match> element.
Element name | Relation |
---|---|
<item> | The enclosing index item of the match. |
<document xmlns="http://boradoc.org/1.0"> <metadata> <index-entries> <item entry="unit"> <match entry="unit" /> <match entry="test" search="unit test" /> <match entry="test" search="unit tests" /> <match entry="testing" search="unit testing" /> </item> <item entry="code"> <match entry="C++" /> <match entry="C++ file" search=".cpp" /> <match entry="C++ file" search=".hpp" /> <match entry="Java" /> <match entry="Java file" search=".java" /> </item> </index-entries> </metadata> <-- Main document contents follows. --> </document>
The above BDML renders to the following in the document's index:
unit - 42
test - 123, 154
testing - 123
code
C++ - 23, 184
C++ file - 23, 24, 185
Java - 32, 45, 89
Java file - 186