This document is the canonical authoring reference for help XML files used by Nelson. It explains the structure required bynelson_help.xsdand hownelson_html.xslttransforms each element into HTML. Use this file as a template and checklist when creating or reviewing documentation pages.
`<xmldoc>` (root) — REQUIRED child: `<language>`
Header: `<title>`, `<language>`, `<module_name>`, `<chapter>`, `<short_description>`
Sections: `<syntax>`, `<param_input>`, `<param_output>`, `<description>`, `<examples>`, `<see_also>`, `<history>`, `<authors>`, `<bibliography>`
| Parameter | Description |
|---|---|
| language |
Locale used by the XSLT to select labels and localized text. Examples:en_US,fr_FR. This element is required on the root`<xmldoc>`. |
| keyword |
Main identifier shown as the page title by the XSLT. If absent, the XSLT falls back to`<chapter>`or "Documentation". |
| Parameter | Description |
|---|---|
| html |
The XSLT generates an HTML file using local assets:highlight.css,nelson_common.cssandnelson_help.js. Images are copied via the extensionext:copy_img. |
A human-readable reference and definitive example set describing the XML help file format defined bynelson_help.xsd, and hownelson_html.xslttransforms its elements into HTML.
Use`<description>`to provide the main documentation body. It accepts paragraphs (`<p>`), lists (`<ul>`,`<ol>`), tables (`<table>`), inline markup (`<b>`,`<i>`,`<code>`), images (`<img src="..."/>`) and LaTeX (`<latex>`).
Inline elements and their XSLT rendering:
Block elements:
Authoring tips:
Subchapter support — Nelson's help system supports nested subchapters. To add one:
The buildhelp tool and XSLT resolve these paths and will generate nested HTML pages (for example plots/mesh.html).
% Simple one-line example
x = rand(1,10);
[y, info] = myfunc(x);
disp(info);
<?xml version="1.0" encoding="UTF-8"?>
<xmldoc>
<language>en_US</language>
<chapter>Plots</chapter>
<chapter_description>
<p>Plotting functions grouped in a subchapter.</p>
</chapter_description>
</xmldoc>
% Generate a plot and save as SVG
x = 0:0.1:2*pi;
y = sin(x);
plot(x,y);
saveas(gcf(), [tempdir(),'example_plot.svg']);
| Version | Description |
|---|---|
| 1.15.0 | initial version |
| 1.17.0 | added subchapter support |