JMRI: Displaying JMRI Panel Files
JMRI panel and configuration information is stored in XML files. These are text files that people can directly read, but the format and structure information take a lot of space.
JMRI provides a tool, called an "XSLT transform", to convert the JMRI panel file into a more readable web page. You open your panel file with a web browser, and can then read it, print it, copy and paste into a file of another form, etc.
A large example of this is available as a PDF file. This is the configuration information, including routes, Logix, etc, for the SP Shasta Route layout.
To view your own panel file, just open it with a web browser. With some computers and browsers, you drag the file's icon onto the browser's icon. Others, you use entries in the browser's "File" menu to find and open your file.
For this to work, your browser needs to be able to find the "stylesheet" that does the formatting. If opening the panel file doesn't work, particularly if it just opens a blank window, or shows error messages about not being able to load something, you may have to change the location listed for the stylesheet. This location is in the 2nd line of your panel file. Unfortunately, we can't give precise rules, as different web browsers have different requirements. But there are two things you can try:
- Tell the browser to pick it up from a JMRI web server.
To do this, change the second line of the file to:
<?xml-stylesheet href="http://jmri.org/xml/XSLT/panelfile.xsl" type="text/xsl"?>
- Put the stylesheet file in the same place as your panel
file, and tell the browser to use it.
To do this, first find the "xml/XSLT/panelfile.xsl" file in your JMRI distribution directory, or get the most recent version from JMRI by downloading this link. Put a copy of that file in the same directory as the panel file you want to display. Then change the second line of your panel file to:
<?xml-stylesheet href="panelfile.xsl" type="text/xsl"?>
Don't change the first line!
For technical information on this, see the JMRI XML page.