Inside the pubTOC
The pubTOC.xml file found in any topic folder represents the full table of contents of the publication and contains a hierarchical representation of the publication's topics. Here, topics may have subtopics and subtopics may have further subtopics. Main topics and binary renditions are represented as level 1 topics. The pubTOC.xml also contains all of the index entries that were created by Word or a Word-compatible authoring tool.
Open a pubTOC.xml file within any topic folder. Your screen should look something like this:
At the top of the file you will see the index entries. Each index entry identifies the keywords defined in Word and the list of locations in the publication where the keywords are located. You can use these topic references to generate hyperlinks to the destination topics (this is what Hyper.Net's sample WCMS application does with XSLT and JavaScript, as shown in the image below):
At the bottom of the pubTOC.xml file you will see the publication's table of contents. The table of contents references all topics within the publication including binary renditions and specifies each topic's hierarchical level and order within the publication.
Hyper.Net's sample WCMS application chooses not to display binary renditions in the table of contents presented to the user. Links to these renditions are instead provided via the navigation bar that appears before the topic content. You can modify the XSL file used to transform the pubTOC anyway you'd like.
The following XSL files (found in the Style Library/HNWCMS folder) are used by Hyper.Net's sample WCMS application to generate navigational elements from the pubTOC.xml. You can use them as templates to accelerate your application development:
| |
· |
PublicationTOC.xsl: Generates the expandable/collapsible table of contents
|
| |
· |
PublicationIndex.xsl: Generates the keyword index created in Word as a hyperlink list
|
| |
· |
PrevNext.xsl: Generates the values needed to implement the Next Topic/Previous Topic buttons in the HNWCMS application
|
| |
· |
Toolbar.xsl: Generates a list of sibling topics for the current topic and also the list of available renditions
|
| |
· |
BreadCrumb.xsl: Generates the current location within a publication as a hierarchical "ancestor" list
|
| |
|
|
Note
|
For example, if you call the pubTOC.xml file with the BreadCrumb.xsl file, you will get HTML representing a one-line list of hyperlinks to the selected topic's ancestors. Calling pubTOC.xml with PublicationIndex.xsl will generate an HTML representation of the publication's index, i.e., a list of all index keywords defined in the Word source file. Each keyword is a hyperlink to the topic where the keyword is used. If you call the pubTOC.xml with the PublicationTOC.xsl, you will get an HTML representation of the full expandable/collapsible table of contents for the publication expanded to the currently selected topic. For all of these XSL files, the selected topic is determined by the URL of the topic and is represented in the XSL file by @selectedTopicID.
|
| |
|
|
Note
|
A BreadCrumb.xsl is created for each Topic (instead of globally) to make it possible to dynamically compute items in the breadcrumb in the case where an external, abstract taxonomy for the publication is being used. In this case the path to the Topic would be displayed to the user using this taxonomy instead of using a physical ancestor list.
|