Changing the Dlink.xml Descriptive Text Template

A more powerful way of formatting your descriptive text is to customize the descriptive text template file. This single XML file controls how the descriptive text is generated. To correctly modify this file, you will probably need to know a little about XML (eXtensible Markup Language).

Inside the config folder of the PopChart Server root directory you will find the dlink.xml file, which controls all the formatting for descriptive text. Because it is so complicated, we have not fully documented it here. However, we have given you some pointers on how to customize it. You may also want to experiment with it on your own.

You can use any text editor to modify the dlink.xml file. However, it is much easier to use an XML file editor to make changes. Microsoft has a beta version of its XML Notepad available at: http://msdn.microsoft.com/xml/notepad/intro.asp. Other XML editors are available from a variety of sources.

Warning: Backup your dlink.xml file before making any changes.

The top element in the file is DLinkTemplates. There should be only one of these elements in the file. Under DLinkTemplates are the following tags and elements:

Version
The D-link version. This should never be changed.
LanguageSettings
You can change what words will be used for numbers, such as thousands or millions. You should not change the LangCode attribute unless you are creating a new language section (refer to "Adding Support for Additional Languages").
AppearanceAssociations
The most important element(s). There can be several of these elements, each associated with a single appearance file, or with a directory of appearance files. These elements describe the descriptive text template for any appearance files that are associated with the element.
The Filename attribute determines which appearance files are associated with an AppearanceAssociation element. When PopChart Server tries to match an appearance file to an AppearanceAssociation, it first tries to match the appearance file's name exactly with the Filename attribute of an AppearanceAssociation. If it cannot do that, it looks for the AppearanceAssociation element whose Filename most closely matches the path to the appearance file. if there are no matching paths, the first AppearanceAssociation element (the one whose Filename tag is Default) will be used.
For example, consider the following table:
Appearance File Resolved Appearance Association Filename Notes
apfiles/bar.pcxml Default No exact match on the filename and no match on apfiles path.
apfiles/examples.pcxml apfiles/examples.pcxml Exact match found.
apfiles/demo/bar.pcxml apfiles/demo No exact match, but the directory apfiles/demo matches.
apfiles/demo/test/bar.pcxml apfiles/demo/test No exact match, but there are two directory matches: apfiles/demo, and apfiles/demo/test. The latter is a more exact match.

Note: The Filename attribute is case sensitive.

The AppearanceAssociation element contains many subelements that you may want to modify, including AppearanceHeader and AppearanceFooter (which control the HTML header and footer of the descriptive text file), Dlink (which specifies the format of the link that appears next to the PopChart image), and DrillDownDescription (which specifies the format for drill-down links).
The most important subelements, though, are the TextBox and Chart subelements. There is one TextBox element, which describes the appearance of text box descriptive text, and many Chart elements, each of which describes the appearance of descriptive text for the graph type listed in its Type tag. Both of these elements are described in the next section.

Here is an example of the DLink.xml file.