Sausalito Developer's Guide - Parent Directory
Sausalito Developer's Guide - Parent Directory
Sausalito Developer's Guide - Parent Directory
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3—2 Chapter 3: User Interface<br />
Beta Draft 11. Copyright ' 2001. Cobalt Networks, Inc. All Rights Reserved.<br />
Each node on the navigation graph is defined in a XML file. You must have a basic<br />
understanding of how XML works to use navigation; for XML information, see<br />
http://www.sun.com/xml/<br />
Navigation node XML files are located under /usr/sausalito/ui/menu directory. These<br />
files are very simple. It does not matter where or in what subdirectories these files are placed.<br />
All graph related information are contained within the files. Directories can be used to group<br />
these files into a more maintainable manner. To add a node, create a new XML file under the<br />
directory. To remove a node, remove the file. Each XML file contains all the information the<br />
navigation system needs to know about a node.<br />
XML Elements<br />
There are three elements navigation node XML files can use. They are item, parent, and<br />
access elements. Each of the files must contain one and only one item element. Each item<br />
element contains zero to many parent elements. The parent elements can be viewed as<br />
links from the children to the parent node. A collection of nodes and links together composes<br />
a site map. Each parent element can have zero or more access elements.<br />
With no access element, the parent link has no access control and anybody can traverse the<br />
link. With one access element, access is granted if and only if this requirement is met. With<br />
more than one access element, access is granted if any one of the multiple requirements are<br />
met; this is a OR condition.<br />
Table 3—2, Table 3—3, and Table 3—4 lists possible attributes of these elements.<br />
Table 3—2 Item Element Attributes<br />
Name Type Description<br />
id [a-zA-Z0-9_\-]+ id must be unique among XML files. Therefore, it is advisable to prepend package<br />
or vendor tag to the id. See Using Unique Names on page 3—6<br />
label internationalizable<br />
string<br />
description internationalizable<br />
string<br />
label is a short readable string that labels the node. Navigation managers can<br />
display a list of labels for users to navigate to. The interpolate function of I18n<br />
module is used to internationalize this string.<br />
Labels can sometimes be too short. A description is used complement the label<br />
in describing the node s content. The interpolate function of I18n module is used<br />
to internationalize this string.