Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:user:browsing [2018/07/31 14:11]
kjdon
en:user:browsing [2018/07/31 14:16] (current)
kjdon [The hierarchy classifier]
Line 73: Line 73:
 Hierarchy classifiers are more complex to specify than list classifiers. Hierarchy classifiers are more complex to specify than list classifiers.
  
-<​imgcaption figure_part_of_the_file_sub|%!-- id:618 --%Part of the file //sub.txt// ></​imgcaption>​+The hierarchy is predefined in a file such as this sub.txt:
 <​code>​ <​code>​
 1           ​1 ​      "​General reference"​ 1           ​1 ​      "​General reference"​
Line 95: Line 95:
  
  
-<!-- id:619 -->The //hfile// argument gives the name of a file, like that in Figure <imgref figure_part_of_the_file_sub>​, which defines the metadata hierarchy. Each line describes one classification,​ and the descriptions have three parts:+<!-- id:619 -->The //hfile// argument gives the name of a file, like sub.txt, which defines the metadata hierarchy. Each line describes one classification,​ and the descriptions have three parts:
  
   * <!-- id:620 -->​Identifier,​ which matches the value of the metadata (given by the //​metadata//​ argument) to the classification.   * <!-- id:620 -->​Identifier,​ which matches the value of the metadata (given by the //​metadata//​ argument) to the classification.
Line 101: Line 101:
   * <!-- id:622 -->The name of the classification. (If this contains spaces, it should be placed in quotation marks.)   * <!-- id:622 -->The name of the classification. (If this contains spaces, it should be placed in quotation marks.)
  
-<!-- id:623 -->Figure <imgref figure_part_of_the_file_sub>​ is part of the //sub.txt// file used to create the subject hierarchy in the Development Library (and the Demo collection). This example is a slightly confusing one because the number representing the hierarchy appears twice on each line. The metadata type //​Hierarchy//​ is represented in documents with values in hierarchical numeric form, which accounts for the first occurrence. It is the second occurrence that is used to determine the hierarchy that the hierarchy browser implements.+<!-- id:623 -->The file contents above are part of the //sub.txt// file used to create the subject hierarchy in the Development Library (and the Demo collection). This example is a slightly confusing one because the number representing the hierarchy appears twice on each line. The metadata type //​Hierarchy//​ is represented in documents with values in hierarchical numeric form, which accounts for the first occurrence. It is the second occurrence that is used to determine the hierarchy that the hierarchy browser implements.
  
 <!-- id:624 -->The //​hierarchy//​ classifier has an optional argument, //sort//, which determines how the documents at the leaves are ordered. Any metadata can be specified as the sort key. The default is to produce the list in the order in which the building process encounters the documents. Ordering at internal nodes is determined by the order in which things are specified in the //hfile// argument. <!-- id:624 -->The //​hierarchy//​ classifier has an optional argument, //sort//, which determines how the documents at the leaves are ordered. Any metadata can be specified as the sort key. The default is to produce the list in the order in which the building process encounters the documents. Ordering at internal nodes is determined by the order in which things are specified in the //hfile// argument.